silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,480
- Solutions
- 9
- Reaction score
- 212
Hey guy, do you have a new monsters? 10.50
I need haha' and you is THE guy
I need haha' and you is THE guy
I will for sure... someday.bro, update your pack spells and creatureevents to tfs 1.1
very nice kkkI will for sure... someday.
local hp = (creature:getHealth()/creature:getMaxHealth())*100very nice kkk
is hard to me update this
if you tell me how fix this line using tfs 1.1
I try update for myself and post here
the line is:
local hp = (getCreatureHealth(cid)/getCreatureMaxHealth(cid))*100
i think that they change the function GetCreatureHealth
to what i don't know :/ and have anothers "line bugs" ... GetSummons i think
i will try use, so, clear (cid) and left only () will resolve the problem?local hp = (creature:getHealth()/creature:getMaxHealth())*100
Well, i try with the line that you send
but
local running = false
function onThink(cid)
local hp = (creature:getHealth()/creature:getMaxHealth())*100
if (hp < 5.5 and not running) then
doCreatureSay(cid, "Gaz'haragoth begins to draw on the nightmares to HEAL himself!", TALKTYPE_ORANGE_2)
running = true
addEvent(Uheal, 7000, cid)
end
end
function Uheal(cid)
running = false
doCreatureAddHealth(cid, 300000)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
doCreatureSay(cid, "Gaz'haragoth HEALS himself!", TALKTYPE_ORANGE_2)
return true
end
left something, error say that is at line 2 and 3
local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_SUBID, 88888)
condition:setParameter(CONDITION_PARAM_TICKS, 7 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 7 * 1000)
function onThink(creature)
local hp = (creature:getHealth()/creature:getMaxHealth())*100
if (hp < 5.5 and getCreatureCondition(creature, CONDITION_REGENERATION, 88888) == false) then
creature:addCondition(condition)
creature:say("Gaz'haragoth begins to draw on the nightmares to HEAL himself!", TALKTYPE_ORANGE_2)
addEvent(Uheal, 7000, creature:getId())
end
end
local function Uheal(cid)
creature:addHealth(300000)
creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
creature:say("Gaz'haragoth HEALS himself!", TALKTYPE_ORANGE_2)
return true
end
I get debug in client, and erros on line 11 and 13...Code:local condition = Condition(CONDITION_REGENERATION) condition:setParameter(CONDITION_PARAM_SUBID, 88888) condition:setParameter(CONDITION_PARAM_TICKS, 7 * 1000) condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 7 * 1000) function onThink(creature) local hp = (creature:getHealth()/creature:getMaxHealth())*100 if (hp < 5.5 and getCreatureCondition(creature, CONDITION_REGENERATION, 88888) == false) then creature:addCondition(condition) creature:say("Gaz'haragoth begins to draw on the nightmares to HEAL himself!", TALKTYPE_ORANGE_2) addEvent(Uheal, 7000, creature:getId()) end end local function Uheal(cid) creature:addHealth(300000) creature:getPosition()(CONST_ME_MAGIC_BLUE) creature:say("Gaz'haragoth HEALS himself!", TALKTYPE_ORANGE_2) return true end
Try this, should solve unsafe argument.
copy again my script, i've changed some lines.I get debug in client, and erros on line 11 and 13...
with this
doCreatureAddHealth
i have this error, with debug on client...
local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_SUBID, 88888)
condition:setParameter(CONDITION_PARAM_TICKS, 7 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 7 * 1000)
function onThink(creature)
local hp = (creature:getHealth()/creature:getMaxHealth())*100
if (hp < 5.5 and getCreatureCondition(creature, CONDITION_REGENERATION, 88888) == false) then
creature:addCondition(condition)
creature:say("Gaz'haragoth begins to draw on the nightmares to HEAL himself!", TALKTYPE_ORANGE_2)
addEvent(function(cid)
creature:addHealth(300000)
creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
creature:say("Gaz'haragoth HEALS himself!", TALKTYPE_ORANGE_2)
return true
end, 7000, creature:getId())
end
end
Files reworked using metamethods.
Creaturescripts:
http://www52.zippyshare.com/v/14024622/file.html
Monster spells:
http://www2.zippyshare.com/v/855095/file.html