summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/clear_vars.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-28 08:50:00 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-28 08:50:00 -0300
commit705118604dd0f0b5b9c275f40d319378ec2f69ab (patch)
tree8b35258f41b2123afefd3340da1f6226dec65862 /world/map/npc/functions/clear_vars.txt
parent37f74a1510f28c26686b61c67d10ee2ccd14a8cb (diff)
downloadserverdata-705118604dd0f0b5b9c275f40d319378ec2f69ab.tar.gz
serverdata-705118604dd0f0b5b9c275f40d319378ec2f69ab.tar.bz2
serverdata-705118604dd0f0b5b9c275f40d319378ec2f69ab.tar.xz
serverdata-705118604dd0f0b5b9c275f40d319378ec2f69ab.zip
Fix Luca's exploit. Correct live server data accordingly.v2021.04.22+1
A good thing we have the Evolved project or this would be obviously impossible.
Diffstat (limited to 'world/map/npc/functions/clear_vars.txt')
-rw-r--r--world/map/npc/functions/clear_vars.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt
index e98def7d..2abfb118 100644
--- a/world/map/npc/functions/clear_vars.txt
+++ b/world/map/npc/functions/clear_vars.txt
@@ -18,6 +18,7 @@ function|script|ClearVariables
callsub S_Flags;
callsub S_Bitmask;
callsub S_BlueSage;
+ callsub S_Luca;
callsub S_Easter;
callsub S_Easter2008;
@@ -236,6 +237,35 @@ S_BlueSage:
set QUEST_BlueSage, QUEST_BlueSage & ~((1<<5)|(1<<6)|(1<<7));
return;
+S_Luca:
+ if (FLAGS & FLAG_LUCA_FIX) goto S_Return;
+ if (FLAGS & FLAG_LUCA_6SKILLS_MAXED) goto S_Luca6;
+ if (FLAGS & FLAG_LUCA_4SKILLS_MAXED) goto S_Luca4;
+ if (FLAGS & FLAG_LUCA_2SKILLS_MAXED) goto S_Luca2;
+ goto S_LucaX;
+
+S_Luca6:
+ if (countitem("AssassinMask") < 1) goto S_Return;
+ delitem "AssassinMask", 1;
+ set FLAGS, FLAGS ^ FLAG_LUCA_6SKILLS_MAXED;
+ goto S_Luca4;
+
+S_Luca4:
+ if (countitem("AssassinPants") < 1) goto S_Return;
+ delitem "AssassinPants", 1;
+ set FLAGS, FLAGS ^ FLAG_LUCA_4SKILLS_MAXED;
+ goto S_Luca2;
+
+S_Luca2:
+ if (countitem("AssassinBoots") < 1) goto S_Return;
+ delitem "AssassinBoots", 1;
+ set FLAGS, FLAGS ^ FLAG_LUCA_2SKILLS_MAXED;
+ goto S_LucaX;
+
+S_LucaX:
+ set FLAGS, FLAGS | FLAG_LUCA_FIX;
+ return;
+
S_Flags:
if (Open_Underground_Palace_Barrier)
set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND;