dts_warper.txt 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. //===== eAthena Script =======================================
  2. //= Dungeon Teleport Service (Cool Event Corp and Kafra Corp competition)
  3. //===== By: ==================================================
  4. //= Evera
  5. //===== Current Version: =====================================
  6. //= 1.6
  7. //===== Compatible With: =====================================
  8. //= eAthena
  9. //===== Description: =========================================
  10. //= All-included file of Cool Event Corp NPCs with Kafra voting system.
  11. //===== Variables: ===========================================
  12. //=Server - $dtsvote = Variable for # of votes
  13. //= = Positive = Cool Corp winning
  14. //= = Negative = Kafra Corp winning
  15. //= $dts = Variable for DTS status
  16. //= = (1<<0) Election
  17. //= = (1<<1) Cool Corp Enabled
  18. //= = (1<<2) Kafra Enabled
  19. //= = (1<<3) No winner last election
  20. //= = (1<<4) Cool Corp won last election
  21. //= = (1<<5) Kafra won last election
  22. //= = (1<<6) Global Eligibility
  23. //=Character - dtseligible = eligibility status, 0 not eligible, 1 eligible, 2 eligible & voted, 3 tried for elig.
  24. //= = (By default, 1/4 chance of being able to vote. set to 1 after having random selection;
  25. //= = not used if $dtsglobalelig == 1)
  26. //=NPC Func. - arg(0) = 0, Cool Event Corp Voting Staff; 1, Kafra Corp Voting Staff
  27. //= arg(1) = Kafra only, Cool Corp script does not use. Changes illus for different sprites.
  28. //= = 0 = 4_f_kafra6 (yellow ponytail, classic outfit, spr 112)
  29. //= = 1 = 4_f_kafra5 (pink hair, classic outfit, spr 113)
  30. //= = 2 = 4_f_kafra4 (orange short hair, classic outfit, spr 114)
  31. //= = 3 = 4_f_kafra3 (brown bangs, classic outfit, spr 115)
  32. //= = 4 = 4_f_kafra2 (brown ponytale, classic outfit, spr 116)
  33. //= = 5 = 4_f_kafra1 (blue hair, classic outfit, spr 117)
  34. //= = 6 = 4_f_agentkafra (purp hair, black outfit, spr 859)
  35. //= = 7 = 4_f_kafra8 (blue hair, brown outfit, spr 860)
  36. //= = 8 = 4_f_kafra9 (red hair, brown outfit, spr 861)
  37. //=Temporary - @dtstemp = Temporary buffer, used in GM vote-fixing
  38. //= @dtstemps$ = Temporary buffer, like above, but a string.
  39. //= $@dtstempg = Temporary buffer, but global
  40. //===== Additional Comments: =================================
  41. //= Some unofficial translations, need Dungeon maps/coords/prices
  42. //= Also includes unofficial GM-enabled tweaking for script
  43. //= Includes NPCs in Cool Event Corp headquarters
  44. //= Also known as Zondaman in other languages (?)
  45. //= Pretty sure there are more locations I didn't find.
  46. //= Gives 1/4 chance of being eligible. Real way to be eligible is through
  47. //= President's Quest, which isn't yet released.
  48. //===== Version History: ====================================
  49. //= 1.6 Removed Duplicates [Silent]
  50. //= 1.5 Mushed voting varialbes into 1 variable. [Evera] (5/29/06)
  51. //= 1.4 Changed global variables to read from 3 global variables, updated names,
  52. //= fixed array bug [Evera] (5/28/06)
  53. //= 1.3 Removed selfconfig [Evera] (5/20/06)
  54. //= 1.2 Mushed some variables together, optimized a bit [Evera] (5/15/06)
  55. //= 1.1 SVN release, removed from major town (found true info after research),
  56. //= put more arg(2) parameters, fixed a few bugs [Evera] (5/11/06)
  57. //= 1.0 Initial release [Evera] (5/10/06)
  58. //============================================================
  59. //Yuno
  60. yuno.gat,153,191,4 script Cool Event Voting Staff#01 874,{
  61. callfunc "F_DTS_Warp",0,0;
  62. }
  63. yuno.gat,162,191,6 script Kafra Voting Staff#01 861,{
  64. callfunc "F_DTS_Warp",1,8;
  65. }
  66. //Lighthalzen
  67. lighthalzen.gat,154,60,6 script Cool Event Voting Staff#02 874,{
  68. callfunc "F_DTS_Warp",0,0;
  69. }
  70. //Prontera
  71. prontera.gat,147,125,4 script Cool Event Voting Staff#03 874,{
  72. callfunc "F_DTS_Warp",0,0;
  73. }
  74. prontera.gat,164,125,6 script Kafra Voting Staff#02 115,{
  75. callfunc "F_DTS_Warp",1,3;
  76. }
  77. //Cool Event Staff Headquarters NPCs
  78. //Kudiuu (Maintenance Guy)
  79. lhz_in02.gat,20,274,6 script Maintenance Guy 851,{
  80. mes "[Kudiuu]";
  81. mes "Holy...!";
  82. mes "Will this place";
  83. mes "ever get cleaned up?!";
  84. mes "*Cough cough* There's";
  85. mes "so much dust here, it's";
  86. mes "almost a health hazard!";
  87. close;
  88. }
  89. //Cesuna (Zondaman at desk)
  90. lhz_in02.gat,36,284,1 script Cool Event Staff#01 874,{
  91. mes "[Cesuna]";
  92. mes "Ack! I'm totally";
  93. mes "swamped with all this";
  94. mes "work! But I don't wannna";
  95. mes "do any of it. That's it!";
  96. mes "I totally need a break";
  97. next;
  98. mes "[Cesuna]";
  99. mes "*Sigh...*";
  100. mes "I wonder if Saera";
  101. mes "would ever consider";
  102. mes "going out with me?";
  103. mes "That would be nice~";
  104. close;
  105. }
  106. //Jellarin (Event planner)
  107. lhz_in02.gat,40,279,3 script Event Planner 833,{
  108. mes "[Jellarin]";
  109. mes "I don't like this.";
  110. mes "But I don't like that";
  111. mes "idea either. What will";
  112. mes "I do for a new event, eh?";
  113. next;
  114. mes "[Jellarin]";
  115. mes "I need something";
  116. mes "major, something that'll";
  117. mes "really shake up the world,";
  118. mes "something epochal, but what?";
  119. mes "Hey, do you have any ideas";
  120. close;
  121. }
  122. //Baoto (Cool Event Manager)
  123. lhz_in02.gat,110,283,5 script Cool Event Manager 853,{
  124. mes "[Baoto]";
  125. mes "Hmmm...";
  126. mes "The employees seem";
  127. mes "to be having too much";
  128. mes "fun amongst themselves";
  129. mes "recently. This does not";
  130. mes "bode well at all...";
  131. next;
  132. mes "[Baoto]";
  133. mes "It looks like I'm";
  134. mes "just going to have to";
  135. mes "start cracking that whip";
  136. mes "more often and much";
  137. mes "harder. Ha ha ha ha!";
  138. close;
  139. }
  140. //Saera (Secretary), contains GM menu
  141. lhz_in02.gat,36,274,3 script Cool Event Staff#02 831,{
  142. if($dts == 0){
  143. set $dts,$dts|(1<<0); //Sets NPCs to election mode if first time running
  144. set $dts,$dts|(1<<3);
  145. }
  146. mes "[Saera]";
  147. mes "Welcome to the";
  148. mes "temporary headquarters";
  149. mes "of Cool Event Corporation";
  150. mes "How may I help you today?";
  151. next;
  152. if(getgmlevel()>=40){ //Unofficial Text, GM-configurable settings for Event (GM level above 40 required)
  153. mes "[Saera]";
  154. mes "Why, I didn't even";
  155. mes "notice you there,";
  156. mes strcharinfo(0)+". What would";
  157. mes "you like to do today?";
  158. next;
  159. menu "Fix Vote",Lfixvote,
  160. "Set current teleporter",Lsettele,
  161. "Set last election winner",Lsetlast,
  162. "Manually run vote check",Lmanuvotecheck,
  163. "Normal menu please",-;
  164. mes "[Saera]";
  165. mes "Ok";
  166. next;
  167. }
  168. menu "Temporary headquarters?",Ltemphead,
  169. "Voting",Lvoting,"No, thanks.",Lnothx;
  170. Ltemphead:
  171. mes "[Saera]";
  172. mes "Our headquarters building";
  173. mes "is currently undergoing";
  174. mes "reconstruction, so we are";
  175. mes "basing our operations in";
  176. mes "this place for the meantime";
  177. close;
  178. Lvoting:
  179. mes "[Saera]";
  180. mes "Currently, Kafra Corporation";
  181. mes "and Cool Event Corp are working";
  182. mes "on a collaborative program that";
  183. mes "will provide direct teleport";
  184. mes "services to dungeons.";
  185. next;
  186. mes "[Saera]";
  187. mes "Due to technical issues,";
  188. mes "both companies cannot provide";
  189. mes "teleport services to the same";
  190. mes "dungeon. Therefore, we will be";
  191. mes "selecting our valued customers";
  192. mes "to choose the company they want.";
  193. next;
  194. if($dtsglobalelig == 1){ //Check for global elig
  195. mes "[Saera]"; //Unofficial text
  196. mes "Global eligiblity is enabled.";
  197. mes "Please vote at the nearest";
  198. mes "Voting Staff, please."; //End unofficial text
  199. close;
  200. }
  201. switch(dtseligible){
  202. case 0:
  203. set @randapply,rand(3); //Gives random(1/4) chance of being eligible
  204. switch(@randapply){ //Unofficial, until President's quest is completed
  205. case 0:
  206. case 1:
  207. case 2:
  208. mes "[Saera]";
  209. mes "Only a limited number of";
  210. mes "voters will be chosen, so";
  211. mes "you can check your voting";
  212. mes "eligibility at the headquarters";
  213. mes "of both participating companies.";
  214. mes "Thank you for your patronage~";
  215. set dtseligible,3;
  216. close;
  217. break;
  218. case 3:
  219. set dtseligible,1;
  220. break;
  221. default: break;
  222. }
  223. case 1:
  224. mes "[Saera]";
  225. mes "It appears that you are";
  226. mes "eligible to vote";
  227. mes "so please cast your";
  228. mes "vote at any Voting Staff";
  229. mes "representative. Thank you~";
  230. close;
  231. break;
  232. case 2:
  233. mes "[Saera]";
  234. mes "You are eligible to vote, but";
  235. mes "you have already voted. Thank";
  236. mes "you for your participation";
  237. close;
  238. break;
  239. case 3:
  240. default:
  241. mes "[Saera]";
  242. mes "Only a limited number of";
  243. mes "voters will be chosen, so";
  244. mes "you can check your voting";
  245. mes "eligibility at the headquarters";
  246. mes "of both participating companies.";
  247. mes "Thank you for your patronage~";
  248. close;
  249. break;
  250. }
  251. Lnothx:
  252. mes "[Saera]";
  253. mes "Thank you.";
  254. mes "Have a good day.";
  255. close;
  256. //GM options start
  257. Lfixvote: //Fix Vote
  258. mes "[Saera]";
  259. mes "Umm, sure..";
  260. if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
  261. if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
  262. if($dtsv == 0) mes "The vote is currently tied.";
  263. mes "To who would you like to give votes to?";
  264. next;
  265. menu "Kafra",-,"Cool Event Corp",Lfixcool;
  266. Lfixkafra: //Fixing vote for Kafra
  267. mes "[Saera]";
  268. if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
  269. if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes."; //multiplied by -1 because var is negative
  270. if($dtsv == 0) mes "The vote is currently tied.";
  271. mes "Please input the amount you wish to give to Kafra Corp";
  272. input @dtstemp; //Set buffer for Kafra vote
  273. next;
  274. mes "[Saera]";
  275. mes "You inputted "+@dtstemp+" for Kafra";
  276. if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
  277. if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
  278. if($dtsv == 0) mes "The vote is currently tied.";
  279. mes "Are you sure you would like to";
  280. mes "make these changes?";
  281. next;
  282. menu "Yes",-,"No",Lnothx;
  283. set $dtsv,$dtsv-@dtstemp; //Set buffer to Kafra vote
  284. mes "[Saera]";
  285. mes "Okay, you fixed the vote";
  286. mes "of Kafra Corp.";
  287. if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
  288. if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
  289. if($dtsv == 0) mes "The vote is currently tied.";
  290. close;
  291. Lfixcool: //Fixing vote for cool corp
  292. mes "[Saera]";
  293. mes "Let me find the papers...";
  294. if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
  295. if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
  296. if($dtsv == 0) mes "The vote is currently tied.";
  297. mes "Please input new vote for Cool Event Corp";
  298. input @dtstemp; //Set buffer for Cool vote
  299. next;
  300. mes "[Saera]";
  301. mes "You inputted "+@dtstemp+" for Cool Event Corp";
  302. if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
  303. if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
  304. if($dtsv == 0) mes "The vote is currently tied.";
  305. mes "Are you sure you would like to";
  306. mes "make these changes?";
  307. next;
  308. menu "Yes",-,"No",Lnothx; //Confirmaiton
  309. set $dtsv,@dtsv+@dtstemp; //Set buffer to Cool vote
  310. mes "[Saera]";
  311. mes "Okay, you fixed the vote";
  312. mes "of Cool Event Corp.";
  313. if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
  314. if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
  315. if($dtsv == 0) mes "The vote is currently tied.";
  316. close;
  317. Lsettele: //Set current DTS tele
  318. mes "[Saera]";
  319. mes "Type Kafra for Kafra-enabled warp,";
  320. mes "Cool for Cool Event Corp-enabled";
  321. mes "warp ,Election for election mode,";
  322. mes "or Cancel to cancel.";
  323. if($dts&(1<<0)) mes "The election is currently in election mode.";
  324. if($dts&(1<<1)) mes "Cool Event Corp is currently the DTS warper.";
  325. if($dts&(1<<2)) mes "Kafra Corp is currently the DTS warper.";
  326. next;
  327. input @dtstemps$; //Typed in choices to prevent mistakes
  328. mes "Let me find the papers...";
  329. next;
  330. if(@dtstemps$ == "Election" || @dtstemps$ == "election"){
  331. if($dts&(1<<1)){
  332. set $dts,$dts&~(1<<1); //Removes previous winner
  333. set $dts,$dts|(1<<0); //Changes status to election
  334. }
  335. if($dts&(1<<2)){
  336. set $dts,$dts&~(1<<2);
  337. set $dts,$dts|(1<<0);
  338. }
  339. mes "[Saera]";
  340. mes "Set to election mode.";
  341. close;
  342. }
  343. if(@dtstemps$ == "Cool" || @dtstemps$ == "cool"){
  344. if($dts&(1<<0)){
  345. set $dts,$dts&~(1<<0);
  346. set $dts,$dts|(1<<1);
  347. }
  348. if($dts&(1<<2)){
  349. set $dts,$dts&~(1<<2);
  350. set $dts,$dts|(1<<1);
  351. }
  352. mes "[Saera]";
  353. mes "Cool Event Corp. is now the DTS warper.";
  354. close;
  355. }
  356. if(@dtstemps$ == "Kafra" || @dtstemps$ == "kafra"){
  357. if($dts&(1<<1)){
  358. set $dts,$dts&~(1<<1);
  359. set $dts,$dts|(1<<2);
  360. }
  361. if($dts&(1<<0)){
  362. set $dts,$dts&~(1<<0);
  363. set $dts,$dts|(1<<2);
  364. }
  365. mes "[Saera]";
  366. mes "Kafra Corp. is now the DTS warper.";
  367. close;
  368. }
  369. if(@dtstemps$ == "Cancel" || @dtstemps$ == "cancel") goto Lnothx;
  370. mes "[Saera]";
  371. mes "Please input a correct name for the election";
  372. next;
  373. goto Lsettele;
  374. Lsetlast: //Set last winner
  375. mes "[Saera]";
  376. mes "Type Kafra for election records to show Kafra,";
  377. mes "Cool for Cool for election records to show Cool Event Corp,";
  378. mes "None for no winner in election records,";
  379. mes "or Cancel to cancel.";
  380. if($dts&(1<<3)) mes "There was no previous winner";
  381. if($dts&(1<<4)) mes "Cool Event Corp was the last winner";
  382. if($dts&(1<<5)) mes "Kafra Corp was the last winner";
  383. next;
  384. input @dtstemps$;
  385. mes "[Saera]";
  386. mes "Let me find the papers...";
  387. next;
  388. if(@dtstemps$ == "None" || @dtstemps$ == "none"){
  389. if($dts&(1<<4)){
  390. set $dts,$dts&~(1<<4); //removes last winner
  391. set $dts,$dts|(1<<3); //sets current last winner
  392. }
  393. if($dts&(1<<5)){
  394. set $dts,$dts&~(1<<5);
  395. set $dts,$dts|(1<<3);
  396. }
  397. mes "[Saera]";
  398. mes "Set records to show no previous winner.";
  399. close;
  400. }
  401. if(@dtstemps$ == "Cool" || @dtstemps$ == "cool"){
  402. if($dts&(1<<3)){
  403. set $dts,$dts&~(1<<3);
  404. set $dts,$dts|(1<<4);
  405. }
  406. if($dts&(1<<5)){
  407. set $dts,$dts&~(1<<5);
  408. set $dts,$dts|(1<<4);
  409. }
  410. mes "[Saera]";
  411. mes "Cool Event Corp. is now the previous winner.";
  412. close;
  413. }
  414. if(@dtstemps$ == "Kafra" || @dtstemps$ == "kafra"){
  415. if($dts&(1<<3)){
  416. set $dts,$dts&~(1<<3);
  417. set $dts,$dts|(1<<5);
  418. }
  419. if($dts&(1<<4)){
  420. set $dts,$dts&~(1<<4);
  421. set $dts,$dts|(1<<5);
  422. }
  423. mes "[Saera]";
  424. mes "Kafra Corp. is now the previous winner.";
  425. close;
  426. }
  427. if(@dtstemps$ == "Cancel" || @dtstemps$ == "cancel") goto Lnothx;
  428. mes "[Saera]";
  429. mes "Please input a correct name";
  430. mes "for previous winner";
  431. next;
  432. goto Lsetlast;
  433. Lmanuvotecheck:
  434. mes "[Saera]";
  435. mes "Are you sure you would like to run";
  436. mes "the vote check again?";
  437. next;
  438. menu "Yes",Lmanuvoteyes,"No",Lnothx;
  439. Lmanuvoteyes:
  440. if($dtsv == 0){
  441. set $@dtstemp,rand(1,2);
  442. if($@dtstemp == 1) set $dtsv,$dtsv+100;
  443. else set $dtsv,$dtsv-100;
  444. }
  445. if($dtsv > 0){
  446. if($dts&(1<<3)) set $dts,$dts&~(1<<3); //removes last winner varialbes
  447. if($dts&(1<<4)) set $dts,$dts&~(1<<4);
  448. if($dts&(1<<5)) set $dts,$dts&~(1<<5);
  449. if($dts&(1<<0)){
  450. set $dts,$dts&~(1<<0); //removes winner variable
  451. set $dts,$dts|(1<<1); //sets last winner varialbe
  452. set $dts,$dts|(1<<3); //sets current winner variable
  453. }
  454. if($dts&(1<<1)) set $dts,$dts|(1<<4);
  455. if($dts&(1<<2)){
  456. set $dts,$dts&~(1<<2);
  457. set $dts,$dts|(1<<1);
  458. set $dts,$dts|(1<<5);
  459. }
  460. set $dtsv,0;
  461. }
  462. else{
  463. if($dts&(1<<3)) set $dts,$dts&~(1<<3);
  464. if($dts&(1<<4)) set $dts,$dts&~(1<<4);
  465. if($dts&(1<<5)) set $dts,$dts&~(1<<5);
  466. if($dts&(1<<0)){
  467. set $dts,$dts&~(1<<0);
  468. set $dts,$dts|(1<<2);
  469. set $dts,$dts|(1<<3);
  470. }
  471. if($dts&(1<<1)){
  472. set $dts,$dts&~(1<<2);
  473. set $dts,$dts|(1<<2);
  474. set $dts,$dts|(1<<4);
  475. }
  476. if($dts&(1<<2)) set $dts,$dts|(1<<5);
  477. set $dtsv,0;
  478. }
  479. mes "[Saera]";
  480. mes "Vote check run again.";
  481. if($dts&(1<<0)) mes "The election is currently in election mode.";
  482. if($dts&(1<<1)) mes "Cool Event Corp is currently the DTS warper.";
  483. if($dts&(1<<2)) mes "Kafra Corp is currently the DTS warper.";
  484. close;
  485. }
  486. //Function for Voting Staff NPC
  487. function script F_DTS_Warp {
  488. if($dts == 0){ //Sets NPCs to election mode if first time running
  489. set $dts,$dts|(1<<0);
  490. set $dts,$dts|(1<<3);
  491. }
  492. if(dtseligible == 0){ //Gives random(1/4) chance of being eligible
  493. set @randapply,rand(3); //Unofficial, until President's quest is finished
  494. if(@randapply == 0) set dtseligible,1;
  495. }
  496. switch(getarg(0)){
  497. case 0:
  498. cutin "zonda_01",2;
  499. mes "[Cool Event Corp. Voting Staff]";
  500. mes "Hello! Don't forget to make";
  501. mes "your voice be heard and make";
  502. mes "sure you vote in the elections";
  503. mes "between Cool Event Corp. and";
  504. mes "Kafra Corporation for control of";
  505. mes "the Dungeon Teleport Service!";
  506. break;
  507. case 1:
  508. switch(getarg(1)){
  509. case 0: cutin "kafra_06",2; break; //Finding arguments to find which illust to use
  510. case 1: cutin "kafra_05",2; break; //Used Red hair "kafra_09" for black outfit kafra
  511. case 2: cutin "kafra_04",2; break; //because I couldn't find a suitable illust
  512. case 3: cutin "kafra_03",2; break;
  513. case 4: cutin "kafra_02",2; break;
  514. case 5: cutin "kafra_01",2; break;
  515. case 6: cutin "kafra_09",2; break;
  516. case 7: cutin "kafra_08",2; break;
  517. case 8: cutin "kafra_09",2; break;
  518. default: cutin "kafra_09",2; break;
  519. }
  520. mes "[Kafra Voting Staff]";
  521. mes "Greetings, adventurer.";
  522. mes "As you may be aware, we";
  523. mes "are holding an election to";
  524. mes "provide the Dungeon Teleport";
  525. mes "Service. How may I help you?";
  526. break;
  527. }
  528. next;
  529. menu "Reason for Election",Lelection,"Cast a Vote",Lvote,
  530. "Use Teleport Service",Lteleport,"Cancel",Lcancel;
  531. Lelection: //Reason for election explanation
  532. switch(getarg(0)){
  533. case 0:
  534. mes "[Cool Event Corp. Voting Staff]";
  535. mes "Cool Event Corp. has been";
  536. mes "planning to provide a new";
  537. mes "Dungeon Teleport Service to";
  538. mes "its customers, a service not";
  539. mes "already provided by the Kafra";
  540. mes "Corporation. However...";
  541. next;
  542. mes "[Cool Event Corp. Voting Staff]";
  543. mes "Kafra Corporation, which";
  544. mes "already monopolizes the";
  545. mes "public teleportation market,";
  546. mes "actually also had plans to";
  547. mes "provide a similar service.";
  548. next;
  549. mes "[Cool Event Corp. Voting Staff]";
  550. mes "Because of technological";
  551. mes "limitations, only one company";
  552. mes "can be chosen as the provider";
  553. mes "of this Dungeon Teleport Service.";
  554. mes "Hence, we will let the customers";
  555. mes "decide through these elections.";
  556. next;
  557. mes "[Cool Event Corp. Voting Staff]";
  558. mes "Multiple elections will be";
  559. mes "held so that our customers";
  560. mes "can test out the special services";
  561. mes "of each company for themselves.";
  562. mes "However, keep in mind that you";
  563. mes "must be eligible in order to vote.";
  564. next;
  565. mes "[Cool Event Corp. Voting Staff]";
  566. mes "For voter eligibility";
  567. mes "details, please visit our";
  568. mes "headquarters in the city of";
  569. mes "Lighthalzen located in the";
  570. mes "Schwaltzvalt Republic.";
  571. mes "Thank you for your time.";
  572. break;
  573. case 1:
  574. mes "[Kafra Voting Staff]";
  575. mes "Cool Event Corp and the";
  576. mes "Kafra Corporation have both";
  577. mes "been planning to provide a";
  578. mes "Teleport Service to dungeons.";
  579. next;
  580. mes "[Kafra Voting Staff]";
  581. mes "But due to technological";
  582. mes "limitations, only one company";
  583. mes "can serve as provider for this";
  584. mes "Dungeon Teleport Service at a";
  585. mes "time. There, both companies have";
  586. mes "agreed to hold special elections";
  587. next;
  588. mes "[Kafra Voting Staff]";
  589. mes "Each company has its own";
  590. mes "policies and guarantees in";
  591. mes "regards to the Dungeon Teleport";
  592. mes "Service, and in this election, the";
  593. mes "customers will ultimately decide";
  594. mes "and choose what's best for them.";
  595. next;
  596. mes "[Kafra Voting Staff]";
  597. mes "For now, the Dungeon";
  598. mes "Teleport Service will be";
  599. mes "provided in a series of trial";
  600. mes "periods. This way, customers can";
  601. mes "see the benefits of both companies";
  602. mes "before making the final decision";
  603. next;
  604. mes "[Kafra Voting Staff]";
  605. mes "If you are qualified,";
  606. mes "please vote in each election";
  607. mes "to decide which company will";
  608. mes "provide the Dungeon Teleport";
  609. mes "Service for the next trial period.";
  610. mes "Thank you for your support~";
  611. break;
  612. }
  613. goto Lend;
  614. Lvote: //If you clicked you wanted to vote
  615. if(dtseligible == 1 || $dts&(1<<6)) goto Leligible; //Var check if eligible or global eligibility
  616. Lnoteligible: //Text displayed if wanted to vote, but not eligible/voted
  617. switch(getarg(0)){
  618. case 0:
  619. mes "[Cool Event Corp. Voting Staff]";
  620. mes "I'm sorry, but you are not";
  621. mes "eligible to vote at this time.";
  622. mes "Please visit our headquarters";
  623. mes "in Lighthalzen for information";
  624. mes "related to acquiring voting";
  625. mes "rights. Thank you for your time.";
  626. break;
  627. case 1:
  628. mes "[Kafra Voting Staff]";
  629. mes "Oh, I'm so sorry, but you";
  630. mes "are currently not qualified to";
  631. mes "vote. For voting qualification";
  632. mes "information, please visit the";
  633. mes "Al De Baran Kafra Headquarters.";
  634. mes "Thank you and have a nice day.";
  635. break;
  636. }
  637. goto Lend;
  638. Leligible: //Text displayed if eligible to vote
  639. if(dtseligible == 3 || dtseligible == 2) goto Lnoteligible; //Var check if voted
  640. switch(getarg(0)){
  641. case 0:
  642. mes "[Cool Event Corp. Voting Staff]"; //Unofficial text
  643. mes "Checking your credentials, you";
  644. mes "are able to vote for the";
  645. mes "Dungeon Teleport Service";
  646. mes "elections. Who would you like";
  647. mes "to vote for?";
  648. break;
  649. case 1:
  650. mes "[Kafra Voting Staff]";
  651. mes "It appears that you qualify";
  652. mes "to vote for the Dungeon";
  653. mes "Teleport Service elections.";
  654. mes "Who would you like to vote for"; //End Unofficial text
  655. break;
  656. }
  657. next;
  658. menu "Cool Event Corp.",Lvotecool,"Kafra Corp.",Lvotekafra;
  659. Lvotecool:
  660. set $dtsv,$dtsv+1; //Adds 1 to cool count
  661. set dtseligible,2; //Sets var so that you can't vote over and over
  662. switch(getarg(0)){
  663. case 0:
  664. mes "[Cool Event Corp. Voting Staff]";
  665. mes "Thank you for voting for us.";
  666. mes "Your vote has been counted,";
  667. mes "and we appreciate your input";
  668. mes "Thank you and have a good day.";
  669. break;
  670. case 1:
  671. mes "[Kafra Voting Staff]";
  672. mes "We thank you for your vote.";
  673. mes "Your opinion matters very much";
  674. mes "and has been counted for Cool";
  675. mes "Event Corp.";
  676. break;
  677. }
  678. goto Lend;
  679. Lvotekafra:
  680. setd $dtsv,$dtsv-1; //Adds 1 to kafra count
  681. set dtseligible,2; //Sets var to prevent cheating
  682. switch(getarg(0)){
  683. case 0:
  684. mes "[Cool Event Corp. Voting Staff]"; //Unofficial Text
  685. mes "Thank you for your opinion.";
  686. mes "Your vote for Kafra corp.";
  687. mes "has been counted. Thank";
  688. mes "you and have a good day.";
  689. break;
  690. case 1:
  691. mes "[Kafra Voting Staff]";
  692. mes "Your vote for us has been";
  693. mes "counted. We thank you very";
  694. mes "much for your input, and";
  695. mes "we hope that we meet your";
  696. mes "adventuring needs and";
  697. mes "standards of excellence.";
  698. break;
  699. }
  700. goto Lend; //End Unofficial text
  701. Lteleport: //Selected Teleport
  702. switch(getarg(0)){
  703. case 0:
  704. if($dts&(1<<0)){
  705. mes "[Cool Event Corp. Voting Staff]";
  706. mes "I'm sorry, but the";
  707. mes "Dungeon Teleport Service is";
  708. mes "unavailable during elections";
  709. mes "and will be reactivated after the";
  710. mes "election results are announced.";
  711. mes "Thank you and have a nice day.";
  712. goto Lend;
  713. }
  714. if($dts&(1<<1)) goto Lteleenabled;
  715. mes "[Cool Event Corp. Voting Staff]"; //Text if Kafra won DTS elect.
  716. mes "I'm sorry, but Cool Event";
  717. mes "Corp. does not currently offer";
  718. mes "the Dungeon Teleport Service";
  719. mes "due to the results of the last";
  720. mes "election. Please vote for us";
  721. mes "next time, alright? Good day~";
  722. break;
  723. case 1:
  724. if($dts&(1<<0)){
  725. mes "[Kafra Voting Staff]";
  726. mes "Sorry, but the elections for";
  727. mes "which Dungeon Teleport System";
  728. mes "to use is currently going on";
  729. mes "right now. We are unable to";
  730. mes "vote until results are announced";
  731. goto Lend;
  732. }
  733. if($dts&(1<<2)) goto Lteleenabled;
  734. mes "[Kafra Voting Staff]";
  735. mes "We're sorry, but Kafra Corp";
  736. mes "doesn't currently offer the";
  737. mes "Dungeon Teleport System due";
  738. mes "to last election's results,";
  739. mes "Please vote for Kafra Corp";
  740. mes "next time~";
  741. break;
  742. }
  743. goto Lend;
  744. Lteleenabled: //Shows DTS tele selections
  745. cleararray @dtswarpmap$[0],"",getarraysize(@dtswarpmap$);
  746. cleararray @dtswarp$[0],"",getarraysize(@dtswarp$);
  747. switch(getarg(0)){
  748. case 0:
  749. mes "[Cool Event Corp. Voting Staff]";
  750. mes "Please remember that we";
  751. mes "cannot accept Free Warp Tickets";
  752. mes "or award Special Reserve Points";
  753. mes "for this service. Now, please";
  754. mes "choose your destination.";
  755. setarray @dtswarpmap$[0],"Bailand, Level 4","Clock Tower, Basement 3";
  756. setarray @dtswarp$[0],@dtswarpmap$[0]+" -> 4,000z",
  757. @dtswarpmap$[1]+" -> 4,000z","Cancel";
  758. if($dts&(1<<4)){
  759. set @dtswarpmap$[2],"Glastheim Entrance";
  760. setarray @dtswarp$[2],@dtswarpmap$[2]+" -> 4,000z","Cancel";
  761. }
  762. break;
  763. case 1:
  764. mes "[Kafra Voting Staff]";
  765. mes "Thank you for choosing the";
  766. mes "Dungeon Teleport Service";
  767. mes "Please keep in mind that the";
  768. mes "Free Warp Tickets and Kafra";
  769. mes "Special Reserve Points do not";
  770. mes "apply in this special service.";
  771. setarray @dtswarpmap$[0],"Toy Factory, Level 2","Clock Tower, Level 3";
  772. setarray @dtswarp$[0],@dtswarpmap$[0]+" -> 4,000z",
  773. @dtswarpmap$[1]+" -> 4,000z","Cancel";
  774. if($dts&(1<<5)){
  775. set @dtswarpmap$[2],"Lava Dungeon, Level 2";
  776. setarray @dtswarp$[2],@dtswarpmap$[2]+" -> 4,000z","Cancel";
  777. }
  778. break;
  779. }
  780. next;
  781. switch(select(@dtswarp$[0],@dtswarp$[1],@dtswarp$[2],@dtswarp$[3])){
  782. case 1:
  783. set @num, 0;
  784. break;
  785. case 2:
  786. set @num, 1;
  787. break;
  788. case 3:
  789. set @num, 2;
  790. break;
  791. case 4:
  792. set @num, 3;
  793. break;
  794. }
  795. Lwarp:
  796. if (@dtswarp$[@num] == "Cancel") goto Lcancel;
  797. if (Zeny<4000) goto Lnomoney;
  798. set Zeny, Zeny-@dtswarpcost[@num];
  799. if (@dtswarpmap$[@num] == "Toy Factory, Level 2") warp "xmas_dun02.gat",130,123;
  800. //Maps to warp to
  801. if (@dtswarpmap$[@num] == "Clock Tower, Level 3") warp "alde_dun03.gat",265,22;
  802. if (@dtswarpmap$[@num] == "Lava Dungeon, Level 2") warp "mag_dun02.gat",47,40;
  803. if (@dtswarpmap$[@num] == "Bailand, Level 4") warp "iz_dun03.gat",32,63;
  804. if (@dtswarpmap$[@num] == "Clock Tower, Basement 3") warp "alde_dun03.gat",277,178;
  805. if (@dtswarpmap$[@num] == "Glastheim Entrance") warp "glast_01.gat",375,304;
  806. cutin "", 255;
  807. end;
  808. Lnomoney:
  809. switch(getarg(0)){
  810. case 0:
  811. mes "[Cool Event Corp. Voting Staff]"; //Unofficial Text
  812. mes "Umm, apparently you don't have";
  813. mes "adequate funds for your";
  814. mes "selected warp. Please check";
  815. mes "that you have the correct amount";
  816. mes "of money, and try again later";
  817. break;
  818. case 1:
  819. mes "[Kafra Voting Staff]";
  820. mes "It appears as if you don't";
  821. mes "have enough zeny for the warp";
  822. mes "Please check your funds and";
  823. mes "try again.";
  824. break;
  825. }
  826. goto Lend; //End unofficial text
  827. Lcancel: //Selected Cancel on first menu
  828. switch(getarg(0)){
  829. case 0:
  830. mes "[Cool Event Corp. Voting Staff]";
  831. mes "Cool Event Corp. is always";
  832. mes "working to make sure that";
  833. mes "not only are our customers";
  834. mes "satisfied, but that we also";
  835. mes "exceed your utmost standards.";
  836. mes "Thank you and have a good day.";
  837. break;
  838. case 1:
  839. mes "[Kafra Voting Staff]";
  840. mes "We, here at Kafra Corporation,";
  841. mes "are alwyas endeavoring to provide";
  842. mes "you with the best services. We hope";
  843. mes "that we meet your adventuring needs";
  844. mes "and the standards of excellence.";
  845. break;
  846. }
  847. goto Lend;
  848. Lend:
  849. close2;
  850. cutin "", 255;
  851. end;
  852. }
  853. //Elections administration NPC (hidden)
  854. - script DTS_Admin -1,{
  855. On000100: //Works only at 1am on sunday
  856. if($dtsv == 0){ //If tied, gives random side 100 votes
  857. set $@dtstemp,rand(1,2);
  858. if($@dtstemp == 1) set $dtsv,$dtsv+100;
  859. else set $dtsv,$dtsv-100;
  860. }
  861. if($dtsv > 0){
  862. if($dts&(1<<3)) set $dts,$dts&~(1<<3);
  863. if($dts&(1<<4)) set $dts,$dts&~(1<<4);
  864. if($dts&(1<<5)) set $dts,$dts&~(1<<5);
  865. if($dts&(1<<0)){
  866. set $dts,$dts&~(1<<0);
  867. set $dts,$dts|(1<<1);
  868. set $dts,$dts|(1<<3);
  869. }
  870. if($dts&(1<<1)) set $dts,$dts|(1<<4);
  871. if($dts&(1<<2)){
  872. set $dts,$dts&~(1<<2);
  873. set $dts,$dts|(1<<1);
  874. set $dts,$dts|(1<<5);
  875. }
  876. set $dtsv,0;
  877. }
  878. else{
  879. if($dts&(1<<3)) set $dts,$dts&~(1<<3);
  880. if($dts&(1<<4)) set $dts,$dts&~(1<<4);
  881. if($dts&(1<<5)) set $dts,$dts&~(1<<5);
  882. if($dts&(1<<0)){
  883. set $dts,$dts&~(1<<0);
  884. set $dts,$dts|(1<<2);
  885. set $dts,$dts|(1<<3);
  886. }
  887. if($dts&(1<<1)){
  888. set $dts,$dts&~(1<<2);
  889. set $dts,$dts|(1<<2);
  890. set $dts,$dts|(1<<4);
  891. }
  892. if($dts&(1<<2)) set $dts,$dts|(1<<5);
  893. set $dtsv,0;
  894. }
  895. end;
  896. }