Postado Junho 27, 2018 6 anos eu quero fazer 1 item vip com todas as funçoes de ferramente, machete, pick, shovel, rope etc... alguem me ajuda a juntar todos eles em 1 so item (script)? shovel Spoiler local holes = {468, 481, 483} function onUse(cid, item, fromPosition, itemEx, toPosition) if isInArray(holes, itemEx.itemid) == TRUE then doTransformItem(itemEx.uid, itemEx.itemid + 1) doDecayItem(itemEx.uid) elseif itemEx.itemid == 231 then local rand = math.random(1, 100) if(rand == 1) then doCreateItem(2159, 1, toPosition) elseif(rand > 95) then doSummonCreature("Scarab", toPosition) end doSendMagicEffect(toPosition, CONST_ME_POFF) else return FALSE end return TRUE end scythe Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.itemid == 2739 then doTransformItem(itemEx.uid, 2737) doCreateItem(2694, 1, toPosition) doDecayItem(itemEx.uid) return TRUE end return destroyItem(cid, itemEx, toPosition) end rope Spoiler local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136} function onUse(cid, item, fromPosition, itemEx, toPosition) local groundTile = getThingfromPos(toPosition) if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE) elseif isInArray(holeId, itemEx.itemid) == TRUE then local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if hole.itemid > 0 then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE) else doPlayerSendCancel(cid, "Sorry, not possible.") end elseif isInArray(5967, itemEx.itemid) == TRUE then doSetGameState(GAMESTATE_SHUTDOWN) else return FALSE end return TRUE end pick Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) if(itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355) then doTransformItem(itemEx.uid, 392) doDecayItem(itemEx.uid) doSendMagicEffect(toPosition, CONST_ME_POFF) return TRUE end return FALSE end obsidian_knife Spoiler local config = { level = 2 } local items = {9010,11337,7441,7442,7444,7445} local SKINS = { -- Minotaurs [2830] = {55000, 5878}, [2871] = {55000, 5878}, [2866] = {55000, 5878}, [2876] = {55000, 5878}, [3090] = {55000, 5878}, -- Lizards [4259] = {55000, 5876}, [4262] = {55000, 5876}, [4256] = {55000, 5876}, -- Dragons [3104] = {55000, 5877}, [2844] = {55000, 5877}, -- Dragon Lords [2881] = {55000, 5948}, -- Behemoths [2931] = {55000, 5893}, -- Bone Beasts [3031] = {55000, 5925} } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerLevel(cid) < config.level) then doPlayerSendCancel(cid, "You have to be at least Level " .. config.level .. " to use this tool.") return true end local skin = SKINS[itemEx.itemid] if(not skin) and not isInArray(items,itemEx.itemid) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end -- if isInArray(items,itemEx.itemid) then if itemEx.itemid == 9010 then if getPlayerStorageValue(cid, 65049) <= 0 then doSendMagicEffect(toPosition, CONST_ME_MAGIC_GREEN) doPlayerAddItem(cid, 8310, 1) setPlayerStorageValue(cid, 65049, 1) else doCreatureSayWithRadius(cid, "You already used your knife on the corpse.", TALKTYPE_ORANGE_1, 1, 1) end elseif itemEx.itemid == 11337 then --piece of marble statue = math.random(1, 100) if statue <= 70 then doItemSetAttribute(itemEx.uid, "description", "This shoddy work was made by "..getCreatureName(cid)..".") doTransformItem(itemEx.uid, 11338) ---rough elseif statue <= 99 then doItemSetAttribute(itemEx.uid, "description", "This little figurine made by "..getCreatureName(cid).." has some room for improvement.") doTransformItem(itemEx.uid, 11339) --regular else doItemSetAttribute(itemEx.uid, "description", "This little figurine of Tibiasula was masterfully sculpted by "..getCreatureName(cid)..".") doTransformItem(itemEx.uid, 11340) -- end elseif itemEx.itemid == 7441 then --ice cube if math.random(1, 100) <= 30 then --30% doTransformItem(itemEx.uid, 7442) --1 carve else doPlayerSendDefaultCancel(cid, "You broke the ice cube") doRemoveItem(itemEx.uid) end elseif itemEx.itemid == 7442 then --ice cube, 1 carve if math.random(1, 100) <= 20 then --20% doTransformItem(itemEx.uid, 7444) --2 carve else doPlayerSendDefaultCancel(cid, "You broke the ice cube") doRemoveItem(itemEx.uid) end elseif itemEx.itemid == 7444 then --ice cube, 2 carve if math.random(1, 100) <= 10 then --10% doTransformItem(itemEx.uid, 7445) --3 carve else doPlayerSendDefaultCancel(cid, "You broke the ice cube") doRemoveItem(itemEx.uid) end elseif itemEx.itemid == 7445 then --ice cube, 3 carve if math.random(1, 100) <= 5 then --5% doTransformItem(itemEx.uid, 7446) --ice mammoth else doPlayerSendDefaultCancel(cid, "You broke the ice cube") doRemoveItem(itemEx.uid) end end doSendMagicEffect(toPosition, effect) return true end --- local random, effect = math.random(1, 100000), CONST_ME_GROUNDSHAKER if(random <= skin[1]) then doPlayerAddItem(cid, skin[2], 1) elseif(skin[3] and random >= skin[3]) then doPlayerAddItem(cid, skin[4], 1) else effect = CONST_ME_POFF end doSendMagicEffect(toPosition, effect) doTransformItem(itemEx.uid, itemEx.itemid + 1) return true end machete Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) return TOOLS.MACHETE(cid, item, fromPosition, itemEx, toPosition, true) end blessed_wooken Spoiler local config = { level = 2 } local DUSTS = { -- Demons [2956] = {25000, 5905}, -- Vampires [2916] = {25000, 5906} } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerLevel(cid) < config.level) then doPlayerSendCancel(cid, "You have to be at least Level " .. config.level .. " to use this tool.") return true end local dust = DUSTS[itemEx.itemid] if(not dust) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end local random = math.random(1, 100000) if(random <= dust[1]) then doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER) doPlayerAddItem(cid, dust[2], 1) elseif(dust[3] and random >= dust[3]) then doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER) doPlayerAddItem(cid, dust[4], 1) else doSendMagicEffect(toPosition, CONST_ME_POFF) end doTransformItem(itemEx.uid, itemEx.itemid + 1) return true end
Postado Junho 27, 2018 6 anos gostaria desse script tbm, pra colocar canivete no meu server, se alguém puder fazer o mesmo tbm só que sem blessed woodenstake e sem obsidian knife, vai ser bom !!
Postado Junho 29, 2018 6 anos @Emanueldk Este pode ser oque você esta procurando, funcional em TFS 0.3.6 e 0.4. Olá, que tal dar uma olhada no meu projeto? https://discord.gg/bsNkbsyJ3W
Postado Junho 29, 2018 6 anos @Emanueldk se ajudei REP + e Defina como melhor resposta para ajudar outros membros no futuro. Olá, que tal dar uma olhada no meu projeto? https://discord.gg/bsNkbsyJ3W
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.