Jump to content
  • 0

3 Free Reset NPC


Takuyakii

Question


  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.02
  • Content Count:  215
  • Reputation:   11
  • Joined:  08/30/19
  • Last Seen:  

Hello guys can i request for a Reset npc
For the first 3 reset is free.

After that you should have to pay zeny.

Thank you in advance.

 

//===== rAthena Script =======================================
//= Reset NPC
//===== Description: =========================================
//= Resets skills, stats, or both.
//===== Additional Comments: =================================
//= 1.0 First Version
//= 1.1 Optimized for the greater good. [Kisuka]
//= 1.2 Cleaning [Euphy]
//= 1.3 All statuses removed upon skill reset. [Euphy]
//= 1.4 Compressed Script, Added limit use option [Stolao]
//=	Changed set -> setarray, Improved text with F_InsertPlural
//= 1.5 Added sc_end_class to reset related status changes [sader1992]
//============================================================
prontera,150,193,4	script	Reset Girl	124,{
	//	 		Skills,	Stats,	Both,	Limit
	setarray .@Reset,	5000,	5000,	9000,	0;
	mes "[Reset Girl]";
	if(.@Reset[3] && reset_limit > .@Reset[3]) {
		mes "Sorry you can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life.";
		close;
	}
	mes "I am the Reset Girl.";
	mes "Reset Stats: "+ callfunc("F_InsertComma",.@Reset[1]) +"z";
	mes "Reset Skills: "+ callfunc("F_InsertComma",.@Reset[0]) +"z";
	mes "Reset Both: "+ callfunc("F_InsertComma",.@Reset[2]) +"z";
	if(.@Reset[3]) mes "You may only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+", so use "+((.@Reset[3]>1)?"them":"it")+" wisely.";
	mes "Please select the service you want:";
	next;
	set .@i,(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel"));
	if(.@i > 3) close;
	mes "[Reset Girl]";
	if (Zeny < .@Reset[.@i-1]) {
		mes "Sorry, you don't have enough Zeny.";
		close;
	}
	if(.@Reset[3]){
		mes "You can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life, are you sure?";
		if(select("Let me think:That's fine") == 1) close;
	}
	set Zeny, Zeny-.@Reset[.@i-1];
	if(.@i&1){
		sc_end_class;
		ResetSkill;
	}
	if(.@i&2) ResetStatus;
	mes "There you go!";
	if(.@Reset[3]) set reset_limit,reset_limit + 1;
	close;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.02
  • Content Count:  1016
  • Reputation:   191
  • Joined:  11/27/14
  • Last Seen:  

Try this

 

//===== rAthena Script =======================================
//= Reset NPC
//===== Description: =========================================
//= Resets skills, stats, or both.
//===== Additional Comments: =================================
//= 1.0 First Version
//= 1.1 Optimized for the greater good. [Kisuka]
//= 1.2 Cleaning [Euphy]
//= 1.3 All statuses removed upon skill reset. [Euphy]
//= 1.4 Compressed Script, Added limit use option [Stolao]
//=	Changed set -> setarray, Improved text with F_InsertPlural
//= 1.5 Added sc_end_class to reset related status changes [sader1992]
//= 1.6 First three resets are free [YourName]
//============================================================
prontera,150,193,4	script	Reset Girl	124,{
	//	 		Skills,	Stats,	Both,	Limit
	setarray .@Reset,	5000,	5000,	9000,	0;
	mes "[Reset Girl]";
	if(.@Reset[3] && reset_limit > .@Reset[3]) {
		mes "Sorry, you can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life.";
		close;
	}
	mes "I am the Reset Girl.";
	mes "Reset Stats: "+ callfunc("F_InsertComma",.@Reset[1]) +"z";
	mes "Reset Skills: "+ callfunc("F_InsertComma",.@Reset[0]) +"z";
	mes "Reset Both: "+ callfunc("F_InsertComma",.@Reset[2]) +"z";
	if(.@Reset[3]) mes "You may only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+", so use "+((.@Reset[3]>1)?"them":"it")+" wisely.";
	mes "Please select the service you want:";
	next;
	set .@i,(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel"));
	if(.@i > 3) close;
	mes "[Reset Girl]";
	
	if (free_resets < 3) {
		mes "You are eligible for a free reset! This will be reset number "+(free_resets+1)+".";
	} else {
		if (Zeny < .@Reset[.@i-1]) {
			mes "Sorry, you don't have enough Zeny.";
			close;
		}
		if(.@Reset[3]){
			mes "You can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life, are you sure?";
			if(select("Let me think:That's fine") == 1) close;
		}
		set Zeny, Zeny-.@Reset[.@i-1];
	}
	
	if(.@i&1){
		sc_end_class;
		ResetSkill;
	}
	if(.@i&2) ResetStatus;
	
	if (free_resets < 3) {
		set free_resets, free_resets + 1;
	}
	
	mes "There you go!";
	if(.@Reset[3]) set reset_limit, reset_limit + 1;
	close;
}
  1. New Variable free_resets:

    • This variable keeps track of the number of free resets a player has used.
  2. Logic for Free Resets:

    • If the player has used fewer than 3 free resets, they are informed that the reset will be free.
    • Otherwise, the script checks if the player has enough Zeny and deducts it accordingly.
  3. Incrementing free_resets:

    • Each time a free reset is used, free_resets is incremented by 1.

This script ensures that players get their first three resets for free, after which they will be charged the standard fees as defined in the .@Reset array.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  06/27/24
  • Last Seen:  

On 6/3/2024 at 10:49 PM, Takuyakii said:

Hello guys can i request for a Reset npc
For the first 3 reset is free: heardle

After that you should have to pay zeny.

Thank you in advance.

 

//===== rAthena Script =======================================
//= Reset NPC
//===== Description: =========================================
//= Resets skills, stats, or both.
//===== Additional Comments: =================================
//= 1.0 First Version
//= 1.1 Optimized for the greater good. [Kisuka]
//= 1.2 Cleaning [Euphy]
//= 1.3 All statuses removed upon skill reset. [Euphy]
//= 1.4 Compressed Script, Added limit use option [Stolao]
//=	Changed set -> setarray, Improved text with F_InsertPlural
//= 1.5 Added sc_end_class to reset related status changes [sader1992]
//============================================================
prontera,150,193,4	script	Reset Girl	124,{
	//	 		Skills,	Stats,	Both,	Limit
	setarray .@Reset,	5000,	5000,	9000,	0;
	mes "[Reset Girl]";
	if(.@Reset[3] && reset_limit > .@Reset[3]) {
		mes "Sorry you can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life.";
		close;
	}
	mes "I am the Reset Girl.";
	mes "Reset Stats: "+ callfunc("F_InsertComma",.@Reset[1]) +"z";
	mes "Reset Skills: "+ callfunc("F_InsertComma",.@Reset[0]) +"z";
	mes "Reset Both: "+ callfunc("F_InsertComma",.@Reset[2]) +"z";
	if(.@Reset[3]) mes "You may only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+", so use "+((.@Reset[3]>1)?"them":"it")+" wisely.";
	mes "Please select the service you want:";
	next;
	set .@i,(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel"));
	if(.@i > 3) close;
	mes "[Reset Girl]";
	if (Zeny < .@Reset[.@i-1]) {
		mes "Sorry, you don't have enough Zeny.";
		close;
	}
	if(.@Reset[3]){
		mes "You can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life, are you sure?";
		if(select("Let me think:That's fine") == 1) close;
	}
	set Zeny, Zeny-.@Reset[.@i-1];
	if(.@i&1){
		sc_end_class;
		ResetSkill;
	}
	if(.@i&2) ResetStatus;
	mes "There you go!";
	if(.@Reset[3]) set reset_limit,reset_limit + 1;
	close;
}

 

How I can start? Great experiences for newbies and retention for regular customers

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