Postado Maio 29, 2015 10 anos Versão: 10.76 TFS: 1.1 Prévia; Em movements.xml, acrescente: <movevent event="StepIn" itemid="8753" script="mwstep.lua"/> Certo, agora crie um arquivo .lua com o nome: mwstep e coloque isso: function onStepIn(creature, item, position, fromPosition) removeMw(creature:getPosition(), 8753, 1027) return true end Agora vá até \data\spells\scripts\support e abra o arquivo magic wall rune.lua Delete tudo que está lá e coloque isso: local id = 8753 local combat = Combat() combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) combat:setParameter(COMBAT_PARAM_CREATEITEM, id) function tile_timer(id, pos, delay, color) if getTileItemById(pos, id).uid == 0 then return true end if delay ~= 1 then addEvent(tile_timer, 1000, id, pos, delay - 1, color) end local people = Game.getSpectators(pos, 7, 7, 5, 5, false, true) if not people then return true end for i = 1, #people do people[i]:sendTextMessage(MESSAGE_EXPERIENCE, "O magic wall irá desaparecer em " .. delay .. " segundos" .. (delay > 1 and "s" or "") .. ".", pos, delay, color) end end function removeMw(pos, mw, wall) local tile = Tile(pos) mw = tile:getItemById(mw) wall = tile:getItemById(wall) if mw then mw:remove() end if wall then wall:remove() end end function onCastSpell(creature, var, isHotkey) local c = combat:execute(creature, var) if c then local pos = variantToPosition(var) local wall = Game.createItem(1027, 1, pos) addEvent(removeMw, 20000, pos, id, wall:getId()) tile_timer(id, pos, 20, TEXTCOLOR_LIGHTBLUE) end return c end ///////////// Colocando tempo no Wild Growth Vá até \data\spells\scripts\support e abra o arquivo wild growth rune.lua, apague tudo e coloque lá: local id = ITEM_WILDGROWTH local combat = Combat() combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) combat:setParameter(COMBAT_PARAM_CREATEITEM, id) function onCastSpell(creature, var, isHotkey) local c = combat:execute(creature, var) if c then local pos = variantToPosition(var) addEvent(removeMw, 40000, pos, id) tile_timer(id, pos, 40, TEXTCOLOR_LIGHTGREEN) end return c end Script disponibilizado por zbizu. Tópico organizado por mim. Abraços!
Postado Maio 30, 2015 10 anos Em nome da comunidade do TK muito obrigado pela contribuição! Seu tópico de conteúdo foi aprovado e será movido para a seção adequada. Você ganhou 1 REP+!
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.