Jump to content
  • 0

Reset NPC including Hatred and Feeling reset.


kyithios

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   5
  • Joined:  02/12/12
  • Last Seen:  

So, we have the resetnpc.txt in custom scripts which is nice, but I also want to give players playing Star Gladiator the ability to reset at will for a fee. Current script is...

 

//===== rAthena Script =======================================
//= Reset NPC
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
//= rAthena Project
//===== 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
//============================================================
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 SC_ALL;// TODO make a sc_end current classes sc only
		ResetSkill;
	}
	if(.@i&2) ResetStatus;
	mes "There you go!";
	if(.@Reset[3]) set reset_limit,reset_limit + 1;
	close;
}

What would I have to add, and where, to make said NPC viable for my needs? 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  191
  • Reputation:   24
  • Joined:  07/19/14
  • Last Seen:  

here.

Lunette,44,113,5    script    SG Resetter    644,{
   cutin "arang01",2;
   mes "[sG Resetter]";
   mes "What do you wish to reset?";
   menu "Reset Feeling",feeling,"Reset Hatred",hatred;

feeling:
   atcommand "@feelreset";
   mes "Done.";
   close2;
   cutin "",255;
   end;

hatred:
   set PC_HATE_MOB_MOON, 0;
   set PC_HATE_MOB_STAR, 0;
   set PC_HATE_MOB_SUN, 0;
   mes "Done.";
   next;
   mes "[sG Resetter]";
   mes "Hatred will be reset upon relogging.";
   mes "Do you wish to relog now?";
   menu "Relog now",relog,"Later",later;

relog:
   atcommand "@kick "+strcharinfo(0);
   end;

later:
   next;
   mes "[sG Resetter]";
   mes "Ok then, but don't forget changes won't take effect until you relog.";
   close2;
   cutin "",255;
   end;

}

 

  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  191
  • Reputation:   24
  • Joined:  07/19/14
  • Last Seen:  

why dont you just add command @hatredreset and @feelingreset for yor players?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   5
  • Joined:  02/12/12
  • Last Seen:  

2 hours ago, HappyMan said:

why dont you just add command @hatredreset and @feelingreset for yor players?

I thought about it, and decided I want the players to pay for the reset, same as with resetting skills and stats. As money will be easy to make especially for the experienced, it makes sense for me to have a sink, however small, wherever I can. I offset this by having other conveniences, such as one-click, no dialogue NPC's that perform a specific function. Sure, I could do the commands, but I can't attach a monetary value to them. Or can I?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   5
  • Joined:  02/12/12
  • Last Seen:  

54 minutes ago, HappyMan said:

here.


Lunette,44,113,5    script    SG Resetter    644,{
   cutin "arang01",2;
   mes "[sG Resetter]";
   mes "What do you wish to reset?";
   menu "Reset Feeling",feeling,"Reset Hatred",hatred;

feeling:
   atcommand "@feelreset";
   mes "Done.";
   close2;
   cutin "",255;
   end;

hatred:
   set PC_HATE_MOB_MOON, 0;
   set PC_HATE_MOB_STAR, 0;
   set PC_HATE_MOB_SUN, 0;
   mes "Done.";
   next;
   mes "[sG Resetter]";
   mes "Hatred will be reset upon relogging.";
   mes "Do you wish to relog now?";
   menu "Relog now",relog,"Later",later;

relog:
   atcommand "@kick "+strcharinfo(0);
   end;

later:
   next;
   mes "[sG Resetter]";
   mes "Ok then, but don't forget changes won't take effect until you relog.";
   close2;
   cutin "",255;
   end;

}

 

You sir, are great. Thank you.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/03/13
  • Last Seen:  

why is it not working for me

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  37
  • Reputation:   0
  • Joined:  02/03/17
  • Last Seen:  

I can´t use this... the emulator have an error with 

PC_HATE_MOB_MOON

Any know why?

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