Postado Junho 3, 2015 10 anos Olá pessoal! Tentei algumas formas que já funcionaram em outros scripts de adicionar exaust e doRemoveItem, mas falharam todas ;x preciso que adicione a esse script um exaust de 2 segundos, e que cobre uma minhoca [iD:11416].. é um sistema de fishing diferente que eu adaptei, tá 100% funcional e só preciso que seja feita essas duas coisas! --By: Gabriel Stocco(Wolf) Improvised Version-- pescar peixe vivo/morto/lixo/levar dano/ quebrar vara local config = { waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}, level = 1, skill = SKILL_FISHING, skillReq = 1, effect = CONST_ME_BLOCKHIT, addTries = 10, msgType = MESSAGE_EVENT_ADVANCE, soul = 0, } local t = { [{1, 50}] = {msg = "You found %A %N.", item = 5951}, --- fins [{51, 90}] = {msg = "You found %A %N.", item = 2226}, --- fishbone [{91, 110}] = {msg = "You found %A %N.", item = 2009}, --- bottle [{111, 130}] = {msg = "You found %A %N.", item = 2237}, --- cap [{131, 140}] = {msg = "You found %A %N.", item = 2670}, --- camarão [{161, 170}] = {msg = "You found %A %N.", item = 2669}, ---grande [{170, 175}] = {msg = "Sua vara de pesca caiu dentro da água!", destroy = true}, [{176, 180}] = {msg = "O peixe era muito forte e quebrou a vara de pesca!", destroy = true}, [{181, 4800}] = {msg = "Não pescou nada!"}, [{4801, 7200}] = {msg = "Você pescou um peixe!", summon = "Peixe"}, [{7201, 7600}] = {msg = "Você pescou um Atum!", summon = "Atum"}, [{7601, 8000}] = {msg = "Você pescou uma Truta Vermelha!", summon = "Truta Vermelha"}, [{8001, 8400}] = {msg = "Você pescou uma Truta Verde!", summon = "Truta Verde"}, [{8401, 8700}] = {msg = "Perdeu %D hitpoints porque um peixe infectado te mordeu!", damage = {550, 2800}}, [{8701, 9000}] = {msg = "Perdeu %D hitpoints porque está exausto!", damage = {550, 1800}} } function onUse(cid, item, fromPosition, itemEx, toPosition) if isInArray(config.waters, itemEx.itemid) and config.level <= getPlayerLevel(cid) and config.skillReq <= getPlayerSkill(cid, config.skill) and config.soul <= getPlayerSoul(cid) then local v, amount, damage = math.random(9000), 1, nil for i, k in pairs(t) do if v >= i[1] and v <= i[2] then if k.destroy then doRemoveItem(item.uid) end if k.summon then doCreateMonster(k.summon, toPosition) end if k.damage then damage = math.random(k.damage[1], k.damage[2]) doCreatureAddHealth(cid, - damage) doSendMagicEffect(getThingPos(cid), CONST_ME_DRAWBLOOD) doSendAnimatedText(getThingPos(cid), damage, TEXTCOLOR_RED) end if k.item then if k.amountmax then amount = math.random(k.amountmax) end doPlayerAddItem(cid, k.item, amount) end if k.msg then local msg = k.msg if msg:find("%%") then if msg:find("%%A") and k.item then msg = msg:gsub("%%A", amount > 1 and amount or getItemDescriptionsById(k.item).article) end if msg:find("%%N") and k.item then msg = msg:gsub("%%N", amount > 1 and getItemDescriptionsById(k.item).plural or getItemNameById(k.item)) end if msg:find("%%D") and damage then msg = msg:gsub("%%D", damage) end end doPlayerSendTextMessage(cid, config.msgType, msg) end doTransformItem(itemEx.uid, config.debris) doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(toPosition, k.destroy and CONST_ME_HITAREA or config.effect) return doPlayerAddSkillTry(cid, config.skill, config.addTries) end end end return doPlayerSendCancel(cid, "Você não pode pescar aqui.") end Grato desde já! @UP Editado Junho 3, 2015 10 anos por biel.stocco (veja o histórico de edições)
Postado Junho 4, 2015 10 anos --By: Gabriel Stocco(Wolf) Improvised Version-- pescar peixe vivo/morto/lixo/levar dano/ quebrar vara local config = { waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}, level = 1, skill = SKILL_FISHING, skillReq = 1, effect = CONST_ME_BLOCKHIT, addTries = 10, msgType = MESSAGE_EVENT_ADVANCE, soul = 0, } local t = { [{1, 50}] = {msg = "You found %A %N.", item = 5951}, --- fins [{51, 90}] = {msg = "You found %A %N.", item = 2226}, --- fishbone [{91, 110}] = {msg = "You found %A %N.", item = 2009}, --- bottle [{111, 130}] = {msg = "You found %A %N.", item = 2237}, --- cap [{131, 140}] = {msg = "You found %A %N.", item = 2670}, --- camarão [{161, 170}] = {msg = "You found %A %N.", item = 2669}, ---grande [{170, 175}] = {msg = "Sua vara de pesca caiu dentro da água!", destroy = true}, [{176, 180}] = {msg = "O peixe era muito forte e quebrou a vara de pesca!", destroy = true}, [{181, 4800}] = {msg = "Não pescou nada!"}, [{4801, 7200}] = {msg = "Você pescou um peixe!", summon = "Peixe"}, [{7201, 7600}] = {msg = "Você pescou um Atum!", summon = "Atum"}, [{7601, 8000}] = {msg = "Você pescou uma Truta Vermelha!", summon = "Truta Vermelha"}, [{8001, 8400}] = {msg = "Você pescou uma Truta Verde!", summon = "Truta Verde"}, [{8401, 8700}] = {msg = "Perdeu %D hitpoints porque um peixe infectado te mordeu!", damage = {550, 2800}}, [{8701, 9000}] = {msg = "Perdeu %D hitpoints porque está exausto!", damage = {550, 1800}} } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 9394) - os.time() <= 0 then setPlayerStorageValue(cid, 9394, os.time() + 2) else doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if isInArray(config.waters, itemEx.itemid) and config.level <= getPlayerLevel(cid) and config.skillReq <= getPlayerSkill(cid, config.skill) and config.soul <= getPlayerSoul(cid) then local v, amount, damage = math.random(9000), 1, nil for i, k in pairs(t) do if v >= i[1] and v <= i[2] then if k.destroy then doRemoveItem(item.uid) end if k.summon then doCreateMonster(k.summon, toPosition) end if k.damage then damage = math.random(k.damage[1], k.damage[2]) doCreatureAddHealth(cid, - damage) doSendMagicEffect(getThingPos(cid), CONST_ME_DRAWBLOOD) doSendAnimatedText(getThingPos(cid), damage, TEXTCOLOR_RED) end if k.item then if k.amountmax then amount = math.random(k.amountmax) end doPlayerAddItem(cid, k.item, amount) end if k.msg then local msg = k.msg if msg:find("%%") then if msg:find("%%A") and k.item then msg = msg:gsub("%%A", amount > 1 and amount or getItemDescriptionsById(k.item).article) end if msg:find("%%N") and k.item then msg = msg:gsub("%%N", amount > 1 and getItemDescriptionsById(k.item).plural or getItemNameById(k.item)) end if msg:find("%%D") and damage then msg = msg:gsub("%%D", damage) end end doPlayerSendTextMessage(cid, config.msgType, msg) end doTransformItem(itemEx.uid, config.debris) doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(toPosition, k.destroy and CONST_ME_HITAREA or config.effect) return doPlayerAddSkillTry(cid, config.skill, config.addTries) end end end return doPlayerSendCancel(cid, "Você não pode pescar aqui.") end Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
Postado Junho 4, 2015 10 anos eu faço isso na source ant elf lá vc configura o tempo pra mover o item configurado '0' Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Junho 4, 2015 10 anos Autor --By: Gabriel Stocco(Wolf) Improvised Version-- pescar peixe vivo/morto/lixo/levar dano/ quebrar vara local config = { waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}, level = 1, skill = SKILL_FISHING, skillReq = 1, effect = CONST_ME_BLOCKHIT, addTries = 10, msgType = MESSAGE_EVENT_ADVANCE, soul = 0, } local t = { [{1, 50}] = {msg = "You found %A %N.", item = 5951}, --- fins [{51, 90}] = {msg = "You found %A %N.", item = 2226}, --- fishbone [{91, 110}] = {msg = "You found %A %N.", item = 2009}, --- bottle [{111, 130}] = {msg = "You found %A %N.", item = 2237}, --- cap [{131, 140}] = {msg = "You found %A %N.", item = 2670}, --- camarão [{161, 170}] = {msg = "You found %A %N.", item = 2669}, ---grande [{170, 175}] = {msg = "Sua vara de pesca caiu dentro da água!", destroy = true}, [{176, 180}] = {msg = "O peixe era muito forte e quebrou a vara de pesca!", destroy = true}, [{181, 4800}] = {msg = "Não pescou nada!"}, [{4801, 7200}] = {msg = "Você pescou um peixe!", summon = "Peixe"}, [{7201, 7600}] = {msg = "Você pescou um Atum!", summon = "Atum"}, [{7601, 8000}] = {msg = "Você pescou uma Truta Vermelha!", summon = "Truta Vermelha"}, [{8001, 8400}] = {msg = "Você pescou uma Truta Verde!", summon = "Truta Verde"}, [{8401, 8700}] = {msg = "Perdeu %D hitpoints porque um peixe infectado te mordeu!", damage = {550, 2800}}, [{8701, 9000}] = {msg = "Perdeu %D hitpoints porque está exausto!", damage = {550, 1800}} } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 9394) - os.time() <= 0 then setPlayerStorageValue(cid, 9394, os.time() + 2) else doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if isInArray(config.waters, itemEx.itemid) and config.level <= getPlayerLevel(cid) and config.skillReq <= getPlayerSkill(cid, config.skill) and config.soul <= getPlayerSoul(cid) then local v, amount, damage = math.random(9000), 1, nil for i, k in pairs(t) do if v >= i[1] and v <= i[2] then if k.destroy then doRemoveItem(item.uid) end if k.summon then doCreateMonster(k.summon, toPosition) end if k.damage then damage = math.random(k.damage[1], k.damage[2]) doCreatureAddHealth(cid, - damage) doSendMagicEffect(getThingPos(cid), CONST_ME_DRAWBLOOD) doSendAnimatedText(getThingPos(cid), damage, TEXTCOLOR_RED) end if k.item then if k.amountmax then amount = math.random(k.amountmax) end doPlayerAddItem(cid, k.item, amount) end if k.msg then local msg = k.msg if msg:find("%%") then if msg:find("%%A") and k.item then msg = msg:gsub("%%A", amount > 1 and amount or getItemDescriptionsById(k.item).article) end if msg:find("%%N") and k.item then msg = msg:gsub("%%N", amount > 1 and getItemDescriptionsById(k.item).plural or getItemNameById(k.item)) end if msg:find("%%D") and damage then msg = msg:gsub("%%D", damage) end end doPlayerSendTextMessage(cid, config.msgType, msg) end doTransformItem(itemEx.uid, config.debris) doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(toPosition, k.destroy and CONST_ME_HITAREA or config.effect) return doPlayerAddSkillTry(cid, config.skill, config.addTries) end end end return doPlayerSendCancel(cid, "Você não pode pescar aqui.") end Exaust funcionando só falta colocar para cobrar a minhoca(id:11416) para poder pescar manin, ai dou outro rep+ e melhor resposta huehue eu faço isso na source ant elf lá vc configura o tempo pra mover o item configurado '0' to com problema ao compilar source, então nada que se faça lá to conseguindo mexer ;x
Postado Junho 4, 2015 10 anos só falta colocar para cobrar a minhoca(id:11416) para poder pescar manin, ai dou outro rep+ e melhor resposta huehue Aaaa, esqueci disso, pera aí... --By: Gabriel Stocco(Wolf) Improvised Version-- pescar peixe vivo/morto/lixo/levar dano/ quebrar vara local config = { waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}, level = 1, skill = SKILL_FISHING, skillReq = 1, effect = CONST_ME_BLOCKHIT, addTries = 10, msgType = MESSAGE_EVENT_ADVANCE, soul = 0, } local t = { [{1, 50}] = {msg = "You found %A %N.", item = 5951}, --- fins [{51, 90}] = {msg = "You found %A %N.", item = 2226}, --- fishbone [{91, 110}] = {msg = "You found %A %N.", item = 2009}, --- bottle [{111, 130}] = {msg = "You found %A %N.", item = 2237}, --- cap [{131, 140}] = {msg = "You found %A %N.", item = 2670}, --- camarão [{161, 170}] = {msg = "You found %A %N.", item = 2669}, ---grande [{170, 175}] = {msg = "Sua vara de pesca caiu dentro da água!", destroy = true}, [{176, 180}] = {msg = "O peixe era muito forte e quebrou a vara de pesca!", destroy = true}, [{181, 4800}] = {msg = "Não pescou nada!"}, [{4801, 7200}] = {msg = "Você pescou um peixe!", summon = "Peixe"}, [{7201, 7600}] = {msg = "Você pescou um Atum!", summon = "Atum"}, [{7601, 8000}] = {msg = "Você pescou uma Truta Vermelha!", summon = "Truta Vermelha"}, [{8001, 8400}] = {msg = "Você pescou uma Truta Verde!", summon = "Truta Verde"}, [{8401, 8700}] = {msg = "Perdeu %D hitpoints porque um peixe infectado te mordeu!", damage = {550, 2800}}, [{8701, 9000}] = {msg = "Perdeu %D hitpoints porque está exausto!", damage = {550, 1800}} } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 9394) - os.time() <= 0 then setPlayerStorageValue(cid, 9394, os.time() + 2) else doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if getPlayerItemCount(cid, 11416) >= 1 then doPlayerRemoveItem(cid, 11416, 1) else doPlayerSendCancel(cid, "You need a ".. getItemName(11416) .." To do this.") doSendMagicEffect(fromPosition, CONST_ME_POFF) end if isInArray(config.waters, itemEx.itemid) and config.level <= getPlayerLevel(cid) and config.skillReq <= getPlayerSkill(cid, config.skill) and config.soul <= getPlayerSoul(cid) then local v, amount, damage = math.random(9000), 1, nil for i, k in pairs(t) do if v >= i[1] and v <= i[2] then if k.destroy then doRemoveItem(item.uid) end if k.summon then doCreateMonster(k.summon, toPosition) end if k.damage then damage = math.random(k.damage[1], k.damage[2]) doCreatureAddHealth(cid, - damage) doSendMagicEffect(getThingPos(cid), CONST_ME_DRAWBLOOD) doSendAnimatedText(getThingPos(cid), damage, TEXTCOLOR_RED) end if k.item then if k.amountmax then amount = math.random(k.amountmax) end doPlayerAddItem(cid, k.item, amount) end if k.msg then local msg = k.msg if msg:find("%%") then if msg:find("%%A") and k.item then msg = msg:gsub("%%A", amount > 1 and amount or getItemDescriptionsById(k.item).article) end if msg:find("%%N") and k.item then msg = msg:gsub("%%N", amount > 1 and getItemDescriptionsById(k.item).plural or getItemNameById(k.item)) end if msg:find("%%D") and damage then msg = msg:gsub("%%D", damage) end end doPlayerSendTextMessage(cid, config.msgType, msg) end doTransformItem(itemEx.uid, config.debris) doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(toPosition, k.destroy and CONST_ME_HITAREA or config.effect) return doPlayerAddSkillTry(cid, config.skill, config.addTries) end end end return doPlayerSendCancel(cid, "Você não pode pescar aqui.") end Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
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.