Postado Abril 9, 2015 10 anos Galera é o seguinte esses 3 itens no meu ot squeezing gear of girlpower sneaky stabber of eliteness whacking driller of fate Sendo que é o Rosa , azul e o Vermelho. Não estão cortando o Wild Growth que é nada mais que a mw de Mato Eles não estão cortando ela. se alguém souber como faço para colocar para cortar eu agradeço. obs: não estão abrindo buracos também Editado Abril 9, 2015 10 anos por igorcbc (veja o histórico de edições)
Postado Abril 9, 2015 10 anos teste em seu server se a shovel abre os buracos Toda terça-feira um tópico novo: Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/ Peça sua spell (Suporte): https://tibiaking.com/forums/topic/84162-peça-sua-spell/ Chuva de flechas (Spell): https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/ Doom (Spell): https://tibiaking.com/forums/topic/51622-doom-spell/ Utilização do VS Code (Infra): https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/ SD com Combo (Spell): https://tibiaking.com/forums/topic/94520-sd-modificada/ Alteração attack speed (C++): https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/ Bônus de Speed (NPC): https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
Postado Abril 9, 2015 10 anos Autor teste em seu server se a shovel abre os buracos a Pá abre normal. Só esse item ai que era pra abrir não ta abrindo !
Postado Abril 9, 2015 10 anos actions.xml <action itemid="10511;10513;10515" event="script" value="tools/squeeze.lua"/> tools/squeeze.lua TOOLS = {} TOOLS.ROPE = function(cid, item, fromPosition, itemEx, toPosition) if(toPosition.x == CONTAINER_POSITION) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end toPosition.stackpos = STACKPOS_GROUND errors(false) local ground = getThingFromPos(toPosition) errors(true) if(isInArray(SPOTS, ground.itemid)) then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, false) return true elseif(isInArray(ROPABLE, itemEx.itemid)) then local canOnlyRopePlayers = getBooleanFromString(getConfigValue('canOnlyRopePlayers')) local hole = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if(canOnlyRopePlayers) then if(isPlayer(hole.uid) and (not isPlayerGhost(hole.uid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(hole.uid))) then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end else if(hole.itemid > 0) then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end end return true end return false end TOOLS.PICK = function(cid, item, fromPosition, itemEx, toPosition) errors(false) local ground = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND}) errors(true) if(isInArray(SPOTS, ground.itemid) and isInArray({354, 355}, itemEx.itemid)) then doTransformItem(itemEx.uid, 392) doDecayItem(itemEx.uid) doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(itemEx.itemid == 7200) then doTransformItem(itemEx.uid, 7236) doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT) return true end return false end TOOLS.MACHETE = function(cid, item, fromPosition, itemEx, toPosition, destroy) if(isInArray(JUNGLE_GRASS, itemEx.itemid)) then doTransformItem(itemEx.uid, itemEx.itemid - 1) doDecayItem(itemEx.uid) return true end if(isInArray(SPIDER_WEB, itemEx.itemid)) then if math.random(3) == 1 then doTransformItem(itemEx.uid, (itemEx.itemid + 6)) doDecayItem(itemEx.uid) end doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(isInArray(BAMBOO_FENCE, itemEx.itemid)) then if math.random(3) == 1 then if(itemEx.itemid == BAMBOO_FENCE[1]) then doTransformItem(itemEx.uid, (itemEx.itemid + 161)) elseif(itemEx.itemid == BAMBOO_FENCE[2]) then doTransformItem(itemEx.uid, (itemEx.itemid + 159)) end doDecayItem(itemEx.uid) end doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(isInArray(WILD_GROWTH, itemEx.itemid)) then doSendMagicEffect(toPosition, CONST_ME_POFF) doRemoveItem(itemEx.uid) return true end return destroy and destroyItem(cid, itemEx, toPosition) or false end TOOLS.SHOVEL = function(cid, item, fromPosition, itemEx, toPosition) if(isInArray(HOLES, itemEx.itemid)) then local newId = itemEx.itemid + 1 if(itemEx.itemid == 8579) then newId = 8585 end doTransformItem(itemEx.uid, newId) doDecayItem(itemEx.uid) elseif(isInArray(SAND, itemEx.itemid)) then local rand = math.random(1, 100) local ground = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND}) if(isInArray(SPOTS, ground.itemid) and rand <= 20) then doTransformItem(itemEx.uid, 489) doDecayItem(itemEx.uid) elseif(rand >= 1 and rand <= 5) then doCreateItem(2159, 1, toPosition) elseif(rand > 85) then doCreateMonster("Scarab", toPosition, false) end doSendMagicEffect(toPosition, CONST_ME_POFF) end return true end TOOLS.SCYTHE = function(cid, item, fromPosition, itemEx, toPosition, destroy) if(itemEx.itemid == 2739) then doTransformItem(itemEx.uid, 2737) doCreateItem(2694, 1, toPosition) doDecayItem(itemEx.uid) return true end return destroy and destroyItem(cid, itemEx, toPosition) or false end TOOLS.KNIFE = function(cid, item, fromPosition, itemEx, toPosition) if(itemEx.itemid ~= PUMPKIN) then return false end doTransformItem(itemEx.uid, PUMPKIN_HEAD) return true end local config = { functions = { [10511] = { -- sneaky stabber of eliteness TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.KNIFE }, [10513] = { -- squeezing gear of girlpower TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.SCYTHE }, [10515] = { -- whacking driller of fate TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.KNIFE } }, jamChance = 10 } function onUse(cid, item, fromPosition, itemEx, toPosition) local funcs = config.functions[item.itemid] if(funcs == nil) then return false end local result = false for _, func in ipairs(funcs) do if(func(cid, item, fromPosition, itemEx, toPosition)) then result = true break end end if(not result) then return false end if(math.random(1, 100) <= config.jamChance) then doTransformItem(item.uid, item.itemid + 1) doDecayItem(item.uid) end return true end
Postado Abril 10, 2015 10 anos Autor actions.xml <action itemid="10511;10513;10515" event="script" value="tools/squeeze.lua"/> tools/squeeze.lua TOOLS = {} TOOLS.ROPE = function(cid, item, fromPosition, itemEx, toPosition) if(toPosition.x == CONTAINER_POSITION) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end toPosition.stackpos = STACKPOS_GROUND errors(false) local ground = getThingFromPos(toPosition) errors(true) if(isInArray(SPOTS, ground.itemid)) then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, false) return true elseif(isInArray(ROPABLE, itemEx.itemid)) then local canOnlyRopePlayers = getBooleanFromString(getConfigValue('canOnlyRopePlayers')) local hole = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if(canOnlyRopePlayers) then if(isPlayer(hole.uid) and (not isPlayerGhost(hole.uid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(hole.uid))) then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end else if(hole.itemid > 0) then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end end return true end return false end TOOLS.PICK = function(cid, item, fromPosition, itemEx, toPosition) errors(false) local ground = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND}) errors(true) if(isInArray(SPOTS, ground.itemid) and isInArray({354, 355}, itemEx.itemid)) then doTransformItem(itemEx.uid, 392) doDecayItem(itemEx.uid) doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(itemEx.itemid == 7200) then doTransformItem(itemEx.uid, 7236) doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT) return true end return false end TOOLS.MACHETE = function(cid, item, fromPosition, itemEx, toPosition, destroy) if(isInArray(JUNGLE_GRASS, itemEx.itemid)) then doTransformItem(itemEx.uid, itemEx.itemid - 1) doDecayItem(itemEx.uid) return true end if(isInArray(SPIDER_WEB, itemEx.itemid)) then if math.random(3) == 1 then doTransformItem(itemEx.uid, (itemEx.itemid + 6)) doDecayItem(itemEx.uid) end doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(isInArray(BAMBOO_FENCE, itemEx.itemid)) then if math.random(3) == 1 then if(itemEx.itemid == BAMBOO_FENCE[1]) then doTransformItem(itemEx.uid, (itemEx.itemid + 161)) elseif(itemEx.itemid == BAMBOO_FENCE[2]) then doTransformItem(itemEx.uid, (itemEx.itemid + 159)) end doDecayItem(itemEx.uid) end doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(isInArray(WILD_GROWTH, itemEx.itemid)) then doSendMagicEffect(toPosition, CONST_ME_POFF) doRemoveItem(itemEx.uid) return true end return destroy and destroyItem(cid, itemEx, toPosition) or false end TOOLS.SHOVEL = function(cid, item, fromPosition, itemEx, toPosition) if(isInArray(HOLES, itemEx.itemid)) then local newId = itemEx.itemid + 1 if(itemEx.itemid == 8579) then newId = 8585 end doTransformItem(itemEx.uid, newId) doDecayItem(itemEx.uid) elseif(isInArray(SAND, itemEx.itemid)) then local rand = math.random(1, 100) local ground = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND}) if(isInArray(SPOTS, ground.itemid) and rand <= 20) then doTransformItem(itemEx.uid, 489) doDecayItem(itemEx.uid) elseif(rand >= 1 and rand <= 5) then doCreateItem(2159, 1, toPosition) elseif(rand > 85) then doCreateMonster("Scarab", toPosition, false) end doSendMagicEffect(toPosition, CONST_ME_POFF) end return true end TOOLS.SCYTHE = function(cid, item, fromPosition, itemEx, toPosition, destroy) if(itemEx.itemid == 2739) then doTransformItem(itemEx.uid, 2737) doCreateItem(2694, 1, toPosition) doDecayItem(itemEx.uid) return true end return destroy and destroyItem(cid, itemEx, toPosition) or false end TOOLS.KNIFE = function(cid, item, fromPosition, itemEx, toPosition) if(itemEx.itemid ~= PUMPKIN) then return false end doTransformItem(itemEx.uid, PUMPKIN_HEAD) return true end local config = { functions = { [10511] = { -- sneaky stabber of eliteness TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.KNIFE }, [10513] = { -- squeezing gear of girlpower TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.SCYTHE }, [10515] = { -- whacking driller of fate TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.KNIFE } }, jamChance = 10 } function onUse(cid, item, fromPosition, itemEx, toPosition) local funcs = config.functions[item.itemid] if(funcs == nil) then return false end local result = false for _, func in ipairs(funcs) do if(func(cid, item, fromPosition, itemEx, toPosition)) then result = true break end end if(not result) then return false end if(math.random(1, 100) <= config.jamChance) then doTransformItem(item.uid, item.itemid + 1) doDecayItem(item.uid) end return true end irei testa irei testa Da o seguinte erro: [09/04/2015 16:27:34] [Error - Action Interface] [09/04/2015 16:27:34] data/actions/scripts/tools/squeeze.lua:onUse [09/04/2015 16:27:34] Description: [09/04/2015 16:27:34] data/actions/scripts/tools/squeeze.lua:9: attempt to call global 'errors' (a nil value) [09/04/2015 16:27:34] stack traceback: [09/04/2015 16:27:34] data/actions/scripts/tools/squeeze.lua:9: in function 'func' [09/04/2015 16:27:34] data/actions/scripts/tools/squeeze.lua:186: in function <data/actions/scripts/tools/squeeze.lua:178> @up @ UP @UPUP @UP Editado Abril 9, 2015 10 anos por igorcbc (veja o histórico de edições)
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.