repair.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. //===== rAthena Script =======================================
  2. //= Job Repairs
  3. //===== By: ==================================================
  4. //= Euphy
  5. //===== Current Version: =====================================
  6. //= 1.1
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= [Official Conversion]
  11. //= Removes potentially conflicting job data.
  12. //===== Additional Comments: =================================
  13. //= 1.0 First version.
  14. //= 1.1 Added GM management function. [Euphy]
  15. //= 2.0 Prontera castle map changed in ep16.1 [Capuche]
  16. //============================================================
  17. // Job Variables
  18. //============================================================
  19. /*
  20. rAthena -> official job variable conversion
  21. -------------------------------------------
  22. Knight: KNIGHT_Q -> job_knight_q
  23. Priest: PRIEST_Q -> job_priest_q
  24. Wizard: WIZ_Q -> job_wizard_q
  25. Blacksmith: BSMITH_Q -> job_black
  26. Assassin: ASSIN_Q -> job_assasin
  27. Hunter: HNTR_Q -> job_hunter
  28. Crusader: CRUS_Q -> job_crusader_q
  29. Monk: MONK_Q -> job_monk
  30. Sage: SAGE_Q -> job_sage_q
  31. Alchemist: ALCH_Q -> job_alchemist_q
  32. Rogue: ROGUE_Q -> job_rogue
  33. Bard: BARD_Q -> job_bard_q
  34. Dancer: DANC_Q -> job_dancer
  35. Rebirth: ADVJOB -> job_karma
  36. Rune Knight: job_rune_edq
  37. Arch Bishop: job_arch
  38. Warlock: job_wl
  39. Mechanic: job__mechanic -> job_mechanic
  40. Guillotine Cross: job_3rd_gc
  41. Ranger: job_ranger01
  42. Royal Guard: job_royal -> job_roy
  43. Sura: job_shu
  44. Sorcerer: job_soc
  45. Geneticist: job_gen
  46. Shadow Chaser: job_sha -> job_3rd_sc
  47. Minstrel: job_min
  48. Wanderer: job_wan
  49. Gunslinger: GUNS_Q -> hg_gun
  50. Ninja: NINJ_Q -> hg_nin
  51. Kagerou/Oboro: job_kagero
  52. Taekwon: TK_Q -> job_taekwon
  53. Star Gladiator: STGL_Q -> job_star
  54. Soul Linker: SOUL_Q -> job_linker
  55. Super Novice: SUPNOV_Q -> job_super
  56. Expanded Super Novice: EXSUPNOV_Q -> job_super2
  57. */
  58. // Main NPCs :: job_repair
  59. //============================================================
  60. prt_in,38,104,4 script Valerie 811,{
  61. if (checkweight(1201,1) == 0) {
  62. mes "I think you have too many items. Let's try it again after you take some out.";
  63. close;
  64. }
  65. if (MaxWeight - Weight < 1000) {
  66. mes "You're overweight with items so I don't think we can proceed any further. Challenge me after you've taken some items off.";
  67. close;
  68. }
  69. mes "[Valerie]";
  70. mes "I am Valerie; I help those with abnormalities. I am friends with Valkyrie.";
  71. next;
  72. mes "[Valerie]";
  73. mes "If both abnormalities disappear then we must start the test over from scratch. What would you like to do?";
  74. next;
  75. switch(select("I don't have any abnormalities:I think my body has some abnormalities")) {
  76. case 1:
  77. mes "[Valerie]";
  78. mes "That's a relief. Then please take care.";
  79. close;
  80. case 2:
  81. mes "[Valerie]";
  82. mes "Are you sure you want to intialize it and start over?";
  83. next;
  84. if(select("Nope:Yes, I want to start completely over") == 1) {
  85. mes "[Valerie]";
  86. mes "I understand. I'll see you next time";
  87. close;
  88. }
  89. mes "[Valerie]";
  90. mes "All items related to the existing conditions will disappear. Are you okay with this?";
  91. next;
  92. if(select("Nope:Yes, I want to start completely over.") == 1) {
  93. mes "[Valerie]";
  94. mes "I understand. I'll see you next time.";
  95. close;
  96. }
  97. mes "[Valerie]";
  98. mes "It seems that there are a sea of people who seemed to be cursed of not being able to get a significant other after going through with this. Are you still okay with this? ";
  99. next;
  100. if(select("Nope:I still want to intialize.") == 1) {
  101. mes "[Valerie]";
  102. mes "I understand. I will see you next time.";
  103. close;
  104. }
  105. mes "[Valerie]";
  106. mes "In extreme cases, some become crippled and can get ulcers. Do you still want to intilize former processes?";
  107. next;
  108. if(select("Nope:Please intilize the former processes") == 1) {
  109. mes "[Valerie]";
  110. mes "I understand. I will see you next time";
  111. close;
  112. }
  113. specialeffect2 EF_INVENOM;
  114. progressbar "0xffff00",3;
  115. // Warlock - quest items
  116. if (isequipped(2796) || isequipped(2797)) {
  117. mes "[Valerie]";
  118. mes "Please unequip the Magical Stone or Magical Stone Ring and try again.";
  119. close;
  120. }
  121. if (countitem(2796) || countitem(2797)) {
  122. if (isequipped(2796) || isequipped(2797)) {
  123. mes "[Valerie]";
  124. mes "Please talk to me after your replace all Magical Stones.";
  125. close;
  126. }
  127. setarray .@items[0], 2796, 2797, 6152, 6151; //Magical_Stone,Magical_Stone_,Glittering_Crystal,Peice_Of_Great_Bradium
  128. for(set .@i,0; .@i<4; set .@i,.@i+1) {
  129. if (countitem(.@items[.@i]))
  130. delitem .@items[.@i], countitem(.@items[.@i]);
  131. }
  132. mes "[Valerie]";
  133. mes "You're carrying something that is unnecessary. I will sort it out for you.";
  134. close;
  135. }
  136. // Baby and third job characters meet no further conditions.
  137. if (eaclass()&(EAJL_BABY|EAJL_THIRD)) {
  138. mes "[Valerie]";
  139. mes "I don't think you should have any further business with me.";
  140. close;
  141. }
  142. // Rebirth - variable
  143. if ((Class >= Job_Swordman && Class <= Job_Crusader2) && ADVJOB != 0) {
  144. set ADVJOB,0;
  145. mes "[Valerie]";
  146. mes "You're carrying big karma- You should erase it.";
  147. next;
  148. mes "[Valerie]";
  149. mes "Please talk to me again as there could be additional problems.";
  150. close;
  151. }
  152. // Second job - variable and quests
  153. // callsub L_Second, "<variable>", <quest>;
  154. if (Class == Job_Swordman) {
  155. callsub L_Second, "KNIGHT_Q", 9012;
  156. callsub L_Second, "CRUS_Q", 3015;
  157. } else if (Class == Job_Archer) {
  158. callsub L_Second, "HNTR_Q", 4013;
  159. callsub L_Second, "BARD_Q", 3004;
  160. callsub L_Second, "DANC_Q", 7006;
  161. } else if (Class == Job_Mage) {
  162. callsub L_Second, "WIZ_Q", 9018;
  163. callsub L_Second, "SAGE_Q", 2052;
  164. } else if (Class == Job_Merchant) {
  165. callsub L_Second, "BSMITH_Q", 2016;
  166. callsub L_Second, "ALCH_Q", 2040;
  167. } else if (Class == Job_Thief) {
  168. callsub L_Second, "ASSIN_Q", 8008;
  169. callsub L_Second, "ROGUE_Q", 2027;
  170. } else if (Class == Job_Acolyte) {
  171. callsub L_Second, "PRIEST_Q", 8016;
  172. callsub L_Second, "MONK_Q", 3032;
  173. }
  174. // Third job - variable and quests
  175. // callsub L_Third, "<variable>", <main quest>, <first quest>, <last quest>{, <additional quest>};
  176. if (BaseJob == Job_Assassin)
  177. callsub L_Third, "job_3rd_gc", 7100, 7091, 7116;
  178. else if (BaseJob == Job_Blacksmith)
  179. callsub L_Third, "job__mechanic", 10101, 10090, 10101;
  180. else if (BaseJob == Job_Hunter)
  181. callsub L_Third, "job_ranger01", 8262, 8254, 8262;
  182. else if (BaseJob == Job_Knight)
  183. callsub L_Third, "job_rune_edq", 3219, 3200, 3220;
  184. else if (BaseJob == Job_Priest)
  185. callsub L_Third, "job_arch", 2191, 2187, 2191;
  186. else if (BaseJob == Job_Wizard)
  187. callsub L_Third, "job_wl", 11112, 11106, 11112;
  188. else if (BaseJob == Job_Alchemist)
  189. callsub L_Third, "job_gen", 2223, 2209, 2217, 2223;
  190. else if (BaseJob == Job_Bard)
  191. callsub L_Third, "job_min", 11154, 11135, 11154;
  192. else if (BaseJob == Job_Crusader)
  193. callsub L_Third, "job_royal", 0, 12090, 12094;
  194. else if (BaseJob == Job_Dancer)
  195. callsub L_Third, "job_wan", 2222, 2218, 2222;
  196. else if (BaseJob == Job_Monk)
  197. callsub L_Third, "job_shu", 11158, 11155, 11158;
  198. else if (BaseJob == Job_Rogue)
  199. callsub L_Third, "job_sha", 7180, 7160, 7180;
  200. else if (BaseJob == Job_Sage)
  201. callsub L_Third, "job_soc", 12098, 12096, 12098;
  202. mes "[Valerie]";
  203. mes "I don't think you should have any further business with me.";
  204. close;
  205. }
  206. L_Second:
  207. if (getd(getarg(0)) != 0) {
  208. setd getarg(0),0;
  209. if (checkquest(getarg(1)) == 2)
  210. erasequest getarg(1);
  211. mes "[Valerie]";
  212. mes "I will help clear your problems for you that came from your former attempts.";
  213. next;
  214. mes "[Valerie]";
  215. mes "Please talk to me again as there could be additional problems.";
  216. close;
  217. } else
  218. return;
  219. L_Third:
  220. if (getd(getarg(0)) != 0) {
  221. setd getarg(0),0;
  222. if (getarg(1)) {
  223. if (checkquest(getarg(1)) == 2)
  224. erasequest getarg(1);
  225. }
  226. for(set .@i,getarg(2); .@i<=getarg(3); set .@i,.@i+1) {
  227. if (checkquest(.@i) > -1)
  228. erasequest .@i;
  229. }
  230. if (getarg(4,0)) {
  231. if (checkquest(getarg(4)) > -1)
  232. erasequest getarg(4);
  233. }
  234. mes "[Valerie]";
  235. mes "I will help clear your problems for you that came from your former attempts.";
  236. next;
  237. mes "[Valerie]";
  238. mes "Please talk to me again as there could be additional problems.";
  239. close;
  240. } else
  241. return;
  242. }
  243. - script Valerie#sign -1,{
  244. mes "^ff00ffI couldn't pay the office rent so I am temporarily relocating to the building across from the Prontera Refinery.^000000";
  245. mes " ";
  246. mes "^ff00ffValerie^000000";
  247. close;
  248. }
  249. in_moc_16,17,33,4 duplicate(Valerie#sign) Valerie#asn 837
  250. ein_in01,13,28,4 duplicate(Valerie#sign) Valerie#bls 837
  251. hu_in01,386,377,4 duplicate(Valerie#sign) Valerie#hnt 837
  252. prt_in,88,108,4 duplicate(Valerie#sign) Valerie#knt 837
  253. prt_church,19,36,4 duplicate(Valerie#sign) Valerie#prst 837
  254. gef_tower,110,30,4 duplicate(Valerie#sign) Valerie#wiz 837
  255. comodo,215,155,4 duplicate(Valerie#sign) Valerie#danc 837
  256. // prt_castle,45,167,4 duplicate(Valerie#sign) Valerie#cru 837
  257. prt_monk,59,253,4 duplicate(Valerie#sign) Valerie#mnk 837
  258. moc_ruins,90,104,4 duplicate(Valerie#sign) Valerie#rg 837
  259. yuno_in02,43,62,4 duplicate(Valerie#sign) Valerie#sag 837
  260. prt_church,103,86,4 duplicate(Valerie#sign) Valerie#arch 837
  261. que_job01,75,92,4 duplicate(Valerie#sign) Valerie#gc 837
  262. yuno,129,150,4 duplicate(Valerie#sign) Valerie#mech 837
  263. tur_dun01,159,40,4 duplicate(Valerie#sign) Valerie#ran 837
  264. prt_in,167,24,4 duplicate(Valerie#sign) Valerie#rk 837
  265. spl_in02,81,102,4 duplicate(Valerie#sign) Valerie#wl 837
  266. alde_alche,38,181,4 duplicate(Valerie#sign) Valerie#alche 837
  267. alberta,198,129,4 duplicate(Valerie#sign) Valerie#min 837
  268. in_rogue,376,104,4 duplicate(Valerie#sign) Valerie#sc 837
  269. ve_in,244,122,4 duplicate(Valerie#sign) Valerie#shu 837
  270. xmas,166,209,4 duplicate(Valerie#sign) Valerie#wan 837
  271. sec_in02,12,40,5 script Job Repair 57,1,1,{
  272. callfunc "F_GM_NPC";
  273. mes "Please input your password.";
  274. next;
  275. if (callfunc("F_GM_NPC","1854",1) == 1) {
  276. set job_arch,100;
  277. set job_3rd_gc,100;
  278. set job__mechanic,100;
  279. set job_ranger01,100;
  280. set job_rune_edq,100;
  281. set job_wl,100;
  282. set job_gen,100;
  283. set job_min,100;
  284. set job_royal,100;
  285. set job_sha,100;
  286. set job_soc,100;
  287. set job_shu,100;
  288. set job_wan,100;
  289. set KNIGHT_Q,100;
  290. set PRIEST_Q,100;
  291. set WIZ_Q,100;
  292. set BSMITH_Q,100;
  293. set ASSIN_Q,100;
  294. set HNTR_Q,100;
  295. set CRUS_Q,100;
  296. set MONK_Q,100;
  297. set SAGE_Q,100;
  298. set ALCH_Q,100;
  299. set ROGUE_Q,100;
  300. set BARD_Q,100;
  301. set DANC_Q,100;
  302. set ADVJOB,15;
  303. }
  304. close;
  305. }