Ir para conteúdo

biel.stocco

Membro
  • Registro em

  • Última visita

Solutions

  1. biel.stocco's post in (Resolvido)[PEDIDO] Script de lootear was marked as the answer   
    Manin, consegui!
    Com trap quando usa, tempo configurável e tal, tá certinho do jeito que falei.. vc me ajudou bastante com o script manin obg!

    ps: pra transformar, adicionei em cada condition como pode ver no crocodilo(configurei só o crocodilo aqui, dps faço os outros uehhue)
    obg manin! +1 rep de agradecimento
     
     
     

    local tempo = { str = 86322, limite = 2 } -- str é a storagevalue para o tempo, limite é o tempo em segundos local dmg = math.random(1000, 5000) local time = 2 -- Tempo em segundos de paralyze local effect = 0 -- Efeito local crocodilo = { [1] = {chance = {1,500}, item = {2671,3}, msg = "Limpou o corpo e conseguiu carne."}, [2] = {chance = {501,520}, msg = "A faca desafiou e não é possível usá-la novamente."}, [3] = {chance = {1551,1850}, msg = "Limpou o corpo mas não conseguiu coletar nada."}, [4] = {chance = {521,1550 }, damage = {1,100}, msg = "Se cortou ao limpar o animal!"}, [5] = {chance = {1851,2100}, item = {2671,8}, msg = "Conseguiu bastante carne limpando o animal!"}, [6] = {chance = {2101,2250}, summon = "Lombriga", msg = "Enquanto limpava o corpo, algumas lombrigas apareceram!."}, [7] = {chance = {2251,2350}, item = {5876,1}, msg = "Conseguiu pele de crocodilo!"} } local lion = { [1] = {chance = {1,500}, item = {2671,3},msg = "Limpou o corpo e conseguiu carne."}, [2] = {chance = {501,520}, msg = "A faca desafiou e não é possível usá-la novamente."}, [3] = {chance = {521,1550}, msg = "Limpou o corpo mas não conseguiu coletar nada."}, [4] = {chance = {1551,1850}, damage = {1,100}, msg = "Se cortou ao limpar o animal!"}, [5] = {chance = {1851,2100}, item = {2671,8}, msg = "Conseguiu bastante carne limpando o animal!"}, [6] = {chance = {2101,2250}, summon = "Lombriga", msg = "Enquanto limpava o corpo, algumas lombrigas apareceram!."}, [7] = {chance = {2251,2350}, item = {5876,1}, msg = "Conseguiu pele de leão!"} } local rat = { [1] = {chance = {1,500}, item = {2671,3},msg = "Limpou o corpo e conseguiu carne."}, [2] = {chance = {501,520}, msg = "A faca desafiou e não é possível usá-la novamente."}, [3] = {chance = {521,1550}, msg = "Limpou o corpo mas não conseguiu coletar nada."}, [4] = {chance = {1551,1850}, damage = {1,100}, msg = "Se cortou ao limpar o animal!"}, [5] = {chance = {1851,2100}, item = {2671,8}, msg = "Conseguiu bastante carne limpando o animal!"}, [6] = {chance = {2101,2250}, summon = "Lombriga", msg = "Enquanto limpava o corpo, algumas lombrigas apareceram!."}, [7] = {chance = {2251,2350}, item = {5876,1}, msg = "Conseguiu pele de leão!"} } function removeTrapParalyze(cid)     if not isCreature(cid) then return true end          if isPlayer(cid) then         doCreatureSetNoMove(cid, false)     elseif isMonster(cid) then         doChangeSpeed(cid, getCreatureBaseSpeed(cid))     end     doSendAnimatedText(getCreaturePosition(cid), "LIMPOU", TEXTCOLOR_PURPLE) return true end function onUse(cid, item, fromPosition, itemEx, toPosition) if (itemEx.itemid == 4277) and (getPlayerStorageValue(cid, tempo.str) >= os.time()) then doPlayerSendCancel(cid, "Você deve esperar para conseguir limpar outro monstro novamente.") end if (itemEx.itemid == 4277) and (getPlayerStorageValue(cid, tempo.str) < os.time()) then setPlayerStorageValue(cid, tempo.str, os.time()+tempo.limite) doSendMagicEffect(getCreaturePosition(cid), effect) doTransformItem(itemEx.uid, getItemInfo(itemEx.itemid).decayTo) doDecayItem(itemEx.uid) p = math.random(1,2350) for i = 1,#crocodilo do if (p >= crocodilo[i].chance[1]) and (p <= crocodilo[i].chance[2]) then doPlayerSendTextMessage (cid, MESSAGE_STATUS_CONSOLE_BLUE, "" ..crocodilo[i].msg.. "") doTransformItem(itemEx.uid,4279)     doSendAnimatedText(getCreaturePosition(cid), "LIMPANDO", TEXTCOLOR_PURPLE)     doCreatureSetNoMove(cid, true)     addEvent(removeTrapParalyze, time*1000, cid) end end if (p >= crocodilo[1].chance[1]) and (p <= crocodilo[1].chance[2]) then doPlayerAddItem(cid, crocodilo[1].item[1], math.random(1,crocodilo[1].item[2])) doTransformItem(itemEx.uid,4279) end if (p >= crocodilo[2].chance[1]) and (p <= crocodilo[2].chance[2]) then doRemoveItem(item.uid,1) doTransformItem(itemEx.uid,4279) end if (p >= crocodilo[3].chance[1]) and (p <= crocodilo[3].chance[2]) then doSendMagicEffect(toPosition, CONST_ME_POFF) doTransformItem(itemEx.uid,4279) end if (p >= crocodilo[4].chance[1]) and (p <= crocodilo[4].chance[2]) then     doCreatureAddHealth(cid, -dmg)     doSendAnimatedText(getCreaturePosition(cid), "Se cortou!", TEXTCOLOR_RED)     doSendMagicEffect(getCreaturePosition(cid), 0) doTransformItem(itemEx.uid,4279) end if (p >= crocodilo[5].chance[1]) and (p <= crocodilo[5].chance[2]) then doPlayerAddItem(cid, crocodilo[5].item[1], math.random(1,crocodilo[5].item[2])) doTransformItem(itemEx.uid,4279) end if (p >= crocodilo[6].chance[1]) and (p <= crocodilo[6].chance[2]) then doSummonCreature(crocodilo[6].summon,toPosition) doTransformItem(itemEx.uid,4279) end if (p >= crocodilo[7].chance[1]) and (p <= crocodilo[7].chance[2]) then doPlayerAddItem(cid, crocodilo[7].item[1], math.random(1,crocodilo[7].item[2])) doTransformItem(itemEx.uid,4279) end end if itemEx.itemid == 2890 then doTransformItem(itemEx.uid, 2891, getItemInfo(itemEx.itemid).decayTo) doDecayItem(itemEx.uid) p = math.random(1,2350) for i = 1,#lion do if (p >= lion[i].chance[1]) and (p <= lion[i].chance[2]) then doCreatureSay(cid,"" ..lion[i].msg.. "", TALKTYPE_ORANGE_1) end end if (p >= lion[1].chance[1]) and (p <= lion[1].chance[2]) then doPlayerAddItem(cid, lion[1].item[1], math.random(1,lion[1].item[2])) end if (p >= lion[2].chance[1]) and (p <= lion[2].chance[2]) then doRemoveItem(item.uid,1) end if (p >= lion[3].chance[1]) and (p <= lion[3].chance[2]) then doSendMagicEffect(toPosition, CONST_ME_POFF) end if (p >= lion[4].chance[1]) and (p <= lion[4].chance[2]) then     doCreatureAddHealth(cid, -dmg)     doSendAnimatedText(getCreaturePosition(cid), "Se cortou!", TEXTCOLOR_RED)     doSendMagicEffect(getCreaturePosition(cid), 0) end if (p >= lion[5].chance[1]) and (p <= lion[5].chance[2]) then doPlayerAddItem(cid, lion[5].item[1], math.random(1,lion[5].item[2])) end if (p >= lion[6].chance[1]) and (p <= lion[6].chance[2]) then doSummonCreature(lion[6].summon,toPosition) end if (p >= lion[7].chance[1]) and (p <= lion[7].chance[2]) then doPlayerAddItem(cid,lion[7].item[1],math.random(1,lion[7].item[2])) end end if itemEx.itemid == 2813 then doTransformItem(itemEx.uid, 2815, getItemInfo(itemEx.itemid).decayTo) doDecayItem(itemEx.uid) p = math.random(1,2350) for i = 1,#rat do if (p >= rat[i].chance[1]) and (p <= rat[i].chance[2]) then doCreatureSay(cid,"" ..rat[i].msg.. "", TALKTYPE_ORANGE_1) end end if (p >= rat[1].chance[1]) and (p <= rat[1].chance[2]) then doPlayerAddItem(cid, rat[1].item[1], math.random(1,rat[1].item[2])) end if (p >= rat[2].chance[1]) and (p <= rat[2].chance[2]) then doRemoveItem(item.uid,1) end if (p >= rat[3].chance[1]) and (p <= rat[3].chance[2]) then doSendMagicEffect(toPosition, CONST_ME_POFF) end if (p >= rat[4].chance[1]) and (p <= rat[4].chance[2]) then     doCreatureAddHealth(cid, -dmg)     doSendAnimatedText(getCreaturePosition(cid), "Se cortou!", TEXTCOLOR_RED)     doSendMagicEffect(getCreaturePosition(cid), 0) end if (p >= rat[5].chance[1]) and (p <= rat[5].chance[2]) then doPlayerAddItem(cid, rat[5].item[1], math.random(1,rat[5].item[2])) end if (p >= rat[6].chance[1]) and (p <= rat[6].chance[2]) then doSummonCreature(rat[6].summon,toPosition) end if (p >= rat[7].chance[1]) and (p <= rat[7].chance[2]) then doPlayerAddItem(cid,rat[7].item[1],math.random(1,rat[7].item[2])) end end return true end

Informação Importante

Confirmação de Termo