Jump to content
  • 0

Requesting Stats Seller


Dee

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   7
  • Joined:  01/21/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Try something like this

 

sample.txt

  • Upvote 1
Link to comment
Share on other sites


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

You have Statusup command if you don't want to see this @com in atcommandlog

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

You have Statusup command if you don't want to see this @com in atcommandlog

OMG this helps me too. :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   7
  • Joined:  01/21/12
  • Last Seen:  

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


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

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