Advertisement
Guest User

Untitled

a guest
Jul 9th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. prontera,150,150,4 script Exchanger 100,{
  2.  
  3. // hello guys
  4. // Is it possible to make a script with the following conditions?
  5. // this script like skull exchanger
  6. // -poring coin to TCG
  7. // -its will give random amount 1k-4k poring coin to exchanger 1 TCG
  8. // -and this npc will only showup on 13:00,18:00,And 22:00, server time
  9. ///7539 (Poring_Coin)
  10. ///7227 (TCG_Card)
  11.  
  12. OnClock0214: callsub createCoinRandom; set .npcStart,1; end;
  13. OnClock1400: set .npcStart,0; end;
  14. OnClock1800: callsub createCoinRandom; set .npcStart,1; end;
  15. OnClock1900: set .npcStart,0; end;
  16. OnClock2200: callsub createCoinRandom; set .npcStart,1; end;
  17. OnClock2300: set .npcStart,0; end;
  18.  
  19. //=====================================================================
  20. createCoinRandom:
  21. set .coinAmount, rand(1000,4000); //Set Random Coin Amount;
  22. return;
  23. //====================================================================
  24.  
  25. if (.npcStart) //IF OPEN
  26. {
  27. mes "[Exhanger]";
  28. mes "I am exchanging " + .coinAmount + " Poring coins right now for 1 TCG Card.";
  29. mes "I am exchanging " + .coinAmount + " Right now for 1 TCG Card.";
  30. next;
  31. if(select("Make the trade:Walk away")==2)
  32. close;
  33. mes "[Exchanger]";
  34. if(countitem(7539)<.coinAmount)
  35. {
  36. mes "You need to bring me " + (.coinAmount - countitem(7538)) + " more Poring Coins before I complete this trade";
  37. close;
  38. }
  39. mes "Here you go, Enjoy";
  40. delitem 7538,.coinAmount;
  41. getitem 7227,1;
  42. close;
  43. }
  44. //IF CLOSED.
  45. mes "[Exchanger]";
  46. mes "Sorry, I am currently restocking items for opening later.";
  47. close;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement