Global_Functions.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //============================================================
  2. //===== rAthena Script =======================================
  3. //= Global Functions
  4. //===== Description: =========================================
  5. //= General script functions.
  6. //===== Changelogs: ==========================================
  7. //= 1.0 WoeTETimeStart(X) function check if the woe
  8. // will start in X seconds or less. [Capuche]
  9. //============================================================
  10. // WoeTETimeStart(<seconds>) : return true if the woe te will start in X seconds or less, false otherwise
  11. function script WoeTETimeStart {
  12. .@woe_status = agitcheck3();
  13. .@min_today = gettime(DT_MINUTE);
  14. .@hour_today = gettime(DT_HOUR);
  15. .@day_today = gettime(DT_DAYOFWEEK);
  16. if (getvariableofnpc( getd( ".day_"+ .@day_today ),"woe_TE_contoller" )) {
  17. .@h = getvariableofnpc( getd( ".hour_start_"+ .@hour_today ),"woe_TE_contoller" );
  18. if (.@h > .@hour_today) {
  19. .@time = (60 - .@min_today) *60 + ( .@h - .@hour_today -1 ) *3600;
  20. if (.@time <= getarg(0))
  21. return true;
  22. }
  23. }
  24. return false;
  25. }
  26. function script F_22507 {// ShabbyOldScroll
  27. .@r = rand(1,10);
  28. if (.@r == 1) warp "pay_fild01",141,211;
  29. else if (.@r == 2) warp "payon_in03",99,190;
  30. else if (.@r == 3) warp "pay_dun04",120,116;
  31. else if (.@r == 4) warp "pay_gld",202,186;
  32. else if (.@r == 5) warp "gld_dun01",61,155;
  33. else if (.@r == 6) warp "pay_fild04",348,333;
  34. else if (.@r == 7) warp "payon_in02",17,62;
  35. else if (.@r == 8) warp "payon_in01",144,15;
  36. else if (.@r == 9) warp "pay_fild07",200,186;
  37. else if (.@r == 10) warp "pay_fild10",147,267;
  38. end;
  39. }