gldfunc_flag.txt 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //===== eAthena Script =======================================
  2. //= War of Emperium Guild Flags Function
  3. //===== By: ==================================================
  4. //= jAthena - kalen (1.0)
  5. //= 1.1 by Akaru, ho|yAnge|X, and Valaris
  6. //===== Current Version: =====================================
  7. //= 1.3a
  8. //===== Compatible With: =====================================
  9. //= eAthena 0.1+; RO Episode 4+
  10. //===== Description: =========================================
  11. //= Flags display messages stating whether or not a guild castle has been captured.
  12. //= Allows the guild members to return to a captured castle.
  13. //======================================
  14. //= Break down of arguments used in the function:
  15. //= arg(0): name of City.
  16. //= arg(1): name of guild castle.
  17. //= arg(2): x1 coordinate for warp
  18. //= arg(3): y1 coordinate for warp
  19. //= arg(4): Teleportable (0/1)
  20. //===== Additional Comments: =================================
  21. //= v1.2: All Guild flags scripts use this function. [kobra_k88]
  22. //= v1.3: Can now only flag in from outside the castle [Kayla]
  23. //= v1.3a: Implemented k3dt's exploit fix [Vicious]
  24. //============================================================
  25. function script F_Flags {
  26. set @GID, GetCastleData(getarg(1)+".gat",1);
  27. if (@GID != 0) goto L_Startg;
  28. mes "[ Edict of the Divine Rune Midgard Kingdom of " + getarg(0) + " ]";
  29. mes " ";
  30. mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of " + getarg(0) + ", this guild base has not been taken by any guild yet";
  31. mes " ";
  32. mes "2. In order to take this guild base, you must defeat all the guardians that are protecting the guild base and eliminate the Emperium.";
  33. return;
  34. L_Startg:
  35. if ((getcharid(2) == @GID) && (getarg(4) == 1)) goto L_Startg2;
  36. mes "[ Edict of the Divine Rune Midgard Kingdom of "+ getarg(0) +" ]";
  37. mes " ";
  38. mes "1. Honoring the ordinance of the";
  39. mes "Divine Rune Midgard Kingdom of ";
  40. mes getarg(0) +", we approve that this";
  41. mes "base is in the private possession";
  42. mes "of the ^ff0000" + GetGuildName(@GID) + "^000000 guild.";
  43. mes " ";
  44. mes "2. The guild master of the";
  45. mes "^ff0000"+ GetGuildName(@GID) + "^000000 guild, is ^0000FF" + GetGuildMaster(@GID) + "^000000.";
  46. mes "If anyone objects to that, raise your sword to honor yourself.";
  47. return;
  48. L_Startg2:
  49. mes "[ Ringing Voice ]";
  50. mes "Brave one... would you return to your honorable be?";
  51. next;
  52. menu "Return.",M_Enter,"Cancel.",-;
  53. return;
  54. M_Enter:
  55. if (getcharid(2) == GetCastleData(getarg(1)+".gat",1)) warp getarg(1)+".gat",getarg(2),getarg(3);
  56. return;
  57. }