Guest

daily_reward

By: a guest on Jan 28th, 2012  |  syntax: None  |  size: 2.04 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. //====================== rAthena Script ===============================================================
  2. //=== Made by Rikimaru
  3. //=== Topic Link : http://rathena.org/board/topic/58004-request-daily-reward-npc-script/
  4. //==================== Information ====================================================================
  5. //==== Daily Reward Script
  6. //================= Version : =========================================================================
  7. //=== V 1.1   Fixed a typo in the Script [ Rikimaru ]
  8. //=== V 1.0   Finished Scripting the Daily Reward Script [ Rikimaru ]
  9. //============== Credits : ============================================================================
  10. //=== Credits to Rikimaru for the Daily Reward Script
  11. //=== rAthena Profile Link : http://rathena.org/board/user/434-rikimaru/
  12. //=====================================================================================================
  13. //*************************************************************************
  14. prontera,149,191,5      script  Daily Reward    911,{
  15. //=========================== Settings ================================================================
  16. set .@rewname$,"[ Daily Reward ]";
  17. set .rewardid,607;
  18. set @rewardamount,10;
  19. //======================= Settings End ================================================================
  20. //*****************************************************************************************************
  21. if(gettimetick(2) - lastTimeTalked > (60 * 60 * 24)) {
  22. mes .@rewname$;
  23. mes "Hello "+strcharinfo(0)+",I";
  24. mes "am here to give you a daily";
  25. mes "Reward. Do you want to have it?";
  26. next;
  27. switch(select("-Yes,sure!:-No,bye!:-Cancel")) {
  28.         case 1:
  29.         mes .@rewname$;
  30.         mes "Okay going to give you the item!";
  31.         next;
  32.         mes .@rewname$;
  33.         getitem .rewardid,@rewardamount;
  34.         mes "Okay have fun with it!";
  35.         set lastTimeTalked,gettimetick(2);
  36.         close;
  37.         case 2:
  38.         mes .@rewname$;
  39.         mes "Okay goodbye!";
  40.         close;
  41.         case 3:
  42.         close;
  43.         }
  44.         }
  45.         mes .@rewname$;
  46.         mes "Sorry you can get the";
  47.         mes "Reward again after ";
  48.         mes "24 Hours are over!";
  49.         close;
  50. }