Postado Janeiro 12, 2019 6 anos Nuus nada ver a pos que coloquei ksks Mostrar conteúdo oculto local cfg = { items_area = { { itemid = 11497, area = { {0,0,0,0,0,0,0}, {0,1,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,1,0,0}, {0,0,0,0,0,0,0} } }, { itemid = 11498, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,1}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,1,0,0,0} } }, { itemid = 11499, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,1,0,0,0,0,0}, {0,0,0,0,0,0,1}, {0,0,0,0,0,0,0} } }, { itemid = 11500, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {1,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0} } }, { itemid = 11501, area = { {0,0,0,0,0,0,0}, {0,0,0,0,1,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,1,0,0,0,0}, {0,0,0,0,0,0,0} } } }, remove_time = 10, -- tempo em segundos para remover onuse_message = "Uma area foi atingida pelo Genjutsu de %s" -- message ao usar } function isWalkable(pos) -- by Yan Liima local tile = getThingfromPos(pos) if hasProperty(tile.uid, 0) == true or hasProperty(tile.uid, 3) == true then return false end return true end local combats = {} local pos = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} for i, t in ipairs(cfg.items_area) do combats = createCombatObject() setCombatArea(combats, createCombatArea(t.area)) function onTargetTile(cid, position) if isWalkable(pos) then doCreateItem(t.itemid, 1, position) addEvent(function() local thing = getTileItemById(position, t.itemid).uid if(thing ~= 0) then doRemoveItem(thing) end end, cfg.remove_time * 1000) end end setCombatCallback(combats, CALLBACK_PARAM_TARGETTILE, "onTargetTile") end function onCastSpell(cid, var) local combats = {} local outfit = {lookType = 90, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time1 = 4000 -- segundos que ficará com a outfit local position = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} for i = 1, #combats do doCombat(cid, combats, var) doSetCreatureOutfit(cid, outfit, time1) doSendMagicEffect(position, 193) end doBroadcastMessage(cfg.onuse_message:format(getCreatureName(cid)), MESSAGE_STATUS_WARNING) return true end? Editado Janeiro 12, 2019 6 anos por Yan Liima (veja o histórico de edições)
Postado Janeiro 12, 2019 6 anos Autor @Yan Liima [12/01/2019 13:07:12] [Error - Spell Interface] [12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua [12/01/2019 13:07:12] Description: [12/01/2019 13:07:12] (luaGetThingPosition) Thing not found [12/01/2019 13:07:12] [Error - Spell Interface] [12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua [12/01/2019 13:07:12] Description: [12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua:78: attempt to index a boolean value [12/01/2019 13:07:12] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/itachi/genjutsu.lua)
Postado Janeiro 12, 2019 6 anos Em 12/01/2019 em 16:09, Mark Charlotte disse: @Yan Liima [12/01/2019 13:07:12] [Error - Spell Interface] [12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua [12/01/2019 13:07:12] Description: [12/01/2019 13:07:12] (luaGetThingPosition) Thing not found [12/01/2019 13:07:12] [Error - Spell Interface] [12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua [12/01/2019 13:07:12] Description: [12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua:78: attempt to index a boolean value [12/01/2019 13:07:12] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/itachi/genjutsu.lua) Mostrar conteúdo oculto local cfg = { items_area = { { itemid = 11497, area = { {0,0,0,0,0,0,0}, {0,1,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,1,0,0}, {0,0,0,0,0,0,0} } }, { itemid = 11498, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,1}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,1,0,0,0} } }, { itemid = 11499, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,1,0,0,0,0,0}, {0,0,0,0,0,0,1}, {0,0,0,0,0,0,0} } }, { itemid = 11500, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {1,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0} } }, { itemid = 11501, area = { {0,0,0,0,0,0,0}, {0,0,0,0,1,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,1,0,0,0,0}, {0,0,0,0,0,0,0} } } }, remove_time = 10, -- tempo em segundos para remover onuse_message = "Uma area foi atingida pelo Genjutsu de %s" -- message ao usar } function isWalkable(position) -- by Yan Liima local tile = getThingfromPos(position) if hasProperty(tile.uid, 0) == true or hasProperty(tile.uid, 3) == true then return false end return true end local combats = {} for i, t in ipairs(cfg.items_area) do combats = createCombatObject() setCombatArea(combats, createCombatArea(t.area)) function onTargetTile(cid, position) if isWalkable(position) then doCreateItem(t.itemid, 1, position) addEvent(function() local thing = getTileItemById(position, t.itemid).uid if(thing ~= 0) then doRemoveItem(thing) end end, cfg.remove_time * 1000) end end setCombatCallback(combats, CALLBACK_PARAM_TARGETTILE, "onTargetTile") end function onCastSpell(cid, var) local combats = {} local outfit = {lookType = 90, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time1 = 4000 -- segundos que ficará com a outfit local position = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} for i = 1, #combats do doCombat(cid, combats, var) doSetCreatureOutfit(cid, outfit, time1) doSendMagicEffect(position, 193) end doBroadcastMessage(cfg.onuse_message:format(getCreatureName(cid)), MESSAGE_STATUS_WARNING) return true end
Postado Janeiro 12, 2019 6 anos Autor @Yan Liima agora os itens não estão sendo criados, e também não fiquei com a outfit. Apenas a mensagem está sendo enviada e não aparece nenhum erro na distro. Editado Janeiro 12, 2019 6 anos por Mark Charlotte (veja o histórico de edições)
Postado Julho 25, 2019 5 anos local cfg = { items_area = { { itemid = 11497, area = { {0,0,0,0,0,0,0}, {0,1,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,1,0,0}, {0,0,0,0,0,0,0} } }, { itemid = 11498, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,1}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,1,0,0,0} } }, { itemid = 11499, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,1,0,0,0,0,0}, {0,0,0,0,0,0,1}, {0,0,0,0,0,0,0} } }, { itemid = 11500, area = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {1,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0} } }, { itemid = 11501, area = { {0,0,0,0,0,0,0}, {0,0,0,0,1,0,0}, {0,0,0,0,0,0,0}, {0,0,0,2,0,0,0}, {0,0,0,0,0,0,0}, {0,0,1,0,0,0,0}, {0,0,0,0,0,0,0} } } }, remove_time = 10, -- tempo em segundos para remover onuse_message = "Uma area foi atingida pelo Genjutsu de %s" -- message ao usar } function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end local combats = {} for i, t in ipairs(cfg.items_area) do combats = createCombatObject() setCombatArea(combats, createCombatArea(t.area)) function onTargetTile(cid, position) if isWalkable(position, true, true, true) then doCreateItem(t.itemid, 1, position) addEvent(function() local thing = getTileItemById(position, t.itemid).uid if(thing ~= 0) then doRemoveItem(thing) end end, cfg.remove_time * 1000) end end setCombatCallback(combats, CALLBACK_PARAM_TARGETTILE, "onTargetTile") end function onCastSpell(cid, var) local outfit = {lookType = 90, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time1 = 4000 -- segundos que ficará com a outfit local position = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} for i = 1, #combats do doCombat(cid, combats[i], var) doSetCreatureOutfit(cid, outfit, time1) doSendMagicEffect(position, 193) end doBroadcastMessage(cfg.onuse_message:format(getCreatureName(cid)), MESSAGE_STATUS_WARNING) return true end
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.