// 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 (isChristmas21() && compare(getmap(), "@"+callfunc("X21ID2"))) { if (getmonsterinfo(@mobId, MOB_LV) >= 150 && rand2(4) == 1) getitem XmasTicket, 2; else if (getmonsterinfo(@mobId, MOB_LV) >= 100 && rand2(4) == 1) getitem XmasTicket, 1; else if (getmonsterinfo(@mobId, MOB_LV) > 50 && rand2(6) == 3) getitem XmasTicket, 1; else if (rand2(12) == 3) getitem XmasTicket, 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; } ValonCount(); if (((getq(CandorQuest_Valon) >= 2) && (getq(CandorQuest_Valon) < 6)) && (@mobId == $@ValonMob[@valon_mob])) AddValonCntMask(); // Attitude adjustment for Sagatha switch (@mobId) { case Pinkie: case Fluffy: case EasterFluffy: case Reinboo: case Santaboo: case Pollett: QuestSagathaAnnoy(3); break; case Mouboo: QuestSagathaAnnoy(4); break; case Squirrel: QuestSagathaAnnoy(2); break; case Scorpion: case RedScorpion: case BlackScorpion: case AngryScorpion: case DemonicMouboo: case ViciousSquirrel: case WickedMushroom: case Bluepar: QuestSagathaHappy(1); break; } if (QL_CELESTIA >= 5 && QL_CELESTIA < 205 && @mobId == Yeti) { QL_CELESTIA += 1; if (QL_CELESTIA == 205) message strcharinfo(0), "Yeti : ##3This should be enough yetis killed to please Celestia."; } if (TERRAC > 1 && TERRAC < 1500 && @mobId == Terranite) { if (TERRAC % 100 == 0) dispbottom("Terranite : ##3"+l("Total Terranites Slain: %s", fnum(TERRAC))); TERRAC += 1; } return; }