navigation.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. //= 1.2 Dropped 'is_clientver' command. [Lemongrass]
  17. //============================================================
  18. function script F_Navi {
  19. if ( PACKETVER < 20111010 )
  20. set .@disabled,1;
  21. // This function takes 0 ~ 3 parameters.
  22. switch(getargcount()) {
  23. case 0: // Check if system is disabled.
  24. return .@disabled;
  25. case 1: // Display information message, if enabled.
  26. if (!.@disabled) {
  27. next;
  28. mes getarg(0);
  29. mes "When you click on the ^B9062F[location name]^000000, you'll receive the most advanced ^B9062FNavigation^000000 services!";
  30. }
  31. return;
  32. default: // Display navigation link, if enabled; else set text color, if available.
  33. if (!.@disabled)
  34. return "<NAVI>[" + getarg(0) + "]<INFO>" + getarg(1) + ",0,000,0</INFO></NAVI>";
  35. else if (getargcount() == 3)
  36. return getarg(2)+getarg(0)+"^000000";
  37. else
  38. return getarg(0);
  39. }
  40. }