Jump to content
  • 0

Stats/Skill Reseter [Official/Custom]


GM Takumirai

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

prontera,146,304,5    script    Reseter    407,{
set .name$, "[Reseter]";
if (BaseLevel =< 20) {
   mes .name$;
   mes "Reset Stat & Skills will cost you 5,000z, want it to reset?";
   next;
   if (select("Yes:No") == 2) close;
   if (Zeny >= 5000) {
       set Zeny, Zeny - 5000;
       callfunc "Reset1";
   } // End if
} else if (BaseLevel > 20 || BaseLevel <= 40) {
   mes .name$;
   mes "Reset Stat & Skills will cost you 2x Premium Reset Stone and 10,000z, want it to reset?";
   next;
   if (select("Yes:No") == 2) close;
   if (countitem(6320) < 2) goto noitem;
   if (Zeny >= 10000) {
       set Zeny, Zeny - 10000;
       callfunc "Reset1";
   } // End if
} else if (BaseLevel > 40 || BaseLevel <= 80) {
   mes .name$;
   mes "Reset Stat & Skills will cost you 3x Premium Reset Stone and 100,000z, want it to reset?";
   next;
   if (select("Yes:No") == 2) close;
   if (countitem(6320) < 3) goto noitem;
   if (Zeny >= 100000) {
       set Zeny, Zeny - 100000;
       callfunc "Reset1";
   } // End if
} else if (BaseLevel > 80) {
   mes .name$;
   mes "Reset Stat & Skills will cost you 5x Premium Reset Stone and 10,000,000z want it to reset?";
   next;
   if (select("Yes:No") == 2) close;
   if (countitem(6320) < 5) goto noitem;
   if (Zeny >= 10000000) {
       set Zeny, Zeny - 10000000;
       callfunc "Reset1";
   } // End if
   } // End if
close;


noitem:

   mes "[Reseter Manager]";
   mes "You dont have enough [Premium Reset Stone]..";
   close;

} // End script

function script Reset1 {
ResetStatus;
ResetSkill;
return;
} // End function

-------------- my problem is i can't click the npc and no menu appear ----------------

- can someone modified this?

- Emistry can you check the script and edit it like in official...

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

What is the map server spitting out?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  439
  • Reputation:   29
  • Joined:  12/08/11
  • Last Seen:  

third line should be like this

if (BaseLevel <= 20) {

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

If there's always an error in the Script, your map server spits out what it is.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

i can't see the error in my map server - cause if i run the ./map-server_sql when the map-server sql is running in cmd the text are going up then when another text came the first text will be gone fast so i cant read the errors ..

Edited by GM Takumirai
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  439
  • Reputation:   29
  • Joined:  12/08/11
  • Last Seen:  

I already posted the fix, any way use this script

prontera,146,304,5	script	Reseter	407,{
set .name$, "[Reseter]";
if (BaseLevel <= 20) {
mes .name$;
mes "Reset Stat & Skills will cost you 5,000z, want it to reset?";
next;
if (select("Yes:No") == 2) close;
if (Zeny >= 5000) {
	set Zeny, Zeny - 5000;
	callfunc "Reset1";
} // End if
} else if (BaseLevel > 20 || BaseLevel <= 40) {
mes .name$;
mes "Reset Stat & Skills will cost you 2x Premium Reset Stone and 10,000z, want it to reset?";
next;
if (select("Yes:No") == 2) close;
if (countitem(6320) < 2) goto noitem;
if (Zeny >= 10000) {
	set Zeny, Zeny - 10000;
	callfunc "Reset1";
} // End if
} else if (BaseLevel > 40 || BaseLevel <= 80) {
mes .name$;
mes "Reset Stat & Skills will cost you 3x Premium Reset Stone and 100,000z, want it to reset?";
next;
if (select("Yes:No") == 2) close;
if (countitem(6320) < 3) goto noitem;
if (Zeny >= 100000) {
	set Zeny, Zeny - 100000;
	callfunc "Reset1";
} // End if
} else if (BaseLevel > 80) {
mes .name$;
mes "Reset Stat & Skills will cost you 5x Premium Reset Stone and 10,000,000z want it to reset?";
next;
if (select("Yes:No") == 2) close;
if (countitem(6320) < 5) goto noitem;
if (Zeny >= 10000000) {
	set Zeny, Zeny - 10000000;
	callfunc "Reset1";
} // End if
} // End if
close;


noitem:

mes "[Reseter Manager]";
mes "You dont have enough [Premium Reset Stone]..";
close;

} // End script

function script Reset1 {
ResetStatus;
ResetSkill;
return;
} // End function

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

thanks ill try it later..

- its working

- but the problem is if im level 19 [the menu for level 20 below] - is working

- next if im level 40+ [the menu for level 20 - 40] - is working but when im level 41+ the menu is still [the menu for level 20-40] also if i tried to level to 60+ 90+ and level 150 still [the menu for level 20 - 40] is appearing

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  439
  • Reputation:   29
  • Joined:  12/08/11
  • Last Seen:  

when using OR (||) when one condition is met, it will execute your code even if the other condition is false.. use this instead...

prontera,146,304,5	script	Reseter	407,{
set .name$, "[Reseter]";
if (BaseLevel <= 20) {
mes .name$;
mes "Reset Stat & Skills will cost you 5,000z, want it to reset?";
next;
if (select("Yes:No") == 2) close;
if (Zeny >= 5000) {
	set Zeny, Zeny - 5000;
	callfunc "Reset1";
} // End if
} else if (BaseLevel > 20 && BaseLevel <= 40) {
mes .name$;
mes "Reset Stat & Skills will cost you 2x Premium Reset Stone and 10,000z, want it to reset?";
next;
if (select("Yes:No") == 2) close;
if (countitem(6320) < 2) goto noitem;
if (Zeny >= 10000) {
	set Zeny, Zeny - 10000;
	callfunc "Reset1";
} // End if
} else if (BaseLevel > 40 && BaseLevel <= 80) {
mes .name$;
mes "Reset Stat & Skills will cost you 3x Premium Reset Stone and 100,000z, want it to reset?";
next;
if (select("Yes:No") == 2) close;
if (countitem(6320) < 3) goto noitem;
if (Zeny >= 100000) {
	set Zeny, Zeny - 100000;
	callfunc "Reset1";
} // End if
} else if (BaseLevel > 80) {
mes .name$;
mes "Reset Stat & Skills will cost you 5x Premium Reset Stone and 10,000,000z want it to reset?";
next;
if (select("Yes:No") == 2) close;
if (countitem(6320) < 5) goto noitem;
if (Zeny >= 10000000) {
	set Zeny, Zeny - 10000000;
	callfunc "Reset1";
} // End if
} // End if
close;


noitem:

mes "[Reseter Manager]";
mes "You dont have enough [Premium Reset Stone]..";
close;

} // End script

function script Reset1 {
ResetStatus;
ResetSkill;
return;
} // End function

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

again i have a problem - when i click the menu reset it stock and the call function is not appear -

i made a script can you modify it again '

prontera,146,304,5    script    Reseter    407,{
set .name$, "[Reseter]";
if (BaseLevel <= 20) {
   mes .name$;
   mes "If you are level 20 below, Reset Stat & Skills will cost you 5,000z, want it to reset?";
   next;
   if (select("Yes:No") == 2) close;
   if (Zeny >= 5000) {
       set Zeny, Zeny - 5000;
       ResetStatus;
       ResetSkill;
cutin "kafra_09.bmp",255;
mes "[Reseter]";
mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
close;
   }
} else if (BaseLevel > 20 && BaseLevel <= 40) {
   mes .name$;
   mes "If you are level 20-40, Reset Stat & Skills will cost you 2x Premium Reset Stone and 10,000z, want it to reset?";
   next;
   if (select("Yes:No") == 2) close;
   if (countitem(6320) < 2) goto noitem;
   if (Zeny >= 10000) {
       delitem 29455,2;
       set Zeny, Zeny - 10000;
       ResetStatus;
       ResetSkill;
cutin "kafra_09.bmp",255;
mes "[Reseter]";
mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
close;
   }
} else if (BaseLevel > 40 && BaseLevel <= 80) {
   mes .name$;
   mes "If you are level 40-80, Reset Stat & Skills will cost you 3x Premium Reset Stone and 100,000z, want it to reset?";
   next;
   if (select("Yes:No") == 2) close;
   if (countitem(6320) < 3) goto noitem;
   if (Zeny >= 100000) {
       delitem 29455,3;
       set Zeny, Zeny - 100000;
       ResetStatus;
       ResetSkill;
cutin "kafra_09.bmp",255;
mes "[Reseter]";
mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
close;
   }
} else if (BaseLevel => 90) {
   mes .name$;
   mes "If you are level 90 above, Reset Stat & Skills will cost you 5x Premium Reset Stone and 10,000,000z want it to reset?";
   next;
   if (select("Yes:No") == 2) close;
   if (countitem(6320) < 5) goto noitem;
   if (Zeny >= 10000000) {
       delitem 29455,5;
       set Zeny, Zeny - 10000000;
       ResetStatus;
       ResetSkill;
cutin "kafra_09.bmp",255;
mes "[Reseter]";
mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
close;


noitem:

   mes "[Reseter Manager]";
   mes "You dont have enough [Premium Reset Stone]..";
   close;

}

@Emistry i need your help please.. thanks

Edited by GM Takumirai
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  439
  • Reputation:   29
  • Joined:  12/08/11
  • Last Seen:  

I never had the chance to test the script but you may test the changes I made.

I noticed that the 3rd option is for level 40-80 and the last option is for 90 and above what if the player is level 81-89?

What I did is to change the 3rd option to 40-89. You may change the level to your liking. And lastly, you don't have a proper

checking of the zeny, so I kinda added that. Anyway here's the script.

prontera,146,304,5	script	Reseter	407,{
set .@name$, "[Reseter]";
if (BaseLevel <= 20) {
	mes .@name$;
	mes "If you are level 20 below, Reset Stat & Skills will cost you 5,000z, want it to reset?";
	if (select("Yes:No") == 2) close;
	set .cost,5000;
	set .del_stone,0;
	goto reset;
} else if (BaseLevel > 20 && BaseLevel <= 40) {
	mes .@name$;
	mes "If you are level 20-40, Reset Stat & Skills will cost you 2x Premium Reset Stone and 10,000z, want it to reset?";
	if (select("Yes:No") == 2) close;
	set .cost,10000;
	set .del_stone,2;
	goto reset;
} else if (BaseLevel > 40 && BaseLevel < 90) {
	mes .@name$;
	mes "If you are level 40-89, Reset Stat & Skills will cost you 3x Premium Reset Stone and 100,000z, want it to reset?";
	if (select("Yes:No") == 2) close;
	set .cost,100000;
	set .del_stone,3;
	goto reset;
} else if (BaseLevel >= 90) {
	mes .@name$;
	mes "If you are level 90 and above, Reset Stat & Skills will cost you 5x Premium Reset Stone and 10,000,000z want it to reset?";
	if (select("Yes:No") == 2) close;
	set .cost,10000000;
	set .del_stone,5;
	goto reset;
}

reset:
if (countitem(6320) < .del_stone) goto noitem;
if (Zeny < .cost) goto nozeny;
next;
cutin "kafra_09.bmp",255;
mes .@name$;
mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
delitem 29455, .del_stone;
set Zeny, Zeny - .cost;
ResetStatus;
ResetSkill;
close2;
cutin "", 255;
end;

noitem:
next;
mes .@name$;
mes "You dont have enough [Premium Reset Stone].";
close;

nozeny:
next;
mes .@name$;
mes "You dont have enough zeny.";
close;
}

P.S: Please forgive my scripting, i'm nowhere near Emistry's or the other guys' scripting ability.. D:

Edited by Magnetix
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

its ok Magnetix thanks anyway,

- here's now my stat reset npc

http://rathena.org/board/topic/62734-statskill-reset-purified-reset-stone/

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