Jump to content
  • 0
Dee

Requesting Stats Seller

Question

So basically i needed an NPC who sells stats/skill points.    1Status Point = 200k,1Skill Point = 200k.  ( NOT ALLSTATUS + 1  )

i wanted like they can pick where to put the status ( STR , DEX , INT , ETC ) -

 

Thank you guys.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Try something like this

 

attachicon.gifsample.txt

thanks but is there someone who can re script this i dont wanted to use @commands :( thanks patskie

Link to comment
Share on other sites

prontera,150,148,0	script	Seller	100,{
function checkcountstats;

	mes .npc$;
	mes "Hello there " +strcharinfo(0)+ ". Want to buy some status points or skill points?";
	next;
	if (select("Yes:No") - 1) close;
	mes .npc$;
	mes "Then what do you want to buy?";
	next;
	if( prompt( "Status Points", "Skill Points", "Nothing") == 3 ) close;
	else if( @menu == 1 ) {	// stats points
		mes .npc$;
		mes "How many points do you want? Each status points cost 200,000 zeny";
		next;
		input [email protected];
		if ( Zeny <  ( [email protected] * .cost ) || [email protected] <= 0 ) {
			mes .npc$;
			mes "You don't have enough money to buy status points.";
			close;
			
		}
		else {
			mes .npc$;
			mes "Where do you want to put your " [email protected]+ " status points?";
			next;
			[email protected] = select("Strength:Agility:Vitality:Intelligence:Dexterity:Luck:Nothing") -1;
			if( [email protected] == 6 ) close;
			else if( checkcountstats( [email protected] ) ) {	// can't bypass the max stats def in player.conf
				mes .npc$;
				mes "You already have the max points for this stat.";
				close;
			}
			mes .npc$;
			mes "Here you go!";
			statusup2 .stat_up[[email protected]], [email protected];
			set Zeny, Zeny - ( [email protected] * .cost );
			close;
		}
	}
	// skills points
	mes .npc$;
	mes "How many points do you want? Each skill points cost 200,000 zeny";
	next;
	input [email protected];
	if ( Zeny <  ( [email protected] * .cost ) || [email protected] <= 0  ) {
		mes .npc$;
		mes "You don't have enough money to buy skill points.";
		close;
	} else {
		set Zeny, Zeny - ( [email protected] * .cost );
		set SkillPoint, SkillPoint + [email protected];
		mes .npc$;
		mes "Done buying " [email protected]+ " skill points.";
		close;
	}

function checkcountstats {
	[email protected] = eaclass();
	[email protected] = getarg(0);
	if( [email protected]&EAJL_BABY && [email protected]&EAJL_THIRD ) {
		if( readparam( .stat_up[[email protected]] ) >= .max_param_baby_3 )
			return 1;
		else
			return 0;
	}
	else if( [email protected]&EAJL_BABY ) {
		if( readparam( .stat_up[[email protected]] ) >= .max_param_baby )
			return 1;
		else
			return 0;
	}
	else if( [email protected]&EAJL_THIRD ) {
		if( readparam( .stat_up[[email protected]] ) >= .max_param_3 )
			return 1;
		else
			return 0;
	}
	else {
		if( readparam( .stat_up[[email protected]] ) >= .max_param )
			return 1;
		else
			return 0;
	}
}

OnInit:
	set .npc$,"[ " +strnpcinfo(1)+ " ]";	// NPC Name
	set .cost,200000;	// Zeny amount needed
//
	setarray .stat_up, bStr, bAgi, bVit, bInt, bDex, bLuk;
	.max_param = getbattleflag( "max_parameter" );
	.max_param_3 = getbattleflag( "max_third_parameter" );
	.max_param_baby = getbattleflag( "max_baby_parameter" );
	.max_param_baby_3 = getbattleflag( "max_baby_third_parameter" );
	end;
}

 

Base on Patskie's script. Credit to him

  • Upvote 2
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...

Important Information

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