viewing paste Unknown #21444 | Lua

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
-----------------------------------
-- Area: ?
-- VWNM:
-----------------------------------
 
require("scripts/globals/status");
require("scripts/globals/magic");
require("scripts/globals/utils");
require("scripts/globals/keyitems");
require("scripts/globals/quests");
 
-----------------------------------
-- onMobInitialize Action
-----------------------------------
 
function onMobInitialize(mob)
    mob:setMobMod(MOBMOD_MAGIC_COOL, 45);
 
    -- addMod
    mob:addMod(MOD_MDEF,25);
end;
 
-----------------------------------
-- onMobSpawn Action
-----------------------------------
 
function onMobSpawn(mob)
    -- setMod
    mob:setMod(MOD_REGEN, 100);
    mob:setMod(MOD_REGAIN, 10);
    mob:setMod(MOD_REFRESH, 250);
    mob:setMod(MOD_UFASTCAST, 55);
    mob:setMod(MOD_MACC,1950);
    mob:setMod(MOD_MATT,90);
    mob:setMod(MOD_DOUBLE_ATTACK,25);
end;
 
-----------------------------------
-- onMobEngage Action
-----------------------------------
 
function onMobEngage(mob, target)
end;
 
-----------------------------------
-- onMobWeaponSkill Action
-----------------------------------
 
function onMobWeaponSkill(target, mob, skill)
end;
 
-----------------------------------
-- onMobFight Action
-----------------------------------
 
function onMobFight(mob, target)
    local XuanWu = mob:getLocalVar("XuanWu");
    local QingLong = mob:getLocalVar("QingLong");
    local BaiHu = mob:getLocalVar("BaiHu");
    local ZhuQue = mob:getLocalVar("ZhuQue");
 
    if (mob:getHPP() < 90) then
        if (XuanWu == 0) then
            SpawnMob(17506685, 300):updateEnmity(player);
            mob:setPos(mob:getXPos(), mob:getYPos(), mob:getZPos());
            mob:setLocalVar("XuanWu", 1);
        end
    elseif (mob:getHPP() < 70) then
        if (QingLong == 0) then
            SpawnMob(17506683, 300):updateEnmity(player);
            mob:setPos(mob:getXPos(), mob:getYPos(), mob:getZPos());
            mob:setLocalVar("QingLong", 1);
        end
    elseif (mob:getHPP() < 50) then
        if (BaiHu == 0) then
            SpawnMob(17506682, 300):updateEnmity(player);
            mob:setPos(mob:getXPos(), mob:getYPos(), mob:getZPos());
            mob:setLocalVar("BaiHu", 1);
        end
    elseif (mob:getHPP() < 30) then
        if (ZhuQue == 0) then
            SpawnMob(17506684, 300):updateEnmity(player);
            mob:setPos(mob:getXPos(), mob:getYPos(), mob:getZPos());
            mob:setLocalVar("ZhuQue", 1);
        end
    end
end;
 
-----------------------------------
-- onMobDeath
-----------------------------------
 
function onMobDeath(mob, killer)
    killer:addCurrency("bayld", 750);
    killer:addExp(10000);
    DespawnMob(mob:getID()+1);
    DespawnMob(mob:getID()+2);
    DespawnMob(mob:getID()+3);
    DespawnMob(mob:getID()+4);
 
    if (killer:hasKeyItem(ASHEN_STRATUM_ABYSSITE_III)) then -- Qilin Kill
        if (killer:getMaskBit(killer:getVar("ZILART_VW"), 1) == false) then
           killer:setMaskBit(killer:getVar("ZILART_VW"),"ZILART_VW",1,true);
        end
        if (killer:isMaskFull(killer:getVar("ZILART_VW"),3) == true) then
           killer:delKeyItem(ASHEN_STRATUM_ABYSSITE_III);
        end
    end
end;
Viewed 981 times, submitted by Guest.