Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script Sample -1,{
- OnTalk:
- mes "I can add or deduct skill points from you.";
- mes "What do you want it to be?...";
- next;
- switch( select( "Add Skill Points","Remove Skill Points" ) ){
- Case 1:
- mes "Each Points Required:";
- for( set .@i,0; .@i < .item_size; set .@i,.@i + 1 )
- mes " > ^0055FF"+.item_amount[.@i]+" x "+getitemname( .item_list[.@i] )+"^000000";
- next;
- input .@point_amount,0,100;
- if( .@point_amount ){
- mes "You need ... ";
- for( set .@i,0; .@i < .item_size; set .@i,.@i + 1 ){
- mes " > ^0055FF"+( .item_amount[.@i] * .@point_amount )+" x "+getitemname( .item_list[.@i] )+"^000000";
- if( countitem( .item_list[.@i] ) < ( .item_amount[.@i] * .@point_amount ) )
- set .@failed,1;
- }
- if( !.@failed ){
- if( select( "Confirm","Cancel" ) == 1 ){
- mes "Done, gained "+.@point_amount+" Points.";
- for( set .@i,0; .@i < .item_size; set .@i,.@i + 1 )
- delitem .item_list[.@i],( .item_amount[.@i] * .@point_amount );
- set SkillPoint,SkillPoint + .@point_amount;
- }
- }
- }
- break;
- Case 2:
- if( !SkillPoint ){
- mes "You dont have any skill points.";
- }else{
- mes "Each point = "+.zeny_gain+" Zeny.";
- mes "Sell how many points ?";
- input .@point_amount,0,SkillPoint;
- if( .@point_amount ){
- mes "Done, gained "+( .@point_amount * .zeny_gain )+" Zeny.";
- set Zeny,Zeny + ( .@point_amount * .zeny_gain );
- }
- }
- default: break;
- }
- close;
- OnInit:
- // Item + Amount per Skill Points.
- setarray .item_list,512;
- // setarray .item_list,7298,1040,1098,7121;
- setarray .item_amount,1;
- set .item_size,getarraysize( .item_list );
- // Zeny per Skill Points sold to NPC
- set .zeny_gain,1000;
- end;
- }
- // main NPC used to duplicate other NPC.
- prontera,155,181,5 script Sample#1 757,{
- doevent "Sample::OnTalk";
- }
- turbo_room,129,97,3 duplicate(Sample#1) Sample#2 834
- prontera,187,179,5 duplicate(Sample#1) Sample#3 834
Advertisement
Add Comment
Please, Sign In to add comment