summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-02-04 12:19:44 -0300
committerJesusaves <cpntb1@ymail.com>2021-02-04 12:19:44 -0300
commit965ef3e88a407aceffd7aea0d33eb92adb993aa3 (patch)
tree981e2a72d1e9825a12ee18ecc6c6fc9392e07db9 /world
parent2f3450acff9b312514390e20a16af8453f9b60ed (diff)
downloadserverdata-965ef3e88a407aceffd7aea0d33eb92adb993aa3.tar.gz
serverdata-965ef3e88a407aceffd7aea0d33eb92adb993aa3.tar.bz2
serverdata-965ef3e88a407aceffd7aea0d33eb92adb993aa3.tar.xz
serverdata-965ef3e88a407aceffd7aea0d33eb92adb993aa3.zip
Final batch of changes and balance after through testing with Ledmitz (and Prsm$
- Fix bugs on @getexp and @chargetexp - Bump exp for Beheader quest from 400k to 750k - Beheader: 999 DMG +50% Double Attack, 1800ms, -20% HIT, -25% CRIT. No int and no bow. NOTE: The -20 HIT might be or not be lowered further. Beheader is not as powerful as it looks like!
Diffstat (limited to 'world')
-rw-r--r--world/map/db/item_db_weapon.txt4
-rw-r--r--world/map/npc/012-3/beheader.txt9
-rw-r--r--world/map/npc/commands/exp.txt8
-rw-r--r--world/map/npc/items/max_stat.txt23
-rw-r--r--world/map/npc/items/nobow_item.txt29
-rw-r--r--world/map/npc/scripts.conf2
6 files changed, 69 insertions, 6 deletions
diff --git a/world/map/db/item_db_weapon.txt b/world/map/db/item_db_weapon.txt
index a9a34584..f0f37604 100644
--- a/world/map/db/item_db_weapon.txt
+++ b/world/map/db/item_db_weapon.txt
@@ -14,10 +14,10 @@
570, BoneKnife, 4, 10000, 6000, 450, 115, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {}
571, Setzer, 4, 20000, 8000, 900, 110, 0, 1, 0, 0, 2, 2, 1, 1, 3, {}, {}
572, Scimitar, 4, 8000, 4000, 200, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
-573, Falchion, 4, 8000, 4000, 300, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
+573, Falchion, 4, 8000, 4000, 300, 270, 0, 1, 0, 0, 2, 2, 1, 1, 6, {}, {callfunc "UnreleasedItem"; bonus bDoubleAddRate, 40; bonus bHit, -25; bonus bCritical, -25;}
574, Scorpion, 4, 8000, 4000, 600, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
575, DesertBow, 4, 8000, 4000, 1200, 100, 0, 1, 0, 0, 2, 34, 1, 1, 11, {}, {callfunc "UnreleasedItem";set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
-576, Beheader, 4, 8000, 4000, 2000, 140, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {bonus bCritical, 30;}
+576, Beheader, 4, 8000, 4000, 2000, 999, 0, 1, 0, 0, 2, 2, 1, 1, 4, {}, {callfunc "NoBowItem"; set @bStat, Int; set @maxbStatVal, 1; callfunc "RequireMaxStat"; bonus bDoubleAddRate, 50; bonus bSpeedAddRate, 10; bonus bHit, -20; bonus bCritical, -25;}
577, BoneDarts, 4, 8000, 4000, 300, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem"; }
578, SandCutter, 4, 30000, 15000, 1500, 140, 0, 1, 0, 0, 2, 2, 1, 80, 10, {}, {bonus bDoubleAddRate, 5;}
579, RockKnife, 4, 15000, 7500, 500, 110, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {bonus bVit, 3;}
diff --git a/world/map/npc/012-3/beheader.txt b/world/map/npc/012-3/beheader.txt
index 25885edb..9f95f701 100644
--- a/world/map/npc/012-3/beheader.txt
+++ b/world/map/npc/012-3/beheader.txt
@@ -91,10 +91,17 @@ L_Later:
mes "";
mes "[The Beheader]";
mes "\"Some February, I don't know. If you want to help, go to Hurnscald square, look for the noisy person with an AFK Cap which is always sitting with their kitty, and tell them to start working. That might just do the trick.\"";
+ if (!(FLAGS & FLAG_GOT_BEHEADER_SWORD)) goto L_MaybeBeheader;
// NOTE: Room for future expansion if needed.
// The "noisy person w/ an AFK Cap and a kytty" is Jesusalva (script author)
close;
+L_MaybeBeheader:
+ next;
+ menu
+ "Okay, good bye.", L_Close,
+ "Can I behead Terranites on my own?", L_Beheader;
+
L_Beheader:
if (FLAGS & FLAG_GOT_BEHEADER_SWORD) goto L_Again;
if (TERRAC == 1501) goto L_Finish;
@@ -168,7 +175,7 @@ L_Finish:
goto L_Nope;
getitem "Beheader", 1;
- getexp 400000, 0;
+ getexp 750000, 0;
set FLAGS, FLAGS | FLAG_GOT_BEHEADER_SWORD;
set TERRAC, 0;
diff --git a/world/map/npc/commands/exp.txt b/world/map/npc/commands/exp.txt
index 64530976..069f98d1 100644
--- a/world/map/npc/commands/exp.txt
+++ b/world/map/npc/commands/exp.txt
@@ -4,6 +4,7 @@
set .@n$, if_then_else(@argv$[1] != "", "char", "") + "getexp";
if (GM < CMD_ZENY && GM < G_SYSOP) goto L_GM; // check if you can use it on self
set .@target_id, BL_ID;
+ set .@caster_id, BL_ID;
if (@argv$[1] != "") set .@target_id, getcharid(3, @argv$[1]);
if (@argv$[1] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self
if (@argv$[1] != "" && GM < CMD_CHARZENY && GM < G_SYSOP) goto L_GM; // when target is not self, use charzeny permission
@@ -12,11 +13,12 @@
if (.@delta > .max_int) goto L_OutOfBounds;
if (!(attachrid(.@target_id))) goto L_Failed;
getexp .@delta, 0;
+ if (!(attachrid(.@caster_id))) goto L_Failed;
goto L_Success;
L_OutOfBounds:
- // XXX: maybe we could also take from other chars from the same accout?
- message strcharinfo(0), .@n$+" : Impossible to proceed! This would cause the player to have less than 0 zeny or more than " + .max_int + ".";
+ // XXX: can getexp even work with a negative number?
+ message strcharinfo(0), .@n$+" : Impossible to proceed! This would cause the player to have less than 0 xp or more than " + .max_int + ".";
end;
L_Failed:
@@ -24,7 +26,7 @@ L_Failed:
end;
L_Success:
- gmlog "@getexp " + @args$;
+ gmlog "@" + .@n$ + " " + @args$;
message strcharinfo(0), .@n$+" : The operation succeeded.";
end;
diff --git a/world/map/npc/items/max_stat.txt b/world/map/npc/items/max_stat.txt
new file mode 100644
index 00000000..a8c72190
--- /dev/null
+++ b/world/map/npc/items/max_stat.txt
@@ -0,0 +1,23 @@
+// ------------------------------------------------------------
+// Variables passed to this script:
+// @slotId The slot in which the item would have been equipped in.
+// This is passed automagically when called in an equip script.
+// @bStat The stat to check against.
+// Usually one of: bStr, bAgi, bVit, bInt, bDex, bLuk;
+// but can be anything that works with .
+// @maxbStatVal The minimum stat value to accept this item.
+// ------------------------------------------------------------
+
+function|script|RequireMaxStat
+{
+ set @bStatVal, @bStat;
+ // If the requirement isn't met, we set an unequip trigger.
+ // The item is now removed.
+ if (@bStat > @maxbStatVal)
+ goto L_Unequip;
+ return;
+
+L_Unequip:
+ callfunc "UnequipLater";
+ return;
+}
diff --git a/world/map/npc/items/nobow_item.txt b/world/map/npc/items/nobow_item.txt
new file mode 100644
index 00000000..a518fdf4
--- /dev/null
+++ b/world/map/npc/items/nobow_item.txt
@@ -0,0 +1,29 @@
+// Cannot have a (power) bow in inventory to equip
+// Variables passed to this script:
+// @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script.
+
+function|script|NoBowItem
+{
+ // Developers are always allowed to use this item
+ if (getgmlevel() >= G_DEV)
+ goto L_Return;
+
+ // Bows which are not allowed
+ if (countitem("BansheeBow") > 0)
+ goto L_Abort;
+ if (countitem("DesertBow") > 0)
+ goto L_Abort;
+ if (countitem("ForestBow") > 0)
+ goto L_Abort;
+ // Don't care with Bow/ShortBow/slings and darts
+
+ goto L_Return;
+
+L_Abort:
+ message strcharinfo(0), "This item is too cumbersome to use and could potentially break your valuable bow by accident. So you give up.";
+ callfunc "UnequipLater";
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index f17cc922..fd1311fb 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -51,6 +51,8 @@ npc: npc/items/scentedcandle.txt
npc: npc/items/tmwgift.txt
npc: npc/items/brawling_item.txt
npc: npc/items/drugs.txt
+npc: npc/items/max_stat.txt
+npc: npc/items/nobow_item.txt
import: npc/_import.txt
// magic