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