Dee Posted April 22, 2013 Posted April 22, 2013 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. Quote
Capuche Posted April 22, 2013 Posted April 22, 2013 You have Statusup command if you don't want to see this @com in atcommandlog 1 Quote
Patskie Posted April 22, 2013 Posted April 22, 2013 You have Statusup command if you don't want to see this @com in atcommandlog OMG this helps me too. Quote
Dee Posted April 23, 2013 Author Posted April 23, 2013 Try something like this sample.txt thanks but is there someone who can re script this i dont wanted to use @commands thanks patskie Quote
Capuche Posted April 23, 2013 Posted April 23, 2013 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 2 Quote
Question
Dee
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.