Postado Novembro 3, 2017 7 anos Boa Tarde Galera TK ! Estou a bastante tempo tentando achar e não consigo \/ Eu uso a seguinte script para pesca no meu servidor \/ Citar -- Script feito por Zaruss function onUse(cid, item, fromPosition, itemEx, toPosition) local formula = getPlayerSkill(cid, SKILL_FISHING) item1 = 2160 item2 = 2152 item3 = 2160 item4 = 2152 item5 = 2152 item6 = 2160 item7 = 2152 a = math.random(6) b = math.random(7) c = math.random(5) local chance = 100 local chanceum = 35 local chancedois = 1 local chancetrez = 1 local chancequatro = 1 local chancecinco = 1 local chanceseis = 1 if getPlayerLevel(cid) <= 199 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Blábláblá") return true end if itemEx.itemid >= 2580 and itemEx.itemid <= 2580 or itemEx.itemid == 10077 then if getPlayerLevel(cid) >= 199 then if getPlayerStorageValue(cid,61111) < 1 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Blábláblá") and true else if math.random(1,100) <= chanceum then setPlayerStorageValue(cid, storage, chanceum*2) doSendAnimatedText(getPlayerPosition(cid), "" .. a .. "x grana!", TEXTCOLOR_TEAL) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item1,a) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chancedois then setPlayerStorageValue(cid, storage, chancedois*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana ruim", TEXTCOLOR_RED) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item2,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chancetrez then setPlayerStorageValue(cid, storage, chancetrez*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana", TEXTCOLOR_TEAL) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item3,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chancequatro then setPlayerStorageValue(cid, storage, chancequatro*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana ruim", TEXTCOLOR_LIGHTGREEN) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item4,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chancecinco then setPlayerStorageValue(cid, storage, chancecinco*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana", TEXTCOLOR_PURPLE) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item5,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chanceseis then setPlayerStorageValue(cid, storage, chanceseis*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana ruim", TEXTCOLOR_YELLOW) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item6,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) else doSendAnimatedText(getPlayerPosition(cid), "" .. b .. "x grana", TEXTCOLOR_LIGHTBLUE) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item7,b) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) end end doSendMagicEffect(toPosition, 53) return true end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Blábláblá ") return true end end Bom, Eu queria que um item ao ser usado daria 2x + a chance de fishing tipo > sem usar o item o jogador recebe 1 a 5 gold quando pesca, quando clickar no item ele some e o efeito duraria por 2 horas e o jogador ganharia de 2 a 7 gold durante as 2 horas do efeito, alguem consegue me ajudar nessa? Preciso dessa script pfv TIBIA 8.6 TFS 0.4 +REP
Postado Novembro 3, 2017 7 anos Solução Spoiler local bonus_rate = 2 -- quanto vezes vai aumentar function onUse(cid, item, fromPosition, itemEx, toPosition) local formula, check = getPlayerSkill(cid, SKILL_FISHING), (getPlayerStorageValue(cid, 90672) - os.time()) local bonus = check > 0 and bonus_rate or 1 item1 = 2160 item2 = 2152 item3 = 2160 item4 = 2152 item5 = 2152 item6 = 2160 item7 = 2152 a = math.random(6)*bonus b = math.random(7)*bonus c = math.random(5)*bonus local chance = 100 local chanceum = 35 local chancedois = 1 local chancetrez = 1 local chancequatro = 1 local chancecinco = 1 local chanceseis = 1 if getPlayerLevel(cid) <= 19 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Blábláblá") return true end if itemEx.itemid >= 2580 and itemEx.itemid <= 2580 or itemEx.itemid == 10077 then if getPlayerLevel(cid) >= 19 then if getPlayerStorageValue(cid,61111) < 1 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Blábláblá") and true else if math.random(1,100) <= chanceum then setPlayerStorageValue(cid, storage, chanceum*2) doSendAnimatedText(getPlayerPosition(cid), "" .. a .. "x grana!", TEXTCOLOR_TEAL) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item1,a) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chancedois then setPlayerStorageValue(cid, storage, chancedois*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana ruim", TEXTCOLOR_RED) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item2,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chancetrez then setPlayerStorageValue(cid, storage, chancetrez*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana", TEXTCOLOR_TEAL) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item3,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chancequatro then setPlayerStorageValue(cid, storage, chancequatro*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana ruim", TEXTCOLOR_LIGHTGREEN) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item4,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chancecinco then setPlayerStorageValue(cid, storage, chancecinco*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana", TEXTCOLOR_PURPLE) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item5,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) return true end if math.random(1,200) <= chanceseis then setPlayerStorageValue(cid, storage, chanceseis*6) doSendAnimatedText(getPlayerPosition(cid), "" .. c .. "x grana ruim", TEXTCOLOR_YELLOW) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item6,c) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) else doSendAnimatedText(getPlayerPosition(cid), "" .. b .. "x grana", TEXTCOLOR_LIGHTBLUE) doSendMagicEffect(getCreaturePosition(cid), math.random(12,12)) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerAddItem(cid,item7,b) doPlayerAddSkillTry(cid, SKILL_FISHING, 1) end end doSendMagicEffect(toPosition, 53) return true end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Blábláblá ") return true end end Item que dá o bônus Em actions/scripts, crie um arquivo.lua: Spoiler local tempo_efeito = {2, "hour"} local bonus_rate = 2 function onUse(cid, item, fromPosition, itemEx, toPosition) local p = getPlayerPosition(cid) if getPlayerStorageValue(cid, 90672) > os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Seu bônus de gold fishing ainda está ativo.") doSendMagicEffect(p, CONST_ME_POFF) return true end setPlayerStorageValue(cid, 90672, mathtime(tempo_efeito) + os.time()) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você ganhou um bônus de " .. bonus_rate .."x para o gold fishing.") doSendMagicEffect(p, CONST_ME_MAGIC_RED) doRemoveItem(item.uid) return true end function mathtime(table) -- by dwarfer local unit = {"sec", "min", "hour", "day"} for i, v in pairs(unit) do if v == table[2] then return table[1]*(60^(v == unit[4] and 2 or i-1))*(v == unit[4] and 24 or 1) end end return error("Bad declaration in mathtime function.") end Em actions/scripts, adicione a tag: <action itemid="ID_DO_ITEM" script="NOMEDOARQUIVO.lua" /> Contato: Email: [email protected] Discord: Dwarfer#2715
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.