navigation.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //===== rAthena Script =======================================
  2. //= Navigation Functions
  3. //===== By: ==================================================
  4. //= Euphy
  5. //===== Current Version: =====================================
  6. //= 1.1
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Controls the navigation system for Renewal guides.
  11. //= Clients before 2011-10-10 do not support navigation
  12. //= links, and will default to colored or plain text.
  13. //===== Additional Comments: =================================
  14. //= 1.0 First version.
  15. //= 1.1 Added 'is_clientver' command. [Euphy]
  16. //============================================================
  17. function script F_Navi {
  18. if (!is_clientver(1,20111010))
  19. set .@disabled,1;
  20. // This function takes 0 ~ 3 parameters.
  21. switch(getargcount()) {
  22. case 0: // Check if system is disabled.
  23. return .@disabled;
  24. case 1: // Display information message, if enabled.
  25. if (!.@disabled) {
  26. next;
  27. mes getarg(0);
  28. mes "When you click on the ^B9062F[location name]^000000, you'll receive the most advanced ^B9062FNavigation^000000 services!";
  29. }
  30. return;
  31. default: // Display navigation link, if enabled; else set text color, if available.
  32. if (!.@disabled)
  33. return "<NAVI>[" + getarg(0) + "]<INFO>" + getarg(1) + ",0,000,0</INFO></NAVI>";
  34. else if (getargcount() == 3)
  35. return getarg(2)+getarg(0)+"^000000";
  36. else
  37. return getarg(0);
  38. }
  39. }