Jump to content
  • 0

Requesting Stats Seller


Question

Posted

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.

5 answers to this question

Recommended Posts

Posted
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 .@amount;
		if ( Zeny <  ( .@amount * .cost ) || .@amount <= 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 " +.@amount+ " status points?";
			next;
			.@s = select("Strength:Agility:Vitality:Intelligence:Dexterity:Luck:Nothing") -1;
			if( .@s == 6 ) close;
			else if( checkcountstats( .@s ) ) {	// 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[.@s], .@amount;
			set Zeny, Zeny - ( .@amount * .cost );
			close;
		}
	}
	// skills points
	mes .npc$;
	mes "How many points do you want? Each skill points cost 200,000 zeny";
	next;
	input .@amount;
	if ( Zeny <  ( .@amount * .cost ) || .@amount <= 0  ) {
		mes .npc$;
		mes "You don't have enough money to buy skill points.";
		close;
	} else {
		set Zeny, Zeny - ( .@amount * .cost );
		set SkillPoint, SkillPoint + .@amount;
		mes .npc$;
		mes "Done buying " +.@amount+ " skill points.";
		close;
	}

function checkcountstats {
	.@eac = eaclass();
	.@s = getarg(0);
	if( .@eac&EAJL_BABY && .@eac&EAJL_THIRD ) {
		if( readparam( .stat_up[.@s] ) >= .max_param_baby_3 )
			return 1;
		else
			return 0;
	}
	else if( .@eac&EAJL_BABY ) {
		if( readparam( .stat_up[.@s] ) >= .max_param_baby )
			return 1;
		else
			return 0;
	}
	else if( .@eac&EAJL_THIRD ) {
		if( readparam( .stat_up[.@s] ) >= .max_param_3 )
			return 1;
		else
			return 0;
	}
	else {
		if( readparam( .stat_up[.@s] ) >= .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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...