Jump to content
  • 0

Limit on Reset NPC


Dogpatch

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  02/17/15
  • Last Seen:  

Can someone help me out on putting a 3 time usage limit per char on a Reset NPC. 

set .@resetnpcname$,"[ Reset NPC ]";
// ---- Cost for First usage
set .@Cost1,1000000;
set .@Cost11,2000000;
// ---- Cost for Second usage
set .@Cost2,5000000;
set .@Cost22,10000000;
// ---- Cost for Third usage
set .@Cost3,5000000;
set .@Cost33,10000000;
// ------------ If the Player already used the reset npc 
// ------------ for the 3rd time the npc will stop him 
// ------------ to use this again as requested
if (#resets >= 3) {
	mes "Você já usou o meu serviço três vezes. Vaza";
	close;
}else{

That's the starting lines, but it gives account bound 3 time usage, not char. I know I'm missing something, I just can't remember what. Sorry, I'm rusty. Haven't touched scripts in months.

 

Thanks in advance.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

#resets

Is a Acc Variable and not a Player. So you have to change it.

 

Go tohttps://rathena.org/wiki/Variables#Format_of_Variables and take a look at the var's.

Edited by Vincent
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  02/17/15
  • Last Seen:  

Awesome. Thanks a bunch bro! Works perfect now! 

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