diff options
author | evera <evera@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-30 00:21:02 +0000 |
---|---|---|
committer | evera <evera@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-30 00:21:02 +0000 |
commit | cf4023f83aa1e2f5ed3009f0e7d020e387d6ef57 (patch) | |
tree | 7f5d7c3cf8c18abc0662559e8a72eccbcc6c0968 /npc | |
parent | 56eca6dcc567639863d556564d0aeb7c0d21c8c6 (diff) | |
download | hercules-cf4023f83aa1e2f5ed3009f0e7d020e387d6ef57.tar.gz hercules-cf4023f83aa1e2f5ed3009f0e7d020e387d6ef57.tar.bz2 hercules-cf4023f83aa1e2f5ed3009f0e7d020e387d6ef57.tar.xz hercules-cf4023f83aa1e2f5ed3009f0e7d020e387d6ef57.zip |
dts_warper.txt
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6831 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc')
-rw-r--r-- | npc/Changelog.txt | 3 | ||||
-rw-r--r-- | npc/other/dts_warper.txt | 122 |
2 files changed, 65 insertions, 60 deletions
diff --git a/npc/Changelog.txt b/npc/Changelog.txt index e882868c7..dd023f141 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -24,12 +24,15 @@ Nexon * Adding in the new Abyss/Thanatos/Lighthalzen NPC's and optimizing them.
Evera
* Everything.
+ * Dungeon Teleport System
* Gathering iRO information and comparing them to eA scripts.
== Changelog ==
Date Added
======
+05/29
+ * Changed DTS warper vote count to use 1 variable. [Evera]
05/27
* Implemented a small quest in Einbroch and fixed the name of the [MasterOfMuppets]
spawning mobsters in Lighthalzen
diff --git a/npc/other/dts_warper.txt b/npc/other/dts_warper.txt index 6dbd2a925..b6fb0b7ad 100644 --- a/npc/other/dts_warper.txt +++ b/npc/other/dts_warper.txt @@ -3,15 +3,15 @@ //===== By: ==================================================
//= Evera
//===== Current Version: =====================================
-//= 1.4
+//= 1.5
//===== Compatible With: =====================================
//= eAthena
//===== Description: =========================================
//= All-included file of Cool Event Corp NPCs with Kafra voting system.
-//= Kafra DTS voting system must be implemented in Kafra to use!
//===== Variables: ===========================================
-//=Server - $dtscool = # of votes for Cool Corp
-//= $dtskafra = # of votes for Kafra
+//=Server - $dtsvote = Variable for # of votes
+//= = Positive = Cool Corp winning
+//= = Negative = Kafra Corp winning
//= $dts = Variable for DTS status
//= = (1<<0) Election
//= = (1<<1) Cool Corp Enabled
@@ -41,16 +41,16 @@ //= Some unofficial translations, need Dungeon maps/coords/prices
//= Also includes unofficial GM-enabled tweaking for script
//= Includes NPCs in Cool Event Corp headquarters
-//= Also known as Zondaman in other languages
+//= Also known as Zondaman in other languages (?)
//= Pretty sure there are more locations I didn't find.
-//= Uses random (1/4) chance of being eligible to vote. Real quest is that you can vote after doing
+//= Gives 1/4 chance of being eligible. Real way to be eligible is through
//= President's Quest, which isn't yet released.
-//= Default time to check votes is Sunday at 1:00. GM Configurable through Saera.
//===== Version History: ====================================
+//= 1.5 Mushed voting varialbes into 1 variable. [Evera] (5/29/06)
//= 1.4 Changed global variables to read from 3 global variables, updated names,
-//= fixed array bug [Evera]
-//= 1.3 Removed selfconfig [Evera]
-//= 1.2 Mushed some variables together, optimized a bit [Evera]
+//= fixed array bug [Evera] (5/28/06)
+//= 1.3 Removed selfconfig [Evera] (5/20/06)
+//= 1.2 Mushed some variables together, optimized a bit [Evera] (5/15/06)
//= 1.1 SVN release, removed from major town (found true info after research),
//= put more arg(2) parameters, fixed a few bugs [Evera] (5/11/06)
//= 1.0 Initial release [Evera] (5/10/06)
@@ -261,58 +261,64 @@ lhz_in02.gat,36,274,3 script Cool Event Staff 831,{ Lfixvote: //Fix Vote
mes "[Saera]";
mes "Umm, sure..";
- mes "Current Kafra vote: "+$dtskafra;
- mes "Current Cool Event Corp vote: "+$dtscool;
- mes "Which one would you like to change?";
+ if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
+ if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
+ if($dtsv == 0) mes "The vote is currently tied.";
+ mes "To who would you like to give votes to?";
next;
- menu "Kafra",Lfixkafra,"Cool Event Corp",Lfixcool;
+ menu "Kafra",-,"Cool Event Corp",Lfixcool;
- Lfixkafra:
+ Lfixkafra: //Fixing vote for Kafra
mes "[Saera]";
- mes "Let me find the papers...";
- mes "Current Kafra vote: "+$dtskafra;
- mes "Current Cool Event Corp vote: "+$dtscool;
- mes "Please input new vote for Kafra";
+ if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
+ if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes."; //multiplied by -1 because var is negative
+ if($dtsv == 0) mes "The vote is currently tied.";
+ mes "Please input the amount you wish to give to Kafra Corp";
input @dtstemp; //Set buffer for Kafra vote
next;
mes "[Saera]";
mes "You inputted "+@dtstemp+" for Kafra";
- mes "Current Kafra vote: "+$dtskafra;
- mes "Current Cool Event Corp vote: "+$dtscool;
+ if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
+ if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
+ if($dtsv == 0) mes "The vote is currently tied.";
mes "Are you sure you would like to";
mes "make these changes?";
next;
menu "Yes",-,"No",Lnothx;
- set $dtskafra,@dtstemp; //Set buffer to Kafra vote
+ set $dtsv,$dtsv-@dtstemp; //Set buffer to Kafra vote
mes "[Saera]";
mes "Okay, you fixed the vote";
mes "of Kafra Corp.";
- mes "Current Kafra vote: "+$dtskafra;
- mes "Current Cool Event Corp vote: "+$dtscool;
+ if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
+ if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
+ if($dtsv == 0) mes "The vote is currently tied.";
close;
- Lfixcool:
+ Lfixcool: //Fixing vote for cool corp
mes "[Saera]";
mes "Let me find the papers...";
- mes "Current Kafra vote: "+$dtskafra;
- mes "Current Cool Event Corp vote: "+$dtscool;
+ if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
+ if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
+ if($dtsv == 0) mes "The vote is currently tied.";
mes "Please input new vote for Cool Event Corp";
input @dtstemp; //Set buffer for Cool vote
next;
mes "[Saera]";
mes "You inputted "+@dtstemp+" for Cool Event Corp";
- mes "Current Kafra vote: "+$dtskafra;
- mes "Current Cool Event Corp vote: "+$dtscool;
+ if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
+ if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
+ if($dtsv == 0) mes "The vote is currently tied.";
mes "Are you sure you would like to";
mes "make these changes?";
next;
menu "Yes",-,"No",Lnothx; //Confirmaiton
- set $dtscool,@dtstemp; //Set buffer to Cool vote
+ set $dtsv,@dtsv+@dtstemp; //Set buffer to Cool vote
mes "[Saera]";
mes "Okay, you fixed the vote";
mes "of Cool Event Corp.";
- mes "Current Kafra vote: "+$dtskafra;
- mes "Current Cool Event Corp vote: "+$dtscool;
+ if($dtsv > 0) mes "Cool Event Corp is currently winning by "+$dtsv+" votes.";
+ if($dtsv < 0) mes "Kafra Corp is currently winning by "+$dtsv*-1+" votes.";
+ if($dtsv == 0) mes "The vote is currently tied.";
close;
Lsettele: //Set current DTS tele
@@ -325,13 +331,13 @@ lhz_in02.gat,36,274,3 script Cool Event Staff 831,{ if($dts&(1<<1)) mes "Cool Event Corp is currently the DTS warper.";
if($dts&(1<<2)) mes "Kafra Corp is currently the DTS warper.";
next;
- input @dtstemps$;
+ input @dtstemps$; //Typed in choices to prevent mistakes
mes "Let me find the papers...";
next;
if(@dtstemps$ == "Election" || @dtstemps$ == "election"){
if($dts&(1<<1)){
- set $dts,$dts&~(1<<1);
- set $dts,$dts|(1<<0);
+ set $dts,$dts&~(1<<1); //Removes previous winner
+ set $dts,$dts|(1<<0); //Changes status to election
}
if($dts&(1<<2)){
set $dts,$dts&~(1<<2);
@@ -389,8 +395,8 @@ lhz_in02.gat,36,274,3 script Cool Event Staff 831,{ next;
if(@dtstemps$ == "None" || @dtstemps$ == "none"){
if($dts&(1<<4)){
- set $dts,$dts&~(1<<4);
- set $dts,$dts|(1<<3);
+ set $dts,$dts&~(1<<4); //removes last winner
+ set $dts,$dts|(1<<3); //sets current last winner
}
if($dts&(1<<5)){
set $dts,$dts&~(1<<5);
@@ -441,19 +447,19 @@ lhz_in02.gat,36,274,3 script Cool Event Staff 831,{ menu "Yes",Lmanuvoteyes,"No",Lnothx;
Lmanuvoteyes:
- if($dtscool == $dtskafra){
+ if($dtsv == 0){
set $@dtstemp,rand(1,2);
- if($@dtstemp == 1) set $dtscool,$dtscool+100;
- else set $dtskafra,$dtskafra+100;
+ if($@dtstemp == 1) set $dtsv,$dtsv+100;
+ else set $dtsv,$dtsv-100;
}
- if($dtscool > $dtskafra){
- if($dts&(1<<3)) set $dts,$dts&~(1<<3);
+ if($dtsv > 0){
+ if($dts&(1<<3)) set $dts,$dts&~(1<<3); //removes last winner varialbes
if($dts&(1<<4)) set $dts,$dts&~(1<<4);
if($dts&(1<<5)) set $dts,$dts&~(1<<5);
if($dts&(1<<0)){
- set $dts,$dts&~(1<<0);
- set $dts,$dts|(1<<1);
- set $dts,$dts|(1<<3);
+ set $dts,$dts&~(1<<0); //removes winner variable
+ set $dts,$dts|(1<<1); //sets last winner varialbe
+ set $dts,$dts|(1<<3); //sets current winner variable
}
if($dts&(1<<1)) set $dts,$dts|(1<<4);
if($dts&(1<<2)){
@@ -461,8 +467,7 @@ lhz_in02.gat,36,274,3 script Cool Event Staff 831,{ set $dts,$dts|(1<<1);
set $dts,$dts|(1<<5);
}
- set $dtscool,0;
- set $dtskafra,0;
+ set $dtsv,0;
}
else{
if($dts&(1<<3)) set $dts,$dts&~(1<<3);
@@ -479,8 +484,7 @@ lhz_in02.gat,36,274,3 script Cool Event Staff 831,{ set $dts,$dts|(1<<4);
}
if($dts&(1<<2)) set $dts,$dts|(1<<5);
- set $dtscool,0;
- set $dtskafra,0;
+ set $dtsv,0;
}
mes "[Saera]";
mes "Vote check run again.";
@@ -621,7 +625,7 @@ function script F_DTS_Warp { goto Lend;
Lvote: //If you clicked you wanted to vote
- if(dtseligible == 1 || $dts&(1<<6)) goto Leligible; //Var check if eligible
+ if(dtseligible == 1 || $dts&(1<<6)) goto Leligible; //Var check if eligible or global eligibility
Lnoteligible: //Text displayed if wanted to vote, but not eligible/voted
switch(getarg(0)){
@@ -669,7 +673,7 @@ function script F_DTS_Warp { menu "Cool Event Corp.",Lvotecool,"Kafra Corp.",Lvotekafra;
Lvotecool:
- set $dtscool,$dtscool+1; //Adds 1 to $dtscool count
+ set $dtsv,$dtsv+1; //Adds 1 to cool count
set dtseligible,2; //Sets var so that you can't vote over and over
switch(getarg(0)){
case 0:
@@ -690,7 +694,7 @@ function script F_DTS_Warp { goto Lend;
Lvotekafra:
- setd $dtskafra,$dtskafra+1; //Adds 1 to $dtskafra count
+ setd $dtsv,$dtsv-1; //Adds 1 to kafra count
set dtseligible,2; //Sets var to prevent cheating
switch(getarg(0)){
case 0:
@@ -875,12 +879,12 @@ function script F_DTS_Warp { //Elections administration NPC (hidden)
- script DTS_Admin -1,{
On000100: //Works only at 1am on sunday
- if($dtscool == $dtskafra){
+ if($dtsv == 0){ //If tied, gives random side 100 votes
set $@dtstemp,rand(1,2);
- if($@dtstemp == 1) set $dtscool,$dtscool+100;
- else set $dtskafra,$dtskafra+100;
+ if($@dtstemp == 1) set $dtsv,$dtsv+100;
+ else set $dtsv,$dtsv-100;
}
- if($dtscool > $dtskafra){
+ if($dtsv > 0){
if($dts&(1<<3)) set $dts,$dts&~(1<<3);
if($dts&(1<<4)) set $dts,$dts&~(1<<4);
if($dts&(1<<5)) set $dts,$dts&~(1<<5);
@@ -895,8 +899,7 @@ function script F_DTS_Warp { set $dts,$dts|(1<<1);
set $dts,$dts|(1<<5);
}
- set $dtscool,0;
- set $dtskafra,0;
+ set $dtsv,0;
}
else{
if($dts&(1<<3)) set $dts,$dts&~(1<<3);
@@ -913,8 +916,7 @@ function script F_DTS_Warp { set $dts,$dts|(1<<4);
}
if($dts&(1<<2)) set $dts,$dts|(1<<5);
- set $dtscool,0;
- set $dtskafra,0;
+ set $dtsv,0;
}
end;
}
\ No newline at end of file |