diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-07-07 20:36:00 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-07-07 20:36:00 -0300 |
commit | 6967b9e0b63d19141d4f59b7933a960ac81916d0 (patch) | |
tree | 8ecd9cd2461f3598cb7faece71eb77162aa4ef2a /npc/functions/mob_points.txt | |
parent | 9877fd4ad81120af8e63e96d5d429092014dc017 (diff) | |
parent | 046c659193e1ca8bd13478678d1277df8bf9395c (diff) | |
download | serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.gz serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.bz2 serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.xz serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.zip |
Merge branch 'master' into legacy
Override all files with 'master' version.
This version is meant to preserve git history as requested by bjorn.
Diffstat (limited to 'npc/functions/mob_points.txt')
-rw-r--r-- | npc/functions/mob_points.txt | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/npc/functions/mob_points.txt b/npc/functions/mob_points.txt new file mode 100644 index 00000000..f4cbedf0 --- /dev/null +++ b/npc/functions/mob_points.txt @@ -0,0 +1,83 @@ +// 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 "#GlobalHandler::OnNPCKillEvent"; + return; +} + +function script MobPoints { + $MONSTERS_KILLED+=1; + MONSTERS_KILLED+=1; + @mobId=killedrid; + + 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; + } + + ValonCount(); + if (((getq(CandorQuest_Valon) >= 2) && + (getq(CandorQuest_Valon) < 6)) && + (@mobId == $@ValonMob[@valon_mob])) + AddValonCntMask(); + + + // Attitude adjustment for Sagatha + switch (@mobId) { + case 1018: + case 1020: + case 1027: + case 1094: + case 1112: + case 1113: + QuestSagathaAnnoy(3); break; + case 1028: + QuestSagathaAnnoy(4); break; + case 1038: + QuestSagathaAnnoy(2); break; + case 1003: + case 1004: + case 1009: + case 1057: + case 1104: + case 1105: + case 1106: + case 1107: + QuestSagathaHappy(1); break; + } + + if (QL_CELESTIA >= 5 && QL_CELESTIA < 205 && @mobId == Yeti) { + QL_CELESTIA = QL_CELESTIA + 1; + if (QL_CELESTIA == 205) + message strcharinfo(0), "Yeti : ##3This should be enough yetis killed to please Celestia."; + } + return; +} |