Postado Junho 6, 2014 10 anos Amigo tenta adicionar o doRemoveItem(id, 1 ) (nas função onCastSpell) com a variavel local id = ID da sua runa... Não entendeu? Siga o exemplo abaixo. local id = ID DA RUNA UNREMOVABLE_FIELDS = {1497, 1498, 1499, 1505, 1506, 1507, 1508, 7465, 7466, 7467, 7468, 7469, 7470, 7471, 7472, 7473, 11094, 11095} local function doRemoveField(cid, pos) local field = getTileItemByType(pos, ITEM_TYPE_MAGICFIELD) if(not isInArray(UNREMOVABLE_FIELDS, field.itemid)) then doRemoveItem(field.uid) doSendMagicEffect(pos, CONST_ME_POFF) return true end doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return false end function onCastSpell(cid, var) local pos = variantToPosition(var) if(pos.x == CONTAINER_POSITION) then pos = getThingPos(cid) doRemoveItem(id, 1) end if(pos.x ~= 0 and pos.y ~= 0) then return doRemoveField(cid, pos) end doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return false end Editado Junho 6, 2014 10 anos por llucas75 (veja o histórico de edições) Scripter: |||||||||| 10% Te ajudei?? REP + e ficamos quites... Atenciosamente, Lucas. Abraços!
Postado Junho 6, 2014 10 anos Autor rsrs entendi '---' .. vlw vo testa aki se funfar do rep + ) Editado Junho 6, 2014 10 anos por abnejesus (veja o histórico de edições)
Postado Junho 6, 2014 10 anos Autor Olha deu esse errinho [error-luainterface::loadfile] data/spells/scripts/attack/avalanche.lua:12: 'end' expected <to close 'function' at line 10> near 'doremoveitem' '-' como arrumar?
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.