Postado Junho 19, 2014 10 anos Olá , eu fui colocar esse script para funcionar mas ele apresenta erro na linha 35 "expected near 'end' " alguém poderia me ajudar ? local config = { healHP = 2000, healMP = 2000, healPlayers = "yes", healMonsters = "no", } local healthArea = { fromX = 603, fromY = 177, fromZ = 7, toX = 605, toY = 179, toZ = 7, } function onThink(cid, interval, lastExecution) for x = healthArea.fromX, healthArea.toX do for y = healthArea.fromY, healthArea.toY do for z = healthArea.fromZ, healthArea.toZ do local pos = {x=x, y=y, z=z, stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 then if(isPlayer(thing.uid) == TRUE and string.lower(config.healPlayers) == "yes") then doCreatureAddHealth(thing.uid, config.healHP) doCreatureAddMana(thing.uid, config.healMP) if string.lower(getConfigValue("showHealingDamage")) == "no" then end elseif(isMonster(thing.uid) == TRUE and string.lower(config.healMonsters) == "yes") then doCreatureAddHealth(thing.uid, config.healHP) if string.lower(getConfigValue("showHealingDamageForMonsters")) == "no" end end end end end return TRUE end
Postado Junho 20, 2014 10 anos Bom, eu posso estar falando a maior bobagem ou sei lá, mas estou tentando ajudá-lo..Tenta o script assim: local config = { healHP = 2000, healMP = 2000, healPlayers = "yes", healMonsters = "no", } local healthArea = { fromX = 603, fromY = 177, fromZ = 7, toX = 605, toY = 179, toZ = 7, } function onThink(cid, interval, lastExecution) for x = healthArea.fromX, healthArea.toX do for y = healthArea.fromY, healthArea.toY do for z = healthArea.fromZ, healthArea.toZ do local pos = {x=x, y=y, z=z, stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 then if(isPlayer(thing.uid) == TRUE and string.lower(config.healPlayers) == "yes") then doCreatureAddHealth(thing.uid, config.healHP) doCreatureAddMana(thing.uid, config.healMP) if string.lower(getConfigValue("showHealingDamage")) == "no" then end elseif(isMonster(thing.uid) == TRUE and string.lower(config.healMonsters) == "yes") then doCreatureAddHealth(thing.uid, config.healHP) if string.lower(getConfigValue("showHealingDamageForMonsters")) == "no" end end end end return TRUE end
Postado Junho 20, 2014 10 anos Autor Em 20/06/2014 em 00:14, Rusherzin disse: Bom, eu posso estar falando a maior bobagem ou sei lá, mas estou tentando ajudá-lo.. Tenta o script assim: local config = { healHP = 2000, healMP = 2000, healPlayers = "yes", healMonsters = "no", } local healthArea = { fromX = 603, fromY = 177, fromZ = 7, toX = 605, toY = 179, toZ = 7, } function onThink(cid, interval, lastExecution) for x = healthArea.fromX, healthArea.toX do for y = healthArea.fromY, healthArea.toY do for z = healthArea.fromZ, healthArea.toZ do local pos = {x=x, y=y, z=z, stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 then if(isPlayer(thing.uid) == TRUE and string.lower(config.healPlayers) == "yes") then doCreatureAddHealth(thing.uid, config.healHP) doCreatureAddMana(thing.uid, config.healMP) if string.lower(getConfigValue("showHealingDamage")) == "no" then end elseif(isMonster(thing.uid) == TRUE and string.lower(config.healMonsters) == "yes") then doCreatureAddHealth(thing.uid, config.healHP) if string.lower(getConfigValue("showHealingDamageForMonsters")) == "no" end end end end return TRUE end Não funcionou :/
Postado Junho 20, 2014 10 anos Deu o mesmo erro? Se não, qual? E me diga onde está usando esse script (por ex: spells,creaturescripts/) para eu poder usar aqui e tentar arrumá-lo. O que eu puder fazer para ajudar eu vou tentar..
Postado Junho 20, 2014 10 anos Autor Em 20/06/2014 em 00:25, Rusherzin disse: Deu o mesmo erro? Se não, qual? E me diga onde está usando esse script (por ex: spells,creaturescripts/) para eu poder usar aqui e tentar arrumá-lo. O que eu puder fazer para ajudar eu vou tentar.. Ele está no globalevents . <globalevent name="heal" interval="1" event="script" value="heal.lua"/>
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.