summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/mob_points.txt176
1 files changed, 41 insertions, 135 deletions
diff --git a/npc/functions/mob_points.txt b/npc/functions/mob_points.txt
index 365adc8f..cecf645e 100644
--- a/npc/functions/mob_points.txt
+++ b/npc/functions/mob_points.txt
@@ -1,140 +1,46 @@
+// TMW2 Scripts
+// Author: Crazyfefe
+// Jesusalva
+// Desc: Mob Points for Aidan & Ishi. You will gain MONSTER-LEVEL mob points.
+
+// fix_mobkill(mobID) → Manual fix for scripted mobs
+function script fix_mobkill {
+ killedrid=getarg(0);
+ doevent "#mobptsys::OnNPCKillEvent";
+ return;
+}
function script MobPoints {
- if (@mobId < 1002) goto L_Return;
-
- setarray @points,
- 1, // Maggot
- 2, // Scorpion
- 20, // Red Scorpion
- 40, // Green Slime
- 30, // Giant Maggot
- 15, // Yellow Slime
- 25, // Red Slime
- 45, // Black Scorpion
- 50, // Snake
- 6, // Fire Goblin
- 55, // Spider
- 35, // Evil Mushroom
- 35, // Pink Flower
- 40, // Santa Slime
- 15, // Rudolph Slime
- 2, // Bat
- 16, // Pinkie
- 10, // Spiky Mushroom
- 14, // Fluffy
- 25, // Cave Snake
- 200, // Jack O
- 85, // Fire Skull
- 85, // Poison Skull
- 20, // Log Head
- 70, // Mountain Snake
- 15, // Easter Fluffy
- 40, // Mouboo
- 0, // Mauve Plant
- 0, // Cobalt Plant
- 0, // Gamboge Plant
- 0, // Alizarin Plant
- 20, // Sea Slime
- 75, // Grass Snake
- 0, // Silk Worm
- 125, // Zombie
- 0, // Clover Patch
- 5, // Squirrel
- 0, // Fire Lizard
- 80, // Wisp
- 15, // Snail
- 80, // Spectre
- 100, // Skeleton
- 100, // Lady Skeleton
- 150, // Fallen
- 0, // Snake Lord
- 80, // Poltergeist
- 0, // Duck
- 15, // Bee
- 0, // Larvespa
- 0, // Vespa
- 0, // Hivespa
- 0, // Froad
- 0, // Troll
- 15, // Butterfly
- 2, // Cave Maggot
- 10, // Angry Scorpion
- 6, // Ice Goblin
- 20, // Archant
- 40, // Giant Cave Maggot
- 35, // Moggun
- 100, // Terranite
- 10, // Pumpkin
- 10, // Bandit
- 20, // Bandit Lord
- 30, // Vampire Bat
- 20, // Reaper
- 100, // Scythe
- 20, // Ball Lightning
- 60, // Ice Element
- 80, // Yeti
- 100, // The Lost
- 60, // Red Bone
- 60, // Stalker
- 0, // Dreadwing
- 100, // Drunken Skeleton
- 100, // Tipsy Skeleton
- 100, // Drunken Lady Skeleton
- 60, // BlueSpark
- 60, // RedSpark
- 0, // Serqet
- 60, // HuntsmanSpider,
- 40, // CrotcherScorpion,
- 0, // IceSkull,
- 120, // FeyElement,
- 10, // Larvern,
- 60, // Hyvern,
- 20, // HungryFluffy,
- 40, // Wolvern,
- 50, // BlueSlime,
- 0, // SlimeBlast,
- 20, // WhiteSlime,
- 40, // Reinboo,
- 0, // WhiteBell,
- 60, // SoulSnake
- 100, // SoulEater
- 25, // CopperSlime
- 0, // SleepingBandit
- 20, // AzulSlime
- 80, // DemonicSpirit
- 940, // Luvia
- 150, // WitchGuard
- 50, // DemonicMouboo
- 15, // ViciousSquirrel
- 20, // WickedMushroom
- 18, // Bluepar
- 10, // AngryFireGoblin
- 35, // AngrySeaSlime
- 50, // CandiedSlime
- 40, // Santaboo
- 30, // Pollett
- 100, //Nutcracker
- 40, // SeaSlimeMother
- 50, // UndeadWitch
- 60, // UndeadTroll
- 80, // GreenSlimeMother
- 100, // Thug
- 100, // Swashbuckler
- 100, // Grenadier
- 150, // DreadPirateMarley
- 10, // DreadPirateMarleyClone
- 100, // Wight
- 100, // ManaGhost
- 100, // PsiBrain
- 150, // GeneralKurkan
- 175, // GeneralRazha
- 200 // GeneralTerogan
- // No more room! script engine is buggy, sorry.
- // -o11c
- ; // END
-
- if (MPQUEST == 1)
- Mobpt = Mobpt + @points[@mobId - 1002];
+ $MONSTERS_KILLED+=1;
+ MONSTERS_KILLED+=1;
+
+ if (MPQUEST) {
+ .@moblv=strmobinfo(3,killedrid);
+
+ // You get MobLv + 20% as MobPoints.
+ // So a level 100 monster gives you 120 MobPt. Slimes gives no bonus.
+ if (compare("slime", strtolower(strmobinfo(1, killedrid))))
+ .@addval=.@moblv;
+ else
+ .@addval=.@moblv*12/10;
+
+ // Penalty/Bonus
+ .@base=(.@moblv-BaseLevel);
+
+ if (BaseLevel < .@moblv) {
+ // Target is stronger, +3% per monster level, capped at +75%
+ .@addval = .@addval * limit(100, 100+(.@base*3), 175) / 100;
+ } else if (BaseLevel > .@moblv) {
+ // Target is weaker, -1% per monster level, capped at -50%
+ .@addval = .@addval * limit(50, 101+.@base, 100) / 100;
+ }
+
+ // Sanitization
+ .@addval=max(0, .@addval);
+
+ // Grant you the Monster Points
+ Mobpt+=.@addval;
+ }
callfunc "ValonCount";
if (((QL_VALON >= 2) && (QL_VALON < 6)) && (@mobId == $@ValonMob[@valon_mob]))