Jump to content
  • 0

Daily Exp Buff NPC


JoshDJX

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  10/26/15
  • Last Seen:  

Hello there, 

 

I'm looking for a script for an NPC which will give out a Daily Exp buff per Account. 

 

 

 

Example dialogue:

 

 

"Hello, You may receive a Daily 100% Exp Buff lasting 1 Hour."

" Would you like to receive your buff now?" Yes/No

Yes - "Here you are!"  -- Script from battle manual type items: sc_start SC_EXPBOOST,3600000,100; 

No - "Maybe next time"

 

However if they've already received it on their account for that day then:

"You've already received your Daily Exp Buff on this account. Come back tomorrow!"

 

I'm not sure how tracking the day works but if it's possible to track once the day has ticked over to reset it, I'd prefer that rather than a 24 hour cd.

 

Thank you and I appreciate your effort,

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

Try this

prontera,111,111,4	script	Daily Buff	-1,{
function getcurrenttime;
function getcurrenttime {
	return (gettime(7)*10000)+(gettime(6)*100)+gettime(5);
}
	mes "add your own message";
	mes "add your own message";
	mes "add your own message";
	next;
	if(select("Yes","No") == 2) close;
	if(#LastDailyBuff >= getcurrenttime()){
		mes "still on cooldown";
		close;
	}
	mes "here's your buff";
	sc_start SC_EXPBOOST,3600000,100; 
	#LastDailyBuff = getcurrenttime();
	close;
}
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   431
  • Joined:  01/26/16
  • Last Seen:  

prontera,111,111,4	script	Daily Buff	-1,{
function getcurrenttime;
function getcurrenttime {
	return (gettime(7)*10000)+(gettime(6)*100)+gettime(5);
}
	mes "add your own message";
	mes "add your own message";
	mes "add your own message";
	next;
	if(select("Yes","No") == 2) close;
	if(LastDailyBuff >= getcurrenttime()){
		mes "still on cooldown";
		close;
	}
	mes "here's your buff";
	sc_start SC_EXPBOOST,3600000,100; 
	LastDailyBuff = getcurrenttime();
	close;
}

Not tested, use at risk.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  10/26/15
  • Last Seen:  

Tried it out and it seems to work. Thanks!

 

How would I make it Per Account? Currently I can use it on each character once per day. 

With that script does the cooldown reset at midnight?

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...