Jump to content
  • 0

R> Custom Reset NPC


Marihna

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  37
  • Reputation:   0
  • Joined:  09/28/17
  • Last Seen:  

So I have looked around the forums and haven't quite found what I'm looking for in a reset NPC and it is a bit beyond my current scripting abilities. Would someone be able to make a script with the following criteria:

 

Reset NPC:

Base Level 1-49: 40,000 Zeny

Base Level 50-89: 70,000 Zeny

Base Level 90-99: 100,000 Zeny

Transcendent (High Novice, High Archer, Sniper- etc):

Base level 1-89: 1 mi zeny + Monster card (any random card drop. could range from a poring to an mvp card)

Base level 90-99: 1.5 mil zeny + Monster Card

 

My biggest problem so far has been trying to add in a card option, so any help would be greatly appreciated! Thank you. :3

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Untested

prontera,150,193,4	script	Reset Girl	124,{
	disable_items;
	disable_command;

	mes "[Reset Girl]";
	switch( Upper ) {
	case 0:// normal class
	case 2:// baby class
		if (BaseLevel < 50)
			.@cost = 40000;
		else if (BaseLevel < 90)
			.@cost = 70000;
		else
			.@cost = 100000;
		mes "Reset Stats: " + .@cost + "z.";
		mes "Reset Skills: " + .@cost + "z.";
		mes "Please select the service you want:";
		next;
		.@s = select( "Reset Skills", "Reset Stats" );
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "Sorry, you don't have enough Zeny.";
			close;
		}
		Zeny -= .@cost;
		if (.@s == 2)
			resetstatus;
		else {
			sc_end_class;
			resetskill;
		}
		mes "There you go!";
		close;
	case 1:// advanced class
		.@cost = 1000000;
		if (BaseLevel > 89)
			.@cost += 500000;
		mes "Reset Stats: " + .@cost + "z + 1 Monster Card.";
		mes "Reset Skills: " + .@cost + "z + 1 Monster Card.";
		mes "Please select the service you want:";
		next;
		.@s = select( "Reset Skills", "Reset Stats" );
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "Sorry, you don't have enough Zeny.";
			close;
		}
		getinventorylist;
		for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
			if (getiteminfo(@inventorylist_id[.@i],2) != 6)
				continue;
			.@card_id[.@card_size] = @inventorylist_id[.@i];
			.@card_name$[.@card_size] = getitemname( @inventorylist_id[.@i] );
			.@card_size++;
		}
		if (.@card_size < 1) {
			mes "Sorry, you don't have enough Card.";
			close;
		}
		mes "Which card do you want to use?";
		next;
		.@index = select( implode(.@card_name$,":") ) - 1;
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "It shouldn't happen.";
			close;
		}
		if (countitem(.@card_id[.@index]) < 1) {
			mes "It shouldn't happen.";
			close;
		}
		Zeny -= .@cost;
		delitem .@card_id[.@index],1;
		if (.@s == 2)
			resetstatus;
		else {
			sc_end_class;
			resetskill;
		}
		mes "There you go!";
		close;
	}
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  342
  • Reputation:   169
  • Joined:  02/25/12
  • Last Seen:  

Here's some script that should more or less do what you want.

reset.txt

I've included the card through an id input. I was initially thinking of making a menu, but looping through 700 ids will be way too long and heavy for the server if we're running multiple time the script...So I don't have other ids right now.

I can't test it either, tell me if you have an issue.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  37
  • Reputation:   0
  • Joined:  09/28/17
  • Last Seen:  

On 12/1/2017 at 1:48 AM, Alayne said:

Here's some script that should more or less do what you want.

reset.txt

I've included the card through an id input. I was initially thinking of making a menu, but looping through 700 ids will be way too long and heavy for the server if we're running multiple time the script...So I don't have other ids right now.

I can't test it either, tell me if you have an issue.

Sorry for the late reply. Thank you so much for the response. 

 

I tested you the script and it won't show up with the values of how much it will cost players to reset. The values show up as 0 zeny during the startup. Do you know how to get it to reflect the proper values? Or should I just take it out, as the values change depending on the level...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  37
  • Reputation:   0
  • Joined:  09/28/17
  • Last Seen:  

12 hours ago, Capuche said:

Untested


prontera,150,193,4	script	Reset Girl	124,{
	disable_items;
	disable_command;

	mes "[Reset Girl]";
	switch( Upper ) {
	case 0:// normal class
	case 2:// baby class
		if (BaseLevel < 50)
			.@cost = 40000;
		else if (BaseLevel < 90)
			.@cost = 70000;
		else
			.@cost = 100000;
		mes "Reset Stats: " + .@cost + "z.";
		mes "Reset Skills: " + .@cost + "z.";
		mes "Please select the service you want:";
		next;
		.@s = select( "Reset Skills", "Reset Stats" );
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "Sorry, you don't have enough Zeny.";
			close;
		}
		Zeny -= .@cost;
		if (.@s == 2)
			resetstatus;
		else {
			sc_end_class;
			resetskill;
		}
		mes "There you go!";
		close;
	case 1:// advanced class
		.@cost = 1000000;
		if (BaseLevel > 89)
			.@cost += 500000;
		mes "Reset Stats: " + .@cost + "z + 1 Monster Card.";
		mes "Reset Skills: " + .@cost + "z + 1 Monster Card.";
		mes "Please select the service you want:";
		next;
		.@s = select( "Reset Skills", "Reset Stats" );
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "Sorry, you don't have enough Zeny.";
			close;
		}
		getinventorylist;
		for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
			if (getiteminfo(@inventorylist_id[.@i],2) != 6)
				continue;
			.@card_id[.@card_size] = @inventorylist_id[.@i];
			.@card_name$[.@card_size] = getitemname( @inventorylist_id[.@i] );
			.@card_size++;
		}
		if (.@card_size < 1) {
			mes "Sorry, you don't have enough Card.";
			close;
		}
		mes "Which card do you want to use?";
		next;
		.@index = select( implode(.@card_name$,":") ) - 1;
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "It shouldn't happen.";
			close;
		}
		if (countitem(.@card_id[.@index]) < 1) {
			mes "It shouldn't happen.";
			close;
		}
		Zeny -= .@cost;
		delitem .@card_id[.@index],1;
		if (.@s == 2)
			resetstatus;
		else {
			sc_end_class;
			resetskill;
		}
		mes "There you go!";
		close;
	}
}

 

Thank you! This is much closer to what I was looking for! I tested it out and it works as far as using the proper amount of zeny.  My only concern is that it seems that third job classes are not falling into the "advanced" classes section, so they are not requiring a card to reset... How do I add that to it as well?

Edited by Marihna
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

You're right we didn't update Upper for 3rd class.

case SP_UPPER:           val = sd->class_&JOBL_UPPER?1:(sd->class_&JOBL_BABY?2:0); break;

Maybe the easier structure for you to edit could be :

prontera,150,193,4	script	Reset Girl	124,{
	disable_items;
	disable_command;

	mes "[Reset Girl]";
	switch( Class ) {
	case JOB_NOVICE:// normal class
	case JOB_SWORDMAN:
	case JOB_MAGE:
	case JOB_ARCHER:
	case JOB_ACOLYTE:
	case JOB_MERCHANT:
	case JOB_THIEF:
	case JOB_KNIGHT:
	case JOB_PRIEST:
	case JOB_WIZARD:
	case JOB_BLACKSMITH:
	case JOB_HUNTER:
	case JOB_ASSASSIN:
	case JOB_KNIGHT2:
	case JOB_CRUSADER:
	case JOB_MONK:
	case JOB_SAGE:
	case JOB_ROGUE:
	case JOB_ALCHEMIST:
	case JOB_BARD:
	case JOB_DANCER:
	case JOB_CRUSADER2:
	case JOB_SUPER_NOVICE:
	case JOB_GUNSLINGER:
	case JOB_NINJA:

	case JOB_BABY:// baby class
	case JOB_BABY_SWORDMAN:
	case JOB_BABY_MAGE:
	case JOB_BABY_ARCHER:
	case JOB_BABY_ACOLYTE:
	case JOB_BABY_MERCHANT:
	case JOB_BABY_THIEF:
	case JOB_BABY_KNIGHT:
	case JOB_BABY_PRIEST:
	case JOB_BABY_WIZARD:
	case JOB_BABY_BLACKSMITH:
	case JOB_BABY_HUNTER:
	case JOB_BABY_ASSASSIN:
	case JOB_BABY_KNIGHT2:
	case JOB_BABY_CRUSADER:
	case JOB_BABY_MONK:
	case JOB_BABY_SAGE:
	case JOB_BABY_ROGUE:
	case JOB_BABY_ALCHEMIST:
	case JOB_BABY_BARD:
	case JOB_BABY_DANCER:
	case JOB_BABY_CRUSADER2:
	case JOB_SUPER_BABY:

	case JOB_TAEKWON:
	case JOB_STAR_GLADIATOR:
	case JOB_STAR_GLADIATOR2:
	case JOB_SOUL_LINKER:
		if (BaseLevel < 50)
			.@cost = 40000;
		else if (BaseLevel < 90)
			.@cost = 70000;
		else
			.@cost = 100000;
		mes "Reset Stats: " + .@cost + "z.";
		mes "Reset Skills: " + .@cost + "z.";
		mes "Please select the service you want:";
		next;
		.@s = select( "Reset Skills", "Reset Stats" );
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "Sorry, you don't have enough Zeny.";
			close;
		}
		Zeny -= .@cost;
		if (.@s == 2)
			resetstatus;
		else {
			sc_end_class;
			resetskill;
		}
		mes "There you go!";
		close;

	default:// others class
		.@cost = 1000000;
		if (BaseLevel > 89)
			.@cost += 500000;
		mes "Reset Stats: " + .@cost + "z + 1 Monster Card.";
		mes "Reset Skills: " + .@cost + "z + 1 Monster Card.";
		mes "Please select the service you want:";
		next;
		.@s = select( "Reset Skills", "Reset Stats" );
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "Sorry, you don't have enough Zeny.";
			close;
		}
		getinventorylist;
		for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
			if (getiteminfo(@inventorylist_id[.@i],2) != 6)
				continue;
			.@card_id[.@card_size] = @inventorylist_id[.@i];
			.@card_name$[.@card_size] = getitemname( @inventorylist_id[.@i] );
			.@card_size++;
		}
		if (.@card_size < 1) {
			mes "Sorry, you don't have enough Card.";
			close;
		}
		mes "Which card do you want to use?";
		next;
		.@index = select( implode(.@card_name$,":") ) - 1;
		mes "[Reset Girl]";
		if (Zeny < .@cost) {
			mes "It shouldn't happen.";
			close;
		}
		if (countitem(.@card_id[.@index]) < 1) {
			mes "It shouldn't happen.";
			close;
		}
		Zeny -= .@cost;
		delitem .@card_id[.@index],1;
		if (.@s == 2)
			resetstatus;
		else {
			sc_end_class;
			resetskill;
		}
		mes "There you go!";
		close;
	}
}

 

Edited by Capuche
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Well, you could use eaclass() instead of upper.

Edited by llchrisll
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...