disguiser.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. ===== eAthena Script =======================================
  2. = Disguiser Quesr
  3. ===== By ==================================================
  4. = PalasX (httpcashaan.dontexist.org)
  5. ===== Current Version =====================================
  6. = v1.20 Unified
  7. ===== Compatible With =====================================
  8. = SVN 5690+ (getmonsterinfo)
  9. ===== Description =========================================
  10. = Baphomet disguises you if you find all his brothers.
  11. ===== Additional Comments =================================
  12. = Gotta find them all in order
  13. = Dynamically edits item 2614(eye of dullahan) with
  14. = setitemscript 2614,{bonus bdisguise,var_disguise;};
  15. = so your SVN better support it
  16. = Uses GetMonsterInfo to pull monster names from server, but
  17. = without sql_query, the mob IDs are set statically
  18. = Went crazy with the functions, the script is TINY now )
  19. ============================================================
  20. Places all of our NPCs
  21. prt_fild05.gat,277,226,5 script Dullahan Master 736,{
  22. callfunc PXC_Disguiser,0,quest_disguise;
  23. Close;
  24. }
  25. moc_fild10.gat,34,283,4 script Dullahan Master 736,{
  26. callfunc PXC_Disguiser,1,quest_disguise;
  27. close;
  28. }
  29. gef_fild00.gat,97,123,4 script Dullahan Master 736,{
  30. callfunc PXC_Disguiser,2,quest_disguise;
  31. close;
  32. }
  33. pay_fild01.gat,369,305,4 script Dullahan Master 736,{
  34. callfunc PXC_Disguiser,3,quest_disguise;
  35. close;
  36. }
  37. pay_fild03.gat,313,40,4 script Dullahan Master 736,{
  38. callfunc PXC_Disguiser,4,quest_disguise;
  39. close;
  40. }
  41. prt_fild08.gat,362,185,4 script Dullahan Master 736,{
  42. callfunc PXC_Disguiser,5,quest_disguise;
  43. close;
  44. edits the item used
  45. OnInit
  46. EDIT EYE OF DULLAHAN
  47. setitemscript 2614,{ bonus bdisguise,var_disguise; };
  48. end;
  49. }
  50. Function. Takes
  51. INTEGER, the order number that the bapho should be visited
  52. VARIABLE, the quest progression variable quest_disguise. may be changed if conflicts occur
  53. Puts
  54. Everything the NPC does. If you are at the right one, increase your order variable, if not, tell you where to head next on the list, when you finish, offer you to change ring properties.
  55. Whenever you dont have a ring, the script will push one on you in ALL instances (wrong NPC, right NPC, and done quest).
  56. function script PXC_Disguiser {
  57. setarray $@PXC_Next$[0],Culvert,Morocc,Geffen,Payon,Alberta,Izlude;
  58. if(var_disguise 1) goto Complete;
  59. if(getarg(0) == 5 && getarg(1) == 5) goto Last;
  60. if(getarg(0) == getarg(1)) goto Quest;
  61. NotMe
  62. mes [Baphomet];
  63. mes You must visit us in the proper order, as is Thor's will. Only then can we teach you the power of self-transmutation! Hunt around +$@PXC_Next$[getarg(1)]+ Next!;
  64. next;
  65. if(countitem(2614) 1) goto NeedRing;
  66. close;
  67. Cancel
  68. mes [Baphomet];
  69. mes Later.;
  70. close;
  71. Quest
  72. set quest_disguise,getarg(1)+1;
  73. mes [Baphomet];
  74. mes What am I doing here Find my brothers and you shall learn a great secret. It is one of the secret and ancient powers of Thor! Search around +$@PXC_Next$[getarg(1)]+ next!;
  75. next;
  76. if(countitem(2614) 1) goto NeedRing;
  77. close;
  78. NeedRing
  79. mes [Baphomet];
  80. mes You will need an Eye of Dullahan ring in order to obtain our secret. I can sell you one for 500,000 zeny. Simply bring me the money, and I'll offer it unto Thor in trade!;
  81. next;
  82. menu Buy Ring,-,Forget it!,Cancel;
  83. if(Zeny 500000) goto Cancel;
  84. set Zeny,Zeny-500000;
  85. getitem 2614,1;
  86. mes [Baphomet];
  87. mes Here is your ring.;
  88. next;
  89. goto Cancel;
  90. close;
  91. Last
  92. set quest_disguise,0;
  93. set var_disguise,1002;
  94. mes [Baphomet];
  95. mes I am the last of the six. Forgive us for giving such horrible directions, for we, too, are born from Thor's left eye, and have a terrible mean streak. Plus, being monsters, we're complete and total idiots with a shoddy A.I.! You shall now receive your reward.;
  96. next;
  97. goto Complete;
  98. Complete
  99. if(countitem(2614) 1) goto NeedRing;
  100. mes [Baphomet];
  101. mes Several millenia ago, Thor, the creator breathed life onto Midgar. In the beginning, all was well, but Thor's left eye proved to be the bane of our existance. As it's gaze set upon our land, all the monsters were let loose from within Thor's soul. Thor cast out his own eye, the only thing that could control the monsters. Your ring is made from his eye, and will give you the same powers.;
  102. next;
  103. mes [Baphomet];
  104. mes I can change your ring's mystical properties. Which monster spirit shall I weave into your ring;
  105. next;
  106. if(getarg(0)==0) callfunc PXC_DoMenu,1001,1125;
  107. if(getarg(0)==1) callfunc PXC_DoMenu,1126,1250;
  108. if(getarg(0)==2) callfunc PXC_DoMenu,1251,1375;
  109. if(getarg(0)==3) callfunc PXC_DoMenu,1376,1500;
  110. if(getarg(0)==4) callfunc PXC_DoMenu,1503,1625;
  111. if(getarg(0)==5) callfunc PXC_DoMenu,1626,1721;
  112. close;
  113. end;
  114. }
  115. FUNCTION.
  116. Takes
  117. integer, first monster ID to show
  118. integer, last monster ID to show
  119. function script PXC_DoMenu {
  120. set menu options to mob names, doing the first one manualy so we dont have an empty
  121. set $@menu$, getmonsterinfo(getarg(0),MOB_NAME);
  122. for(set $@i, getarg(0)+1; $@i = getarg(1); set $@i, $@i + 1){
  123. set $@menu$, $@menu$ + + getmonsterinfo($@i,MOB_NAME);
  124. }
  125. Fire our menu
  126. set @menu, select($@menu$);
  127. Zero deliminated (off-by-one errors sux0r!!!)
  128. set @menu, @menu-1;
  129. congratulate our user
  130. mes Behold, whilst you wear this ring, your form shall become that of a +getmonsterinfo(@menu + getarg(0),MOB_NAME);
  131. update our variable, with @menu offset addded to the base getarg(0)
  132. set var_disguise, @menu + getarg(0);
  133. close;
  134. end;
  135. }