Advertisement
akbare

shop with command @shop

Aug 24th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. prontera,255,55,5 script Tool Dealer#prt 125,{
  2. OnAtShopCmd:
  3. mes "What do you like to buy?";
  4. switch( select( "Ammunition Box", "Single Ammo", "Identify My Items", "Nothing" ) ) {
  5. next;
  6. case 1:
  7. callshop "AmmunitionBox",1;
  8. end;
  9. case 2:
  10. callshop "SingleAmmo",1;
  11. end;
  12. case 3:
  13. mes "Here you go";
  14. callfunc "identify123";
  15. end;
  16. case 4:
  17. mes "Okay, have a nice day";
  18. close;
  19. }
  20. end;
  21.  
  22. OnInit:
  23. bindatcmd "shop",strnpcinfo(0)+"::OnAtShopCmd",0,99;
  24. end;
  25.  
  26. }
  27.  
  28. - shop Tool Dealer#shop::AmmunitionBox -1,501:-1 // Add ammo box here
  29. - shop Tool Dealer#shop::SingleAmmo -1,502:-1 //single ammo add here
  30.  
  31. function script identify123 {
  32. getinventorylist;
  33. while( .@idn < @inventorylist_count ){
  34. if ( !@inventorylist_identify[.@idn] ){
  35. delitem2 @inventorylist_id[.@idn],1,0,0,0,0,0,0,0;
  36. getitem @inventorylist_id[.@idn],1;
  37. }
  38. .@idn++;
  39. }
  40. close;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement