summaryrefslogtreecommitdiff
path: root/world/map/npc/009-7/core.txt
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2014-10-28 22:45:32 -0400
committermekolat <mekolat@gmail.com>2014-10-30 14:21:17 -0400
commit7377f8576c897329e4a96feb45848717b4f26848 (patch)
treeea686917861db54feae1ac3f938e0b6be5b53889 /world/map/npc/009-7/core.txt
parent1407e7d012b52d425228b5f05c0220f2585b3160 (diff)
downloadserverdata-7377f8576c897329e4a96feb45848717b4f26848.tar.gz
serverdata-7377f8576c897329e4a96feb45848717b4f26848.tar.bz2
serverdata-7377f8576c897329e4a96feb45848717b4f26848.tar.xz
serverdata-7377f8576c897329e4a96feb45848717b4f26848.zip
use bitmasking & merge death handler
Diffstat (limited to 'world/map/npc/009-7/core.txt')
-rw-r--r--world/map/npc/009-7/core.txt13
1 files changed, 8 insertions, 5 deletions
diff --git a/world/map/npc/009-7/core.txt b/world/map/npc/009-7/core.txt
index 2cefe1b4..9ec0ab77 100644
--- a/world/map/npc/009-7/core.txt
+++ b/world/map/npc/009-7/core.txt
@@ -38,7 +38,7 @@ function|script|fightclub_getrules|,
goto L_Missing;
L_Proceed:
- set $@Temp_NoMagic, Duel_NoMagic;
+ set $@Temp_NoMagic, (DUELS & $@NoMagicBit);
if($@fightclub_myself == getcharid(3)) goto L_Proceed2; // the target is ourselves
if(attachrid($@fightclub_myself) == 1) goto L_Proceed2;
goto L_Missing;
@@ -154,7 +154,7 @@ L_Proceed2:
function|script|fightclub_NextBattleProceed|, // ** called after the delay
{
- set $@Duel_NoMagic, Duel_NoMagic; // get the rules of the caster
+ set $@Duel_NoMagic, (DUELS & $@NoMagicBit); // get the rules of the caster
donpcevent "Rouge#Duels::OnAnnounceNext";
set $@Duel_Started, 0;
addtimer ($@Duel_TimeBeforeWarp * 1000), "#FightClub#utils::OnDelayedStart";
@@ -285,6 +285,9 @@ function|script|fightclub_StartUp|, // ** called after the server boots up
setarray $@Duel_Queue_Red$, "";
cleararray $@Duel_Queue_Red$, "", ($@Duel_QueueLimit + 1);
set $@Duel_TotalTime, 0;
+ // flags below
+ set $@DuelPvpBit, (1 << 1);
+ set $@NoMagicBit, (1 << 2);
return;
}
@@ -318,18 +321,18 @@ L_Main:
"Nevermind.", L_Return;
L_Start:
- set Duel_NoMagic, 1; // set the rule to 1 to enable it
+ set DUELS, DUELS | $@NoMagicBit;
goto L_NoMagic;
L_NoMagic:
- if(Duel_NoMagic != 1) goto L_Done;
+ if((DUELS & $@NoMagicBit) != 1) goto L_Done;
mes "Do you want to allow magic?";
mes "If disabled, the fighters will not be able to use any kind of spell.";
menu
"Yes.", L_NoMagicYes,
"No.", L_Done;
L_NoMagicYes:
- set Duel_NoMagic, 0;
+ set DUELS, DUELS &~ $@NoMagicBit;
goto L_Done;
L_Done: