From 554942bb8205a0b2b3f136242c6824b3d7285c0e Mon Sep 17 00:00:00 2001 From: evera Date: Mon, 14 Aug 2006 08:13:21 +0000 Subject: updated dts_warper.txt to use MISC_QUEST|128 instead of dtseligible,2 Added that to garbage cleaning Added garbage cleaning func call to dts_warper.txt (only makes sense) And I did this at 1am, so look for bugs before I merge to stable, and report on forums. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8266 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/Changelog.txt | 3 +++ npc/other/Global_Functions.txt | 3 +++ npc/other/dts_warper.txt | 22 ++++++++++++++-------- npc/quest_variables.txt | 12 ++++++++++-- 4 files changed, 30 insertions(+), 10 deletions(-) (limited to 'npc') diff --git a/npc/Changelog.txt b/npc/Changelog.txt index de1c19a6f..3325c4cc8 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -36,6 +36,9 @@ Playtester Date Added ====== 08/14 + * Changed DTS warper to use MISC_QUEST|128 instead of dtseligible,2. [Evera] + - May be some bugs, it's 1am @_@, look through it before trunk merge. [Evera] + * Added Garbage clearing for dtseligible,2 -> MISC_QUEST|128, and added that func call to DTS warper. [Evera] * Added (finally) the official Inn Maid of Rachel. Save and warp points are official aswell, thanks to RockmanEXE [erKURITA] * Added (finally) the Garrison quest npc. Item requirements are the official ones, diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt index 8ffb48686..1b54e5059 100644 --- a/npc/other/Global_Functions.txt +++ b/npc/other/Global_Functions.txt @@ -25,6 +25,7 @@ //= 2.01 Added $talk to F_ClearGarbage [Evera] //= 2.02 Added $dtsglobalelig and $dts|(1<<6) to F_ClearGarbage [Evera] //= 2.03 Added Gunslinger vars to F_ClearJobVar [Lupus] +//= 2.04 Added dtseligible 3 (becomes MISC_QUEST|128) to F_ClearGarbage [Evera] //============================================================ @@ -69,6 +70,8 @@ function script F_ClearJobVar { function script F_ClearGarbage { // Clear outdated global VARS + if(dtseligible == 2) set MISC_QUEST,MISC_QUEST|128; + if(dtseligible == 3) set dtseligible,0; if($talk) set $talk,0; if($dtsglobalelig) set $dtsglobalelig,0; if($dts&(1<<6)) set $dts,$dts&~(1<<6); diff --git a/npc/other/dts_warper.txt b/npc/other/dts_warper.txt index 005c4e69f..9d9b3a339 100644 --- a/npc/other/dts_warper.txt +++ b/npc/other/dts_warper.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Evera //===== Current Version: ===================================== -//= 2.0 +//= 2.2 //===== Compatible With: ===================================== //= eAthena //===== Description: ========================================= @@ -23,7 +23,8 @@ //= = (1<<3) No winner last election //= = (1<<4) Cool Corp won last election //= = (1<<5) Kafra won last election -//=Character - dtseligible = eligibility status, 0 not eligible yet, 1 eligible, 2 eligible & voted. +//=Character - dtseligible = eligibility status, 0 not eligible yet, 1 eligible. 0 Also used when MISC_QUEST|128, and signifies that person already voted. +//= MISC_QUEST = |128 = eligible and voted. //=NPC Func. - arg(0) = 0, Cool Event Corp Voting Staff; 1, Kafra Corp Voting Staff //= arg(1) = Kafra only, Cool Corp script does not use. Changes illus for different sprites. //= = 0 = 4_f_kafra6 (yellow ponytail, classic outfit, spr 112) @@ -60,6 +61,8 @@ //= 1.9 Removed global eligibility option [Evera] //= 2.0 Fixed zeny bug [Evera] //= 2.1 Fixed headers with and updated with newer information [Evera] +//= 2.2 Changed dtseligible 2 to MISC_QUEST|128, to clean up variable usage. [Evera] +//= Also added F_ClearGarbage function to the scripts. [Evera] //============================================================ //Yuno @@ -146,6 +149,7 @@ lhz_in02.gat,110,283,5 script Cool Event Manager 853,{ } //Saera (Secretary), contains GM menu lhz_in02.gat,36,274,3 script Cool Event Staff#02 831,{ + callfunc "F_ClearGarbage"; //Clear outdated, unused variables if($dts == 0){ set $dts,$dts|(1<<0); //Sets NPCs to election mode if first time running set $dts,$dts|(1<<3); @@ -200,7 +204,7 @@ lhz_in02.gat,36,274,3 script Cool Event Staff#02 831,{ mes "selecting our valued customers"; mes "to choose the company they want."; next; - if(dtseligible == 0 && baselevel >= 60 || dtseligible == 3 && baselevel >= 60) set dtseligible,1; //Clear previous var of dtseligible,3 being tried for eligibility already + if(dtseligible == 0 && baselevel >= 60 && MISC_QUEST&128 == 0 || dtseligible == 3 && baselevel >= 60 && MISC_QUEST&128 == 0) set dtseligible,1; //Clear previous var of dtseligible,3 being tried for eligibility already switch(dtseligible){ default: mes "[Saera]"; @@ -210,7 +214,6 @@ lhz_in02.gat,36,274,3 script Cool Event Staff#02 831,{ mes "eligibility at the headquarters"; mes "of both participating companies."; mes "Thank you for your patronage~"; - set dtseligible,3; close; break; case 1: @@ -475,11 +478,12 @@ lhz_in02.gat,36,274,3 script Cool Event Staff#02 831,{ //Function for Voting Staff NPC function script F_DTS_Warp { + callfunc "F_ClearGarbage"; //Clear outdated, unused variables if($dts == 0){ //Sets NPCs to election mode if first time running set $dts,$dts|(1<<0); set $dts,$dts|(1<<3); } - if(dtseligible == 0 && baselevel >= 60 || dtseligible == 3 && baselevel >= 60) set dtseligible,1; //Clear previous var of dtseligible,3 being tried for eligibility already + if(dtseligible == 0 && baselevel >= 60 && MISC_QUEST&128 == 0 || dtseligible == 3 && baselevel >= 60 && MISC_QUEST&128 == 0) set dtseligible,1; //Clear previous var of dtseligible,3 being tried for eligibility already switch(getarg(0)){ case 0: cutin "zonda_01",2; @@ -627,7 +631,7 @@ function script F_DTS_Warp { goto Lend; Leligible: //Text displayed if eligible to vote - if(dtseligible == 2) goto Lnoteligible; //Var check if voted + if(MISC_QUEST&128) goto Lnoteligible; //Var check if voted switch(getarg(0)){ case 0: mes "[Cool Event Corp. Voting Staff]"; //Unofficial text @@ -650,7 +654,8 @@ function script F_DTS_Warp { Lvotecool: set $dtsv,$dtsv+1; //Adds 1 to cool count - set dtseligible,2; //Sets var so that you can't vote over and over + set MISC_QUEST,MISC_QUEST|128; //Sets var so that you can't vote over and over + set dtseligible,0; switch(getarg(0)){ case 0: mes "[Cool Event Corp. Voting Staff]"; @@ -671,7 +676,8 @@ function script F_DTS_Warp { Lvotekafra: setd $dtsv,$dtsv-1; //Adds 1 to kafra count - set dtseligible,2; //Sets var to prevent cheating + set MISC_QUEST,MISC_QUEST|128; //Sets var to prevent cheating + set dtseligible,0; switch(getarg(0)){ case 0: mes "[Cool Event Corp. Voting Staff]"; //Unofficial Text diff --git a/npc/quest_variables.txt b/npc/quest_variables.txt index bdd1bec24..996d9267f 100644 --- a/npc/quest_variables.txt +++ b/npc/quest_variables.txt @@ -58,8 +58,16 @@ Info: Bio Ethics quest for homunculus skill for alchemists. This bit is for final part of quest. (completed or not.)[Evera] -How to set: set MISC_QUEST,MISC_QUEST | 64; -How to check: if(MISC_QUEST & 64){} +How to set: set MISC_QUEST,MISC_QUEST|64; +How to check: if(MISC_QUEST&64){} + +Quest: DTS Warper +Info: Not really a quest, but to + show if a person has + already voted. Cleaning + up the variables -.-;[Evera] +How to set: set MISC_QUEST,MISC_QUEST|128; +How to check: if(MISC_QUEST&128){} Quest: ? Info: ? -- cgit v1.2.3-70-g09d2