dts_warper.txt 33 KB

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