Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------
- -- Area: Al'Taieu
- -- HNM: Absolute Virtue
- -----------------------------------
- require("scripts/globals/titles");
- require("scripts/globals/status");
- require("scripts/globals/magic");
- -----------------------------------
- -- onMobSpawn Action
- -----------------------------------
- function onMobSpawn(mob)
- -- setMod
- mob:setMod(MOD_REGEN, 500);
- SetServerVariable("AV_Regen_Reduction", 1);--SBS
- local JoL = GetMobByID(16912848);
- -- Special check for regen modification by JoL pets killed
- if (JoL:getLocalVar("JoL_Qn_xzomit_Killed") == 9) then
- mob:addMod(MOD_REGEN, -130);
- end
- if (JoL:getLocalVar("JoL_Qn_hpemde_Killed") == 9) then
- mob:addMod(MOD_REGEN, -130);
- end
- end;
- -----------------------------------
- -- onMobFight Action
- -----------------------------------
- function onMobFight(mob, target)
- -- Spawn the pets if they are despawned
- -- TODO: summon animations?
- if (GetMobAction(16912877) == 0) then
- GetMobByID(16912877):setSpawn(mob:getXPos()+math.random(1,5), mob:getYPos(), mob:getZPos()+math.random(1,5));
- SpawnMob(16912877, 500):updateEnmity(target);
- elseif (GetMobAction(16912878) == 0) then
- GetMobByID(16912878):setSpawn(mob:getXPos()+math.random(1,5), mob:getYPos(), mob:getZPos()+math.random(1,5));
- SpawnMob(16912878, 500):updateEnmity(target);
- elseif (GetMobAction(16912879) == 0) then
- GetMobByID(16912879):setSpawn(mob:getXPos()+math.random(1,5), mob:getYPos(), mob:getZPos()+math.random(1,5));
- SpawnMob(16912879, 500):updateEnmity(target);
- end
- -- Ensure all spawned pets are doing stuff..
- for pets = 16912877, 16912879 do
- if (GetMobAction(pets) == 16) then
- -- Send pet after current target..
- GetMobByID(pets):updateEnmity(target);
- end
- end
- end
- --SBS increase damage on Aeroga 3 to put it in line with damage from non-functioning Aeroga 4
- --function onSpellCast (mob, target)
- --if (spell:getID()== 186) then
- --dmg = dmg * 1.5;--NOT CURRENTLY WORKING SBS
- --end
- --end;
- ------------------------------------
- -- onSpellPrecast
- ------------------------------------
- function onSpellPrecast(mob, spell)
- if (spell:getID() == 218) then -- Meteor
- spell:setAoE(SPELLAOE_RADIAL);
- spell:setFlag(SPELLFLAG_HIT_ALL);
- spell:setRadius(30);
- spell:setAnimation(280); -- AoE Meteor Animation
- spell:setMPCost(1);
- end
- end;
- ------------------------------------
- -- onMonsterMagicPrepare
- ------------------------------------
- function onMonsterMagicPrepare(caster, target)
- end;
- -----------------------------------
- -- onMagicHit
- -----------------------------------
- function onMagicHit(caster, target, spell)
- local REGEN = target:getMod(MOD_REGEN);
- local DAY = VanadielDayElement();
- local ELEM = spell:getElement();
- if (GetServerVariable("AV_Regen_Reduction") < 60) then
- -- Had to serverVar the regen instead of localVar because localVar reset on claim loss.
- if (ELEM == DAY and (caster:isPC() or caster:isPet())) then
- SetServerVariable("AV_Regen_Reduction", 1+GetServerVariable("AV_Regen_Reduction"));
- target:addMod(MOD_REGEN, -2);
- end
- end
- return 1;
- end;
- -----------------------------------
- -- onMobDespawn
- -----------------------------------
- function onMobDespawn(mob)
- --SBS reset variable
- mob:setLocalVar("JoL_Qn_hpemde_Killed", 0);
- mob:setLocalVar("JoL_Qn_hpemde_Killed", 0);
- SetServerVariable("AV_Regen_Reduction", 0);
- --DespawnMob(mob:getID()+1);
- --DespawnMob(mob:getID()+2);
- -- Despawn pets..
- DespawnMob(16912877);
- DespawnMob(16912878);
- DespawnMob(16912879);
- end;
- -----------------------------------
- -- onMobDeath
- -----------------------------------
- function onMobDeath(mob, player, isKiller)
- player:addTitle(VIRTUOUS_SAINT);
- --SBS reset variable
- mob:setLocalVar("JoL_Qn_hpemde_Killed", 0);
- mob:setLocalVar("JoL_Qn_hpemde_Killed", 0);
- SetServerVariable("AV_Regen_Reduction", 0);
- --DespawnMob(mob:getID()+1);
- --DespawnMob(mob:getID()+2);
- -- Despawn pets..
- DespawnMob(16912877);
- DespawnMob(16912878);
- DespawnMob(16912879);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement