yuhsing

Untitled

Mar 31st, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1.  
  2. prontera,155,181,5 script Sample 757,{
  3.  
  4. for( .@i = 0; .@i < .max_required_card; .@i++ ){
  5. while( !getd( "#card_"+.@i ) || getitemname( getd( "#card_"+.@i ) == "null" ){
  6. setd( "#card_"+.@i ),rand( 4001,4544 );
  7. }
  8. mes "Item "+( .@i + 1 )+" : "+getitemname( getd( "#card_"+.@i ) )+" x "+.max_required_amount;
  9. }
  10. switch( select( "Give Cards","Reset Cards" ) == 1 ){
  11. Case 1:
  12. for( .@i = 0; .@i < .max_required_card; .@i++ )
  13. if( countitem( getd( "#card_"+.@i ) ) < .max_required_amount ){
  14. mes "You dont have enough "+getitemname( getd( "#card_"+.@i ) );
  15. close;
  16. }
  17. for( .@i = 0; .@i < .max_required_card; .@i++ )
  18. delitem getd( "#card_"+.@i ),.max_required_amount;
  19. do{
  20. .@new_card = rand( 4001,4544 );
  21. }while( getitemname( .@new_card ) == "null" );
  22. mes "You have gained 1 cards randomly.";
  23. getitem .@new_card,1;
  24. break;
  25. Case 2:
  26. mes "You need 300m zeny. or 1 TCG";
  27. .@i = select( "Pay 300m zeny","Pay 1 TCG" );
  28. if( .@i == 1 && Zeny < 300000000 ){
  29. mes "You dont have Zeny.";
  30. }else if( .@i == 2 && !countitem( 7227 ) ){
  31. mes "You dont have TCG";
  32. }else{
  33. if( .@i == 1 ){
  34. Zeny -= 300000000;
  35. }else{
  36. delitem 7227,1;
  37. }
  38. for( .@i = 0; .@i < .max_required_card; .@i++ )
  39. setd( "#card_"+.@i ),rand( 4001,4544 );
  40. mes "Resetted.";
  41. }
  42. default: break;
  43. }
  44. close;
  45.  
  46. OnInit:
  47. .max_required_card = 3;
  48. .max_required_amount = 30;
  49. end;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment