|
@@ -3,15 +3,15 @@
|
|
//===== By: ==================================================
|
|
//===== By: ==================================================
|
|
//= Evera
|
|
//= Evera
|
|
//===== Current Version: =====================================
|
|
//===== Current Version: =====================================
|
|
-//= 1.4
|
|
|
|
|
|
+//= 1.5
|
|
//===== Compatible With: =====================================
|
|
//===== Compatible With: =====================================
|
|
//= eAthena
|
|
//= eAthena
|
|
//===== Description: =========================================
|
|
//===== Description: =========================================
|
|
//= All-included file of Cool Event Corp NPCs with Kafra voting system.
|
|
//= All-included file of Cool Event Corp NPCs with Kafra voting system.
|
|
-//= Kafra DTS voting system must be implemented in Kafra to use!
|
|
|
|
//===== Variables: ===========================================
|
|
//===== 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
|
|
//= $dts = Variable for DTS status
|
|
//= = (1<<0) Election
|
|
//= = (1<<0) Election
|
|
//= = (1<<1) Cool Corp Enabled
|
|
//= = (1<<1) Cool Corp Enabled
|
|
@@ -41,16 +41,16 @@
|
|
//= Some unofficial translations, need Dungeon maps/coords/prices
|
|
//= Some unofficial translations, need Dungeon maps/coords/prices
|
|
//= Also includes unofficial GM-enabled tweaking for script
|
|
//= Also includes unofficial GM-enabled tweaking for script
|
|
//= Includes NPCs in Cool Event Corp headquarters
|
|
//= 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.
|
|
//= 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.
|
|
//= President's Quest, which isn't yet released.
|
|
-//= Default time to check votes is Sunday at 1:00. GM Configurable through Saera.
|
|
|
|
//===== Version History: ====================================
|
|
//===== 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,
|
|
//= 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),
|
|
//= 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)
|
|
//= put more arg(2) parameters, fixed a few bugs [Evera] (5/11/06)
|
|
//= 1.0 Initial release [Evera] (5/10/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
|
|
Lfixvote: //Fix Vote
|
|
mes "[Saera]";
|
|
mes "[Saera]";
|
|
mes "Umm, sure..";
|
|
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;
|
|
next;
|
|
- menu "Kafra",Lfixkafra,"Cool Event Corp",Lfixcool;
|
|
|
|
|
|
+ menu "Kafra",-,"Cool Event Corp",Lfixcool;
|
|
|
|
|
|
- Lfixkafra:
|
|
|
|
|
|
+ Lfixkafra: //Fixing vote for Kafra
|
|
mes "[Saera]";
|
|
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
|
|
input @dtstemp; //Set buffer for Kafra vote
|
|
next;
|
|
next;
|
|
mes "[Saera]";
|
|
mes "[Saera]";
|
|
mes "You inputted "+@dtstemp+" for Kafra";
|
|
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 "Are you sure you would like to";
|
|
mes "make these changes?";
|
|
mes "make these changes?";
|
|
next;
|
|
next;
|
|
menu "Yes",-,"No",Lnothx;
|
|
menu "Yes",-,"No",Lnothx;
|
|
- set $dtskafra,@dtstemp; //Set buffer to Kafra vote
|
|
|
|
|
|
+ set $dtsv,$dtsv-@dtstemp; //Set buffer to Kafra vote
|
|
mes "[Saera]";
|
|
mes "[Saera]";
|
|
mes "Okay, you fixed the vote";
|
|
mes "Okay, you fixed the vote";
|
|
mes "of Kafra Corp.";
|
|
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;
|
|
close;
|
|
|
|
|
|
- Lfixcool:
|
|
|
|
|
|
+ Lfixcool: //Fixing vote for cool corp
|
|
mes "[Saera]";
|
|
mes "[Saera]";
|
|
mes "Let me find the papers...";
|
|
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";
|
|
mes "Please input new vote for Cool Event Corp";
|
|
input @dtstemp; //Set buffer for Cool vote
|
|
input @dtstemp; //Set buffer for Cool vote
|
|
next;
|
|
next;
|
|
mes "[Saera]";
|
|
mes "[Saera]";
|
|
mes "You inputted "+@dtstemp+" for Cool Event Corp";
|
|
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 "Are you sure you would like to";
|
|
mes "make these changes?";
|
|
mes "make these changes?";
|
|
next;
|
|
next;
|
|
menu "Yes",-,"No",Lnothx; //Confirmaiton
|
|
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 "[Saera]";
|
|
mes "Okay, you fixed the vote";
|
|
mes "Okay, you fixed the vote";
|
|
mes "of Cool Event Corp.";
|
|
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;
|
|
close;
|
|
|
|
|
|
Lsettele: //Set current DTS tele
|
|
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<<1)) mes "Cool Event Corp is currently the DTS warper.";
|
|
if($dts&(1<<2)) mes "Kafra Corp is currently the DTS warper.";
|
|
if($dts&(1<<2)) mes "Kafra Corp is currently the DTS warper.";
|
|
next;
|
|
next;
|
|
- input @dtstemps$;
|
|
|
|
|
|
+ input @dtstemps$; //Typed in choices to prevent mistakes
|
|
mes "Let me find the papers...";
|
|
mes "Let me find the papers...";
|
|
next;
|
|
next;
|
|
if(@dtstemps$ == "Election" || @dtstemps$ == "election"){
|
|
if(@dtstemps$ == "Election" || @dtstemps$ == "election"){
|
|
if($dts&(1<<1)){
|
|
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)){
|
|
if($dts&(1<<2)){
|
|
set $dts,$dts&~(1<<2);
|
|
set $dts,$dts&~(1<<2);
|
|
@@ -389,8 +395,8 @@ lhz_in02.gat,36,274,3 script Cool Event Staff 831,{
|
|
next;
|
|
next;
|
|
if(@dtstemps$ == "None" || @dtstemps$ == "none"){
|
|
if(@dtstemps$ == "None" || @dtstemps$ == "none"){
|
|
if($dts&(1<<4)){
|
|
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)){
|
|
if($dts&(1<<5)){
|
|
set $dts,$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;
|
|
menu "Yes",Lmanuvoteyes,"No",Lnothx;
|
|
|
|
|
|
Lmanuvoteyes:
|
|
Lmanuvoteyes:
|
|
- if($dtscool == $dtskafra){
|
|
|
|
|
|
+ if($dtsv == 0){
|
|
set $@dtstemp,rand(1,2);
|
|
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<<4)) set $dts,$dts&~(1<<4);
|
|
if($dts&(1<<5)) set $dts,$dts&~(1<<5);
|
|
if($dts&(1<<5)) set $dts,$dts&~(1<<5);
|
|
if($dts&(1<<0)){
|
|
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<<1)) set $dts,$dts|(1<<4);
|
|
if($dts&(1<<2)){
|
|
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<<1);
|
|
set $dts,$dts|(1<<5);
|
|
set $dts,$dts|(1<<5);
|
|
}
|
|
}
|
|
- set $dtscool,0;
|
|
|
|
- set $dtskafra,0;
|
|
|
|
|
|
+ set $dtsv,0;
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
if($dts&(1<<3)) set $dts,$dts&~(1<<3);
|
|
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);
|
|
set $dts,$dts|(1<<4);
|
|
}
|
|
}
|
|
if($dts&(1<<2)) set $dts,$dts|(1<<5);
|
|
if($dts&(1<<2)) set $dts,$dts|(1<<5);
|
|
- set $dtscool,0;
|
|
|
|
- set $dtskafra,0;
|
|
|
|
|
|
+ set $dtsv,0;
|
|
}
|
|
}
|
|
mes "[Saera]";
|
|
mes "[Saera]";
|
|
mes "Vote check run again.";
|
|
mes "Vote check run again.";
|
|
@@ -621,7 +625,7 @@ function script F_DTS_Warp {
|
|
goto Lend;
|
|
goto Lend;
|
|
|
|
|
|
Lvote: //If you clicked you wanted to vote
|
|
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
|
|
Lnoteligible: //Text displayed if wanted to vote, but not eligible/voted
|
|
switch(getarg(0)){
|
|
switch(getarg(0)){
|
|
@@ -669,7 +673,7 @@ function script F_DTS_Warp {
|
|
menu "Cool Event Corp.",Lvotecool,"Kafra Corp.",Lvotekafra;
|
|
menu "Cool Event Corp.",Lvotecool,"Kafra Corp.",Lvotekafra;
|
|
|
|
|
|
Lvotecool:
|
|
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
|
|
set dtseligible,2; //Sets var so that you can't vote over and over
|
|
switch(getarg(0)){
|
|
switch(getarg(0)){
|
|
case 0:
|
|
case 0:
|
|
@@ -690,7 +694,7 @@ function script F_DTS_Warp {
|
|
goto Lend;
|
|
goto Lend;
|
|
|
|
|
|
Lvotekafra:
|
|
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
|
|
set dtseligible,2; //Sets var to prevent cheating
|
|
switch(getarg(0)){
|
|
switch(getarg(0)){
|
|
case 0:
|
|
case 0:
|
|
@@ -875,12 +879,12 @@ function script F_DTS_Warp {
|
|
//Elections administration NPC (hidden)
|
|
//Elections administration NPC (hidden)
|
|
- script DTS_Admin -1,{
|
|
- script DTS_Admin -1,{
|
|
On000100: //Works only at 1am on sunday
|
|
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);
|
|
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<<3)) set $dts,$dts&~(1<<3);
|
|
if($dts&(1<<4)) set $dts,$dts&~(1<<4);
|
|
if($dts&(1<<4)) set $dts,$dts&~(1<<4);
|
|
if($dts&(1<<5)) set $dts,$dts&~(1<<5);
|
|
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<<1);
|
|
set $dts,$dts|(1<<5);
|
|
set $dts,$dts|(1<<5);
|
|
}
|
|
}
|
|
- set $dtscool,0;
|
|
|
|
- set $dtskafra,0;
|
|
|
|
|
|
+ set $dtsv,0;
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
if($dts&(1<<3)) set $dts,$dts&~(1<<3);
|
|
if($dts&(1<<3)) set $dts,$dts&~(1<<3);
|
|
@@ -913,8 +916,7 @@ function script F_DTS_Warp {
|
|
set $dts,$dts|(1<<4);
|
|
set $dts,$dts|(1<<4);
|
|
}
|
|
}
|
|
if($dts&(1<<2)) set $dts,$dts|(1<<5);
|
|
if($dts&(1<<2)) set $dts,$dts|(1<<5);
|
|
- set $dtscool,0;
|
|
|
|
- set $dtskafra,0;
|
|
|
|
|
|
+ set $dtsv,0;
|
|
}
|
|
}
|
|
end;
|
|
end;
|
|
}
|
|
}
|