Ir para conteúdo

Featured Replies

Postado

Estou com um problema, não consigo identifica o que a de errado em minha criatura ela se cura de mais.
 

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Imhotep" nameDescription="a imhotep" race="undead" experience="22500" speed="280" manacost="0">
    <health now="185000" max="185000"/>
    <look type="91" corpse="12838"/>
    <targetchange interval="1500" chance="20"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag convinceable="1"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag staticattack="90"/>
        <flag targetdistance="1"/>
        <flag runonhealth="850"/>
    </flags>
    <script>
        <event name="Imhotep"/>
    </script>
    <attacks>
        <attack name="melee" interval="2000" skill="150" attack="100" poison="-350"/>
        <attack name="poison" interval="986" chance="10" range="1" min="-265" max="-390">
            <attribute key="areaEffect" value="plantattack"/>
        </attack>
        <attack name="manadrain" interval="1053" chance="12" radius="4" target="0" min="-50" max="-150">
            <attribute key="areaEffect" value="poison"/>
        </attack>
        <attack name="earth" interval="1002" chance="11" length="3" spread="0" min="-864" max="-1242">
            <attribute key="areaEffect" value="carniphila"/>
        </attack>
        <attack name="poison" interval="1110" chance="12" radius="3" target="1" min="-424" max="-612">
            <attribute key="areaEffect" value="poison"/>
            <attribute key="shootEffect" value="poison"/>
        </attack>
        <attack name="poisoncondition" interval="1193" chance="12" radius="3" target="0" min="-660" max="-720">
            <attribute key="areaEffect" value="greenbubble"/>
        </attack>
        <attack name="earth" interval="901" chance="13" target="1" min="-388" max="-622">
            <attribute key="areaEffect" value="carniphila"/>
            <attribute key="shootEffect" value="earth"/>
        </attack>
    </attacks>
    <defenses armor="35" defense="40">
        <defense name="speed" interval="2000" chance="20" speedchange="450" duration="4000">
            <attribute key="areaEffect" value="poff"/>
        </defense>
        <defense name="healing" interval="9000" chance="11" min="700" max="999">
            <attribute key="areaEffect" value="greenspark"/>
        </defense>
    </defenses>
  <elements>
    <element energyPercent="10"/>
    <element icePercent="20"/>
    <element deathPercent="25"/>
    <element holyPercent="40"/>
    <element firePercent="-10"/>
  </elements>
  <immunities>
    <immunity earth="1"/>
    <immunity drunk="1"/>
    <immunity lifedrain="1"/>
    <immunity paralyze="1"/>
    <immunity invisible="1"/>
  </immunities>
  <summons maxSummons="1">
		<summon name="Elite Scarab" interval="2000" chance="50" max="1"/>
	</summons>
  <voices interval="5000" chance="10">
    <voice sentence="I am the death!"/>
  </voices>
</monster>

Na minha mente estaria certo, mas ela heala muitoo e está muito poderosa.

Aqui está script do mesmo.
 

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2500)
setConditionFormula(condition, -0.75, 0, -0.80, 0)

local haste = createConditionObject(CONDITION_HASTE)
setConditionParam(haste, CONDITION_PARAM_TICKS, math.random(1000,5000))
setConditionFormula(haste, 2.00, 50, 4.00, 100)

local invisible = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(invisible, CONDITION_PARAM_TICKS, math.random(1000,5000))

local pos = getCreaturePosition

local fields = {
                [1] = {item_id = {1497,1499}, effect = CONST_ME_TELEPORT},
                [2] = {item_id = {1492,1493,1494,1500,1501,1502}, effect = CONST_ME_MAGIC_RED},
                [3] = {item_id = {1495,1504}, effect = CONST_ME_MAGIC_BLUE},
                [4] = {item_id = {1496}, effect = CONST_ME_MAGIC_GREEN}
                }

    local function zabijansko2(p)
        local cid = p.cid
        local loc = p.loc
            doSendMagicEffect(loc, CONST_ME_SMALLPLANTS) 
            local creatureFound = getThingFromPos(loc) 
            if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid and getCreatureName(creatureFound.uid) ~= "elite scarab" then
                local hp = getCreatureHealth(creatureFound.uid)
				doCreatureSay(cid, "DOOOOMMM!", TALKTYPE_ORANGE_1, false, 0, getCreaturePosition(cid))
                doCreatureAddHealth(cid, hp*5)
                doSendAnimatedText(pos(cid), hp*5, COLOR_LIGHTGREEN)
                doTargetCombatHealth(cid, creatureFound.uid, COMBAT_EARTHDAMAGE, -hp/3, -hp/2, CONST_ME_CARNIPHILA)
				doTargetCombatHealth(cid, creatureFound.uid, COMBAT_EARTHDAMAGE, -650, -1450, CONST_ME_CARNIPHILA)
            end
    end

    local function efekty(p) 
    local cid = p.cid
    local loc = p.loc
        if isCreature(cid) then
            doSendMagicEffect(loc, CONST_ME_HITBYPOISON)
            doSendMagicEffect(loc, CONST_ME_GREEN_RINGS)
                if p.s < 6 then
                    addEvent(efekty, 250, p)
                    p.s = p.s + 1
                else
                    addEvent(zabijansko2, 1000, {cid = cid, loc = loc} ) 
                end
        end
    end                

    local function zabijansko(p)
        local cid = p.cid
        if isCreature(cid) then
            for nx = (pos(cid).x - 1), (pos(cid).x + 1) do
                for ny = (pos(cid).y - 1), (pos(cid).y + 1) do
                    doSendMagicEffect({x=nx,y=ny,z=pos(cid).z}, CONST_ME_BIGPLANTS)
                    doSendMagicEffect({x=nx,y=ny,z=pos(cid).z}, CONST_ME_SMALLPLANTS)
                    local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }) 
                        if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid and isInArray({"elite scarab"}, getCreatureName(creatureFound.uid)) == false then
                            local hp = getCreatureHealth(creatureFound.uid)
                            doCreatureAddHealth(cid, hp*3)
                            doSendAnimatedText(pos(cid), hp*3, COLOR_LIGHTGREEN)
                            doTargetCombatHealth(cid, creatureFound.uid, COMBAT_EARTHDAMAGE, -hp/3, -hp/2, CONST_ME_SMALLPLANTS)
							doTargetCombatHealth(cid, creatureFound.uid, COMBAT_EARTHDAMAGE, -150, -500, CONST_ME_CARNIPHILA)
                        end
                end
            end
        end
    end

    local function efekt(p) 
        local cid = p.cid
        if isCreature(cid) then
            for nx = (pos(cid).x - 1), (pos(cid).x + 1) do 
                for ny = (pos(cid).y - 1), (pos(cid).y + 1) do 
                    doSendMagicEffect( { x = nx, y = ny, z = pos(cid).z }, CONST_ME_SMALLPLANTS)
                    if p.n < 5 then
                        p.n = p.n + 1
                        addEvent(efekt, 500, p)
                    end
                end
            end
        end
    end

function onThink(cid)
if isMonster(cid) then
    if math.random(1, 100) <= 25 then
        for nx = (pos(cid).x - 1), (pos(cid).x + 1) do 
            for ny = (pos(cid).y - 1), (pos(cid).y + 1) do 
                doSendMagicEffect( { x = nx, y = ny, z = pos(cid).z }, CONST_ME_SMALLPLANTS) 
            end
        end
        addEvent(zabijansko, 3000, {cid = cid}) 
        addEvent(efekt, 500, {cid = cid, n = 1}) 
        atakuje = true
    end

    if math.random(1, 100) <= 40 then 
            for nx = (pos(cid).x - 1), (pos(cid).x + 1) do 
                for ny = (pos(cid).y - 1), (pos(cid).y + 1) do 
                    for i=1, 254 do
                        stackpos = i
                        local fieldFound = getThingFromPos({x = nx, y = ny, z = pos(cid).z, stackpos = stackpos}) 
                        for k=1, #fields do
                        if fieldFound.uid ~= 0 and isInArray(fields[k].item_id, fieldFound.itemid) then
                            if fieldFound.itemid == 1496 then
                                if math.random(1,100) <= 25 then
									doCreateMonster("Elite Scarab", getThingPos(fieldFound.uid), false, true);
                                    doSendMagicEffect(getThingPos(fieldFound.uid), CONST_ME_GREEN_RINGS)
                                else
                                    doSendMagicEffect(getThingPos(fieldFound.uid), fields[k].effect)
                                end
                            else
                                doSendMagicEffect(getThingPos(fieldFound.uid), fields[k].effect)
                            end
                            doRemoveItem(fieldFound.uid)
                        end
                        end
                    end
                end
            end
    end
     
    if math.random(1, 100) <= 15 then 
        if getCreatureHealth(cid) >= 10000 then
            for nx = (pos(cid).x - 5), (pos(cid).x + 5) do 
                for ny = (pos(cid).y - 5), (pos(cid).y + 5) do 
                    local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE })
                    if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then 
                        if math.random(1,5) <= 1 then
                            doTeleportThing(cid, getThingPos(creatureFound.uid)) 
                            doSendMagicEffect(getThingPos(creatureFound.uid), CONST_ME_TELEPORT) 
                        end
                    end
                end
            end
        end
    end

    if math.random(1, 100) <= 15 then 
        if getCreatureHealth(cid) <= 10000 then
            if math.random(1,100) <= 50 then
                doAddCondition(cid, haste)
                doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
            end
            if math.random(1,100) <= 25 then
                doAddCondition(cid, invisible)
            end
            if math.random(1,100) <= 25 then
                for nx = (pos(cid).x - 7), (pos(cid).x + 7) do 
                for ny = (pos(cid).y - 7), (pos(cid).y + 7) do 
                    local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }) 
                    if isPlayer(creatureFound.uid) and creatureFound.uid ~= cid and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then
                        doAddCondition(creatureFound.uid, condition)
                        doSendMagicEffect(getThingPos(creatureFound.uid), CONST_ME_POISONAREA)
                        doSendDistanceShoot(getThingPos(cid), getThingPos(creatureFound.uid), CONST_ANI_POISON)
                    end
                end
                end
            end
        end
    end

    if math.random(1, 100) <= 20 then 
        for nx = (pos(cid).x - 5), (pos(cid).x + 5) do 
            for ny = (pos(cid).y - 5), (pos(cid).y + 5) do 
                local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }) 
                if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid then
                    if math.random(1, 3) == 1 then 
                        local poss = getThingPos(creatureFound.uid)
                        if not(getTilePzInfo(poss) == true or getTileHouseInfo(poss) == true) then
                            if isCreature(creatureFound.uid) and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then
                                doSendDistanceShoot(pos(cid), pos(creatureFound.uid), CONST_ANI_EARTH) 
                                doSendMagicEffect(poss, CONST_ME_HITBYPOISON)
                                doSendMagicEffect(poss, CONST_ME_GREEN_RINGS)
                                doAddCondition(creatureFound.uid, condition)
                                addEvent(efekty, 250, {cid = cid, loc = pos(creatureFound.uid), s = 0})
                            end
                        end
                    end
                end
            end
        end
    end
end
    return true
end

 

Postado
  • Autor
1 minuto atrás, Celulose disse:

<defense name="healing" interval="9000" chance="11" min="700" max="999">

 

Isso mas seria no script da mecânica dele não to conseguindo fazer funfa.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo