Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,155,181,5 script Sample#exchange 757,{
- mes "Hi , "+strcharinfo(0)+" i can exchange your ^FF0000Poring Points^000000 for items.";
- next;
- mes "You have "+@Poring_Points+" Points. You've killed a total of "+( @Poring_Points / .Points )+" Poring.";
- mes "What would you like to exchange for ?";
- next;
- for( set .@i,0; .@i < getarraysize( .ItemID ); set .@i,.@i + 1 )
- set .@Menu$,.@Menu$ + "[ "+.Cost[.@i]+" P ] "+.Amount[.@i]+" x "+getitemname( .ItemID[.@i] )+":";
- set .@i,( select( .@Menu$ ) - 1 );
- mes "You have selected ^FF0000"+getitemname( .ItemID[.@i] )+"^000000";
- mes "[ Cost : "+.Cost[.@i]+" Points ] ";
- mes .Amount[.@i]+" x "+getitemname( .ItemID[.@i] );
- if( @Poring_Points >= .Cost[.@i] ){
- if( select("Exchange:Cancel") == 1 ){
- getitem .ItemID[.@i],.Amount[.@i];
- set @Poring_Points,@Poring_Points - .Cost[.@i];
- }
- }else{
- mes "But, you dont have enough Points...";
- }
- close;
- OnInit:
- // Mob ID + Points Reward
- set .MobID,1002;
- set .Points,2;
- // Item Exchange + Amount
- setarray .ItemID[0],607,608,512;
- setarray .Amount[0],1,2,3;
- setarray .Cost[0],2,4,6;
- end;
- OnNPCKillEvent:
- if( killedrid == .MobID ){
- set @Poring_Points,@Poring_Points + .Points;
- dispbottom "[ Point Reward ] Gained "+.Points+" Points. Total : "+@Poring_Points+" Points.";
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment