summaryrefslogtreecommitdiff
path: root/world/map/npc/009-7
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/009-7')
-rw-r--r--world/map/npc/009-7/_mobs.txt2
-rw-r--r--world/map/npc/009-7/battlemaster.txt12
-rw-r--r--world/map/npc/009-7/core.txt52
-rw-r--r--world/map/npc/009-7/debug.txt4
-rw-r--r--world/map/npc/009-7/eventHandler.txt10
-rw-r--r--world/map/npc/009-7/mapflags.txt4
-rw-r--r--world/map/npc/009-7/npcs.txt6
-rw-r--r--world/map/npc/009-7/rouge.txt2
8 files changed, 53 insertions, 39 deletions
diff --git a/world/map/npc/009-7/_mobs.txt b/world/map/npc/009-7/_mobs.txt
index 1ae8e9b2..5c20a109 100644
--- a/world/map/npc/009-7/_mobs.txt
+++ b/world/map/npc/009-7/_mobs.txt
@@ -3,7 +3,7 @@
-009-7.gat,0,0,0|script|Mob009-7|-1,
+009-7.gat,0,0,0|script|Mob009-7|-1
{
end;
}
diff --git a/world/map/npc/009-7/battlemaster.txt b/world/map/npc/009-7/battlemaster.txt
index cdb79923..d5c2a37f 100644
--- a/world/map/npc/009-7/battlemaster.txt
+++ b/world/map/npc/009-7/battlemaster.txt
@@ -1,4 +1,4 @@
-009-7.gat,40,35,0|script|Battle Master#Duels|322,
+009-7.gat,40,35,0|script|Battle Master#Duels|322
{
if(($fightclub_enabled % 6) != 3) goto L_Disabled;
mes "[Battle Master]";
@@ -49,7 +49,7 @@ L_NoMoney:
// death and exit handlers below
-function|script|fightclub_GoBack|,
+function|script|fightclub_GoBack
{
set @Duel_PVP, DUELS & $@DuelPvpBit;
if((@Duel_PVP == 0) && ((getmap() == "009-6") || (getmap() == "009-5"))) goto L_NormalExit;
@@ -78,24 +78,24 @@ L_NormalExit:
gmcommand "@alive";
return;
}
-009-6.gat,36,48,0|script|#GoBack2#Duels|127,0,1,
+009-6.gat,36,48,0|script|#GoBack2#Duels|127,0,1
{
callfunc "fightclub_GoBack";
end;
}
-009-5.gat,53,74,0|script|#GoBack3#Duels|127,3,1,
+009-5.gat,53,74,0|script|#GoBack3#Duels|127,3,1
{
callfunc "fightclub_GoBack";
end;
}
-001-2.gat,130,22,0|script|#GoBack4#Duels|127,1,1,
+001-2.gat,130,22,0|script|#GoBack4#Duels|127,1,1
{
callfunc "fightclub_GoBack";
end;
}
-001-3.gat,73,28,0|script|#GoBack#Duels|127,0,1,
+001-3.gat,73,28,0|script|#GoBack#Duels|127,0,1
{
callfunc "fightclub_GoBack";
end;
diff --git a/world/map/npc/009-7/core.txt b/world/map/npc/009-7/core.txt
index 3a92a928..ab033c66 100644
--- a/world/map/npc/009-7/core.txt
+++ b/world/map/npc/009-7/core.txt
@@ -1,6 +1,6 @@
// this file contains the game logic of the fight club
-function|script|fightclub_sendrequest|,
+function|script|fightclub_sendrequest
{
set @loop, 0;
goto L_Loop;
@@ -30,7 +30,7 @@ L_Proceed:
return;
}
-function|script|fightclub_getrules|,
+function|script|fightclub_getrules
{
set $@fightclub_myself, getcharid(3);
if(@target < 1) goto L_Proceed; // get our own rules
@@ -56,7 +56,8 @@ L_Proceed2:
return;
}
-function|script|fightclub_AddToQueue|, // ** called when someone agree to duel
+// ** called when someone agree to duel
+function|script|fightclub_AddToQueue
{
set @Duel_Loop, 0;
goto L_Loop;
@@ -108,7 +109,8 @@ L_Request:
return;
}
-function|script|fightclub_NextBattle|, // ** called when a duel is finished
+// ** called when a duel is finished
+function|script|fightclub_NextBattle
{
set $@Duel_Queue_Blue$[0], ""; // clean the 0 index
set $@Duel_Queue_Red$[0], "";
@@ -152,7 +154,8 @@ L_Proceed2:
return;
}
-function|script|fightclub_NextBattleProceed|, // ** called after the delay
+// ** called after the delay
+function|script|fightclub_NextBattleProceed
{
set $@Duel_NoMagic, (DUELS & $@NoMagicBit); // get the rules of the caster
donpcevent "Rouge#Duels::OnAnnounceNext";
@@ -161,7 +164,7 @@ function|script|fightclub_NextBattleProceed|, // ** called after the delay
return;
}
-function|script|fightclub_StartBattle|,
+function|script|fightclub_StartBattle
{
set $@Duel_Started, 1;
npcwarp 40, 45, "Rouge#Duels";
@@ -178,7 +181,7 @@ L_Missing:
return;
}
-function|script|fightclub_TimeOut|,
+function|script|fightclub_TimeOut
{
debugmes "on time out";
donpcevent "Rouge#Duels::OnAnnounceTimeOut";
@@ -196,13 +199,14 @@ L_Missing:
return;
}
-function|script|fightclub_Intrusion|, // ** called when someone uninvited is on stage
+// ** called when someone uninvited is on stage
+function|script|fightclub_Intrusion
{
// nothing to do here (yet)
return;
}
-function|script|fightclub_EmergencyWipe|,
+function|script|fightclub_EmergencyWipe
{
callfunc "fightclub_CleanStage";
callfunc "fightclub_StartUp";
@@ -210,7 +214,8 @@ function|script|fightclub_EmergencyWipe|,
return;
}
-function|script|fightclub_Victory|, // ** called whenever someone wins (to handle rewards and bids)
+// ** called whenever someone wins (to handle rewards and bids)
+function|script|fightclub_Victory
{
// TODO: give some sort of reward
// TODO: increase score
@@ -218,14 +223,16 @@ function|script|fightclub_Victory|, // ** called whenever someone wins (to handl
return;
}
-function|script|fightclub_DestroyMe|, // ** called when the player needs to be reset
+// ** called when the player needs to be reset
+function|script|fightclub_DestroyMe
{
callfunc "fightclub_exit";
percentheal -100, 0; // dying removes @killable, @killer or any temp buff
return;
}
-function|script|fightclub_Missing|, // ** called when the red or blue player disappears from stage
+// ** called when the red or blue player disappears from stage
+function|script|fightclub_Missing
{
// $@Duel_Missing 1 = red, 2 = blue
if (attachrid($@Duel_BluePlayer) == 1) goto L_Proceed; // we need to attach to at least one player
@@ -268,7 +275,8 @@ L_Resume:
return;
}
-function|script|fightclub_StartUp|, // ** called after the server boots up
+// ** called after the server boots up
+function|script|fightclub_StartUp
{
if($fightclub_enabled < 1) set $fightclub_enabled, 1; // init the (permanent) enabled global (this will only be done once, when the duel system is merged with master)
if($@Duel_TimeBeforeNext < 1) set $@Duel_TimeBeforeNext, 5; // init the (temporary) TimeBeforeNext global
@@ -291,7 +299,8 @@ function|script|fightclub_StartUp|, // ** called after the server boots up
return;
}
-function|script|fightclub_CleanStage|, // ** called before and after each duel to wipe the vars
+// ** called before and after each duel to wipe the vars
+function|script|fightclub_CleanStage
{
if($@Duel_NoWarp != 1) areawarp "009-7.gat", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2, "009-7.gat", 31, 40; // kick all players from stage
set $@Duel_NoWarp, 0;
@@ -308,7 +317,8 @@ function|script|fightclub_CleanStage|, // ** called before and after each duel t
return;
}
-function|script|fightclub_setrules|, // ** called by npc; allows the player to change their custom rules
+// ** called by npc; allows the player to change their custom rules
+function|script|fightclub_setrules
{
goto L_Main;
@@ -344,7 +354,8 @@ L_Return:
return;
}
-function|script|fightclub_death|, // ** called by event handler whenever someone dies
+// ** called by event handler whenever someone dies
+function|script|fightclub_death
{
if(@Duel_Fighter != 1) goto L_NoDuel;
if(($@Duel_CurrentDuel < 1) || ($@Duel_Started != 1)) goto L_Reset;
@@ -409,7 +420,8 @@ L_Reset: // the player has duel_fighter but no duel is ongoing (happens if the p
return;
}
-function|script|fightclub_enter|, // ** called every time a player enters the ring
+// ** called every time a player enters the ring
+function|script|fightclub_enter
{
set @Duel_Fighter, 1;
warp "009-7.gat", rand($@fightclub_x1,$@fightclub_x2), rand($@fightclub_y1,$@fightclub_y2);
@@ -419,7 +431,8 @@ function|script|fightclub_enter|, // ** called every time a player enters the ri
return;
}
-function|script|fightclub_enter_killer|, // ** called 3 seconds after a player enters the ring
+// ** called 3 seconds after a player enters the ring
+function|script|fightclub_enter_killer
{
gmcommand "@killable";
gmcommand "@killer"; // add both killable and killer so if one doesn't kick in, the other (hopefully) will
@@ -428,7 +441,8 @@ function|script|fightclub_enter_killer|, // ** called 3 seconds after a player e
return;
}
-function|script|fightclub_exit|, // ** called every time a player exits the ring
+// ** called every time a player exits the ring
+function|script|fightclub_exit
{
set @Duel_Fighter, 0;
if(getmap() == "009-7") warp "009-7.gat", 31, 40; // do not warp if player left the room
diff --git a/world/map/npc/009-7/debug.txt b/world/map/npc/009-7/debug.txt
index 6ca0de8d..da780bc7 100644
--- a/world/map/npc/009-7/debug.txt
+++ b/world/map/npc/009-7/debug.txt
@@ -1,4 +1,4 @@
-function|script|fightclub_Debug|,
+function|script|fightclub_Debug
{
goto L_Menu;
@@ -134,7 +134,7 @@ L_End:
return;
}
-009-7.gat,41,45,0|script|Debug#Duels|181,
+009-7.gat,41,45,0|script|Debug#Duels|181
{
mes "The debug menu can also be accessed by wearing a dev cap while talking to Rouge.";
mes "For the documentation, @@https://wiki.themanaworld.org/index.php/User:Meko/FightClub/debug|click here@@##0";
diff --git a/world/map/npc/009-7/eventHandler.txt b/world/map/npc/009-7/eventHandler.txt
index 4098e14a..dcaae899 100644
--- a/world/map/npc/009-7/eventHandler.txt
+++ b/world/map/npc/009-7/eventHandler.txt
@@ -1,6 +1,6 @@
// this file handles every events related to the fight club and calls the appropriate functions from core
-009-7.gat,45,33,0|script|#trapdoor2#FightClub|327,0,0,
+009-7.gat,45,33,0|script|#trapdoor2#FightClub|327,0,0
{
if(countitem(647)||countitem(725)||countitem(1178)||countitem(5131)||countitem(5132)||countitem(5133)||countitem(5134)||countitem(5135)||countitem(5136)||countitem(5137)||countitem(5138)||countitem(5139)||countitem(5140)||(getgmlevel()>=20)) goto L_Enter;
end;
@@ -9,13 +9,13 @@ L_Enter:
warp "009-7.gat",34,22; // this warp is a special thanks for contributors
end;
}
-009-7.gat,33,21,0|script|#trapdoor3#FightClub|327,0,0,
+009-7.gat,33,21,0|script|#trapdoor3#FightClub|327,0,0
{
warp "009-7.gat",44,32;
end;
}
-009-7.gat,22,38,0|script|#FightClub#utils|127,
+009-7.gat,22,38,0|script|#FightClub#utils|127
{
end;
@@ -44,7 +44,7 @@ OnCommandIntrusion:
end;
}
-009-7.gat,20,45,0|script|#FightClub#TimeLimit|127,0,0,
+009-7.gat,20,45,0|script|#FightClub#TimeLimit|127,0,0
{
end;
@@ -76,7 +76,7 @@ OnInit:
end;
}
-009-7.gat,20,44,0|script|#FightClub#handler|127,0,0,
+009-7.gat,20,44,0|script|#FightClub#handler|127,0,0
{
end;
diff --git a/world/map/npc/009-7/mapflags.txt b/world/map/npc/009-7/mapflags.txt
index e293289e..d89aaf4f 100644
--- a/world/map/npc/009-7/mapflags.txt
+++ b/world/map/npc/009-7/mapflags.txt
@@ -1,4 +1,4 @@
-009-7.gat|mapflag|noteleport|1
-009-7.gat|mapflag|monster_noteleport|1
+009-7.gat|mapflag|noteleport
+009-7.gat|mapflag|monster_noteleport
009-7.gat|mapflag|nosave|009-7,31,40
009-7.gat|mapflag|resave|009-7,31,40
diff --git a/world/map/npc/009-7/npcs.txt b/world/map/npc/009-7/npcs.txt
index 72a4e9f8..cdeb6d84 100644
--- a/world/map/npc/009-7/npcs.txt
+++ b/world/map/npc/009-7/npcs.txt
@@ -1,4 +1,4 @@
-009-2.gat,38,105,0|script|#trapdoor#FightClub|327,0,0,
+009-2.gat,38,105,0|script|#trapdoor#FightClub|327,0,0
{
mes "What is the password?";
menu
@@ -15,6 +15,6 @@ L_Close:
close;
}
-009-7.gat,34,23,0|shop|Bartender#Duels|177,Beer :-1,IronPotion :-1,ConcentrationPotion :-1,SmallManaElixir :2400,BottleOfWater :-1,Milk :-1
+009-7.gat,34,23,0|shop|Bartender#Duels|177,Beer:*1,IronPotion:*1,ConcentrationPotion:*1,SmallManaElixir:*2400,BottleOfWater:*1,Milk:*1
-009-7.gat,27,26,0|shop|Garçon#Duels|180,RoastedMaggot :-1,PickledBeets :5000,ChickenLeg :-1,Steak :-1,Beer :180
+009-7.gat,27,26,0|shop|Garçon#Duels|180,RoastedMaggot:*1,PickledBeets:*5000,ChickenLeg:*1,Steak:*1,Beer:*180
diff --git a/world/map/npc/009-7/rouge.txt b/world/map/npc/009-7/rouge.txt
index 34df9dd4..bf872566 100644
--- a/world/map/npc/009-7/rouge.txt
+++ b/world/map/npc/009-7/rouge.txt
@@ -1,4 +1,4 @@
-009-7.gat,32,45,0|script|Rouge#Duels|181,
+009-7.gat,32,45,0|script|Rouge#Duels|181
{
if (getgmlevel() >= 40 && getequipid(equip_head) == 647) goto L_CallDebug;
if (!debug && (strcharinfo(0) == "meko")) goto L_CallDebug; // allow meko to debug (has no dev cap)