Moj mistrz
Monster Creator
Hello, I've come here ask for a help in one script.
Basically it works fine, it starts after 10 seconds, but it teleports creature(after that 10s) faster than in a sec. It don't teleport creature after 10 seconds always as it should. Thanks for any help.
#edit:
error:
Script should work like that - if creature gets damaged when in full health it goes invisible(no matter if damaged it will stay invisible) unless you put a poison field under it. Hope you get what I mean.
Code:
function onThink(cid)
addEvent(Teleport, 10000, cid)
end
function Teleport (cid)
local position = {
[1] = {pos = {x=32955, y=32073, z=6}},
[2] = {pos = {x=32962, y=32073, z=6}},
[3] = {pos = {x=32962, y=32080, z=6}},
[4] = {pos = {x=32955, y=32080, z=6}}
}
spawn = position[math.random(1,4)]
doTeleportThing(cid, spawn.pos)
doSendMagicEffect(getCreaturePosition(cid), 10)
return TRUE
end
#edit:
Code:
function onThink(cid, words, param)
local creature = Creature(cid)
if creature ~= nil then
local isGhost = not creature:isInGhostMode()
local hp = (getCreatureHealth(cid)/getCreatureMaxHealth(cid))*100
creature:setGhostMode(isGhost)
if isGhost and (hp < 99.99) and getCreatureName(cid) == "Zavarash" and getCreatureCondition(cid, CONDITION_POISON) == FALSE then
else
end
return false
end
end
Script should work like that - if creature gets damaged when in full health it goes invisible(no matter if damaged it will stay invisible) unless you put a poison field under it. Hope you get what I mean.
Last edited: