Jump to content
  • 0
Sign in to follow this  
JoyRo

Stone reset npc.

Question

Could any one support me with a code that if i select case 5:
It wil open a shop menu and i can buy items out of it.

prontera,145,199,3	script	Resetter	4_M_ATEIL,{	mes .npcname$;	mes "So are you satisfied with your";	mes "current stat allocation?";	mes "Of course not, if you want to make";	mes "a change then listen on.";	next;	mes .npcname$;	mes "I use the power of the";	mes "^009900"+getitemname(.stoneid)+"^000000 to help adventurers";	mes "reset their stat choices.";	mes "Of course the more powerful the";	mes "adventurer, the more ^009900"+getitemname(.stoneid)+"s^000000";	mes "I need the perform the reset.";	next;	for( .@i = 0; .@i < getarraysize( .minrange ); .@i++ ) {		if( BaseLevel >= .minrange[.@i] && BaseLevel <= .maxrange[.@i] ) {			.@stonesreq = .stones[.@i];			break;		}	}	mes .npcname$;	mes "For instance you [" + strcharinfo(0) + "] would require.";	mes "["+.@stonesreq+"] "+getitemname(.stoneid)+" to reset all your stats to 1 and get all your status points back.";	next;	switch( select( "Tell me More!:Lets reset NOW:First Time Free Reset:Later:Buy Stones" ) ) {	case 1:		mes .npcname$;		for( .@i = 0; .@i < getarraysize( .minrange ); .@i++ ) {			mes "Base Lvl ^000099" + .minrange[.@i] + " - " + .maxrange[.@i] + "^000000 ^009900[" + .stones[.@i] + " " + getitemname( .stoneid ) + "]^000000";		}		close;	break;	case 2:		mes .npcname$;		mes "Ok let's start checking.";		next;		if( Weight > 0 ) {			mes .npcname$;			mes "Lower your weight to 0";		}		if( checkcart() ) { setcart 0; }		if( checkfalcon() ) { setfalcon 0;}		if( checkmount() ) { setmount MOUNT_NONE;}		if( countitem( .stoneid ) >= .@stonesreq ) {			delitem .stoneid,.@stonesreq;			resetstatus;		} else {			mes .npcname$;			mes "You do not have enough ^009900" + getitemname( .stoneid ) + "s^000000";		}		close;	break;	case 3:		if( !FreeReset ){			set FreeReset,1;			mes "Welcome...this is your first character free reset...";			resetstatus;		}else{			mes "You have reset for free already.";		}		close;	break;	case 4:		mes .npcname$;		mes "Come back when you change your mind.";		close;			case 5:??	break;}OnInit:	.stoneid = 6320; //reset stone id = 6320 ?	.npcname$ = "["+strnpcinfo(0)+"]";	setarray .minrange[0],1 , 41, 71, 91, 111, 126, 141;  // Min Level Required	setarray .maxrange[0],40, 70, 90, 110,125, 140, 150;  // Max Level Required	setarray .stones[0], 1, 2, 3, 4, 5, 6, 7;  // Number of Stones}

 



-	shop	market#stone	-1,6320:50000;prontera,145,201,3	script	Joy-Ro Resetter	4_M_ATEIL,{	mes .npcname$;	mes "So are you satisfied with your";	mes "current stat allocation?";	mes "Of course not, if you want to make";	mes "a change then listen on.";	next;	mes .npcname$;	mes "I use the power of the";	mes "^009900"+getitemname(.stoneid)+"^000000 to help adventurers";	mes "reset their stat choices.";	mes "Of course the more powerful the";	mes "adventurer, the more ^009900"+getitemname(.stoneid)+"s^000000";	mes "I need the perform the reset.";	next;	for( .@i = 0; .@i < getarraysize( .minrange ); .@i++ ) {		if( BaseLevel >= .minrange[.@i] && BaseLevel <= .maxrange[.@i] ) {			.@stonesreq = .stones[.@i];			break;		}	}	mes .npcname$;	mes "For instance you [" + strcharinfo(0) + "] would require.";	mes "["+.@stonesreq+"] "+getitemname(.stoneid)+" to reset all your stats to 1 and get all your status points back.";	next;	switch( select( "Tell me More!:Lets reset NOW:First Time Free Reset:Buy Stones:Exit" ) ) {	case 1:		mes .npcname$;		for( .@i = 0; .@i < getarraysize( .minrange ); .@i++ ) {			mes "Base Lvl ^000099" + .minrange[.@i] + " - " + .maxrange[.@i] + "^000000 ^009900[" + .stones[.@i] + " " + getitemname( .stoneid ) + "]^000000";		}		close;	break;	case 2:		mes .npcname$;		mes "Ok let's start checking.";		next;		if( Weight > 0 ) {			mes .npcname$;			mes "Lower your weight to 0";		}		if( checkcart() ) { setcart 0; }		if( checkfalcon() ) { setfalcon 0;}		if( checkmount() ) { setmount MOUNT_NONE;}		if( countitem( .stoneid ) >= .@stonesreq ) {			delitem .stoneid,.@stonesreq;			resetstatus;		} else {			mes .npcname$;			mes "You do not have enough ^009900" + getitemname( .stoneid ) + "s^000000";		}		close;	break;	case 3:		if( !FreeReset ){			set FreeReset,1;			mes "Welcome...this is your first character free reset...";			resetstatus;		}else{			mes "You have reset for free already.";		}		close;	break;	case 4:	callshop "market#stone",1;	end;			case 5:			mes .npcname$;		mes "Come back when you change your mind.";		close;	break;}OnInit:	.stoneid = 6320; //reset stone id = 6320 ?	.npcname$ = "["+strnpcinfo(0)+"]";	setarray .minrange[0],1 , 41, 71, 91, 111, 126, 141, 151;  // Min Level Required	setarray .maxrange[0],40, 70, 90, 110,125, 140,	150, 175;  // Max Level Required	setarray .stones[0], 1, 2, 3, 4, 5, 6, 7, 8;  // Number of Stones

i played abit with codes and i managed to add a shop code.
So here is my reset npc for people that wanna sell stones inside reset npc mine are 50k each stone.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.