Jump to content
  • 0

R>Hourly Reward NPC Script


myieee

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  12/07/11
  • Last Seen:  

as the title says. I am requesting an Hourly Reward but it has a NPC . for example they need to register to the npc first and if they played for 1 hour . the players can get their reward to the npc (tcg) and when they are done. they need to register again so they can use the Hourly Reward NPC. . vending,AFK,chatting,Pub are okay since they need to talk to the npc.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  12/07/11
  • Last Seen:  

im looking hourly reward with NPC

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  12/07/11
  • Last Seen:  

bump

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  92
  • Reputation:   17
  • Joined:  08/11/12
  • Last Seen:  

Hey myieee, how are you?

I'm going to do your request, please wait a minute so I can edit this answer with your script.

I'll be back soon!

EDIT--

Here is your request, let me know if it works or not! C ya!

// Author: _Okuz_
prontera,150,150,5	script	Hourly Reward	84,{

	if (hourly_reward < gettimetick(2) && !received) {
		set received, 1;
		
		// Rewards here!
		// getitem item_id, amount;
		// Zeny, Zeny + amount;
	}

	mes "[Samuel]";
	mes "Hello buddy! Have you alredy registered to get your free hourly reward?";
	next;
	if (select("I did it!:Not yet...") == 1) close;
	if (!received) {
		mes "[Samuel]";
		mes "Hmmm... I think you already have a register for this, don't you?";
		close;
	}
	else {
		set received, 0;
		set hourly_reward, gettimetick(2) + 3600;
		mes "[Samuel]";
		mes "You have successfully registered to get your free hourly reward, don't forget to come back to register again once you get your reward.";
		close;
	}
}
Edited by _Okuz_
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  12/07/11
  • Last Seen:  

 

Hey myieee, how are you?

I'm going to do your request, please wait a minute so I can edit this answer with your script.

I'll be back soon!

EDIT--

Here is your request, let me know if it works or not! C ya!

// Author: _Okuz_
prontera,150,150,5	script	Hourly Reward	84,{

	if (hourly_reward < gettimetick(2) && !received) {
		set received, 1;
		
		// Rewards here!
		// getitem item_id, amount;
		// Zeny, Zeny + amount;
	}

	mes "[Samuel]";
	mes "Hello buddy! Have you alredy registered to get your free hourly reward?";
	next;
	if (select("I did it!:Not yet...") == 1) close;
	if (!received) {
		mes "[Samuel]";
		mes "Hmmm... I think you already have a register for this, don't you?";
		close;
	}
	else {
		set received, 0;
		set hourly_reward, gettimetick(2) + 3600;
		mes "[Samuel]";
		mes "You have successfully registered to get your free hourly reward, don't forget to come back to register again once you get your reward.";
		close;
	}
}

so how i can set the reward ? like 1 tcg card and i just want a simple registration with no fees 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   1
  • Joined:  02/10/12
  • Last Seen:  

 

Hey myieee, how are you?

I'm going to do your request, please wait a minute so I can edit this answer with your script.

I'll be back soon!

EDIT--

Here is your request, let me know if it works or not! C ya!

// Author: _Okuz_
prontera,150,150,5	script	Hourly Reward	84,{

	if (hourly_reward < gettimetick(2) && !received) {
		set received, 1;
		
		// Rewards here!
		// getitem item_id, amount;
		// Zeny, Zeny + amount;
	}

	mes "[Samuel]";
	mes "Hello buddy! Have you alredy registered to get your free hourly reward?";
	next;
	if (select("I did it!:Not yet...") == 1) close;
	if (!received) {
		mes "[Samuel]";
		mes "Hmmm... I think you already have a register for this, don't you?";
		close;
	}
	else {
		set received, 0;
		set hourly_reward, gettimetick(2) + 3600;
		mes "[Samuel]";
		mes "You have successfully registered to get your free hourly reward, don't forget to come back to register again once you get your reward.";
		close;
	}
}

@myiee

sir _Okuz_ already solved your problem..

 

if (hourly_reward < gettimetick(2) && !received) {
 set received, 1;
        // Rewards here!
        // getitem item_id, amount; <---- uncomment this line and change the item_id for your hourly reward..
        // Zeny, Zeny + amount; <--------uncomment this if you want them to get some zennies
    }
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  12/07/11
  • Last Seen:  

okay there's a bug in this script. everytime I click the npc it gives me the reward 1st .. instead of register to hourly npc before the reward

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  92
  • Reputation:   17
  • Joined:  08/11/12
  • Last Seen:  

@myieee
My mistake... I forgot to put an extra validation for that, please change this:

if (hourly_reward < gettimetick(2) && !received) {

To this:

if (hourly_reward > 0 && hourly_reward < gettimetick(2) && !received) {

And now your script should be fine, please let me know if it works.

Edited by _Okuz_
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  199
  • Reputation:   113
  • Joined:  12/24/11
  • Last Seen:  

Try this, I found it somewhere

//====================================================================
//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= GorthexTiger modified by Nibi
//===== Current Version: =============================================
//= 1.0
//===== Compatible With: =============================================
//= Any eAthena Version / rAthena
//===== Description: =================================================
//= Get Points every successful hours of gameplay, you cannot get
//= the points even if you miss a second or a minute. A player will
//= get a very big bonus if they played 12 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//===== Additional Comments: =========================================
//= You can modify the script to your liking.
//= The default points is Kafrapoints change it anyway if you like.
//= 1.1 = Check Chatting too
//= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
//= 1.3 = Corrected the current balance line on 12 Hours Consecutive
//====================================================================


- script hourlypoints -1,{
OnPCLoginEvent:
    attachnpctimer ""+strcharinfo(0)+"";
    initnpctimer;
    end;


OnTimer30000:
    if(checkvending() || checkchatting() || checkidle()) {
        dispbottom "The hourly points event stopped because you were vending / chatting / afk. Please relog if you wish to start again.";
        stopnpctimer;
        end;
    }
    end;


OnTimer60000:
    set @minute, @minute + 1;
    if(@minute == 60){
        set @minute,0;
        set .@point_amt, 1;
        getitem 7179 .@point_amt;
        set @consecutive_hour, @consecutive_hour + 1;
    }
    if(@consecutive_hour == 6) {
        set @consecutive_hour,0;
        set .@cpoint_amt, 10;
        getitem 7179 .@cpoint_amt;
    }
    stopnpctimer;
    initnpctimer;
    end;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  92
  • Reputation:   17
  • Joined:  08/11/12
  • Last Seen:  

as the title says. I am requesting an Hourly Reward but it has a NPC . for example they need to register to the npc first and if they played for 1 hour . the players can get their reward to the npc (tcg) and when they are done. they need to register again so they can use the Hourly Reward NPC. . vending,AFK,chatting,Pub are okay since they need to talk to the npc.

 

 

 

Try this, I found it somewhere

//====================================================================
//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= GorthexTiger modified by Nibi
//===== Current Version: =============================================
//= 1.0
//===== Compatible With: =============================================
//= Any eAthena Version / rAthena
//===== Description: =================================================
//= Get Points every successful hours of gameplay, you cannot get
//= the points even if you miss a second or a minute. A player will
//= get a very big bonus if they played 12 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//===== Additional Comments: =========================================
//= You can modify the script to your liking.
//= The default points is Kafrapoints change it anyway if you like.
//= 1.1 = Check Chatting too
//= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
//= 1.3 = Corrected the current balance line on 12 Hours Consecutive
//====================================================================


- script hourlypoints -1,{
OnPCLoginEvent:
    attachnpctimer ""+strcharinfo(0)+"";
    initnpctimer;
    end;


OnTimer30000:
    if(checkvending() || checkchatting() || checkidle()) {
        dispbottom "The hourly points event stopped because you were vending / chatting / afk. Please relog if you wish to start again.";
        stopnpctimer;
        end;
    }
    end;


OnTimer60000:
    set @minute, @minute + 1;
    if(@minute == 60){
        set @minute,0;
        set .@point_amt, 1;
        getitem 7179 .@point_amt;
        set @consecutive_hour, @consecutive_hour + 1;
    }
    if(@consecutive_hour == 6) {
        set @consecutive_hour,0;
        set .@cpoint_amt, 10;
        getitem 7179 .@cpoint_amt;
    }
    stopnpctimer;
    initnpctimer;
    end;
}

 

@Haxzor

As per the first post, he wants a clickable NPC that needs registration to start recording playing time without checking if anybody is in idle, vending or chatting. =]

Edited by _Okuz_
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  12/07/11
  • Last Seen:  

 

as the title says. I am requesting an Hourly Reward but it has a NPC . for example they need to register to the npc first and if they played for 1 hour . the players can get their reward to the npc (tcg) and when they are done. they need to register again so they can use the Hourly Reward NPC. . vending,AFK,chatting,Pub are okay since they need to talk to the npc.

 

 

 

Try this, I found it somewhere

//====================================================================
//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= GorthexTiger modified by Nibi
//===== Current Version: =============================================
//= 1.0
//===== Compatible With: =============================================
//= Any eAthena Version / rAthena
//===== Description: =================================================
//= Get Points every successful hours of gameplay, you cannot get
//= the points even if you miss a second or a minute. A player will
//= get a very big bonus if they played 12 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//===== Additional Comments: =========================================
//= You can modify the script to your liking.
//= The default points is Kafrapoints change it anyway if you like.
//= 1.1 = Check Chatting too
//= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
//= 1.3 = Corrected the current balance line on 12 Hours Consecutive
//====================================================================


- script hourlypoints -1,{
OnPCLoginEvent:
    attachnpctimer ""+strcharinfo(0)+"";
    initnpctimer;
    end;


OnTimer30000:
    if(checkvending() || checkchatting() || checkidle()) {
        dispbottom "The hourly points event stopped because you were vending / chatting / afk. Please relog if you wish to start again.";
        stopnpctimer;
        end;
    }
    end;


OnTimer60000:
    set @minute, @minute + 1;
    if(@minute == 60){
        set @minute,0;
        set .@point_amt, 1;
        getitem 7179 .@point_amt;
        set @consecutive_hour, @consecutive_hour + 1;
    }
    if(@consecutive_hour == 6) {
        set @consecutive_hour,0;
        set .@cpoint_amt, 10;
        getitem 7179 .@cpoint_amt;
    }
    stopnpctimer;
    initnpctimer;
    end;
}

 

@Haxzor

As per the first post, he wants a clickable NPC that needs registration to start recording playing time without checking if anybody is in idle, vending or chatting. =]

 

hi again. i tested this script and it seems like the players didnt get their reward .

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  92
  • Reputation:   17
  • Joined:  08/11/12
  • Last Seen:  

@myieee
That's because this script behaves in a different way of what you have requested before. Did you find any problem with my script!? If so, please tell me because I gotta fix it asap to be used by another users.

Best regards,

_Okuz_.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...