dts_warper.txt 29 KB

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