-
Total de itens
85 -
Registro em
-
Última visita
Posts postados por wenderotpoke
-
-
Em 23/04/2024 em 20:17, Holograma disse:
qual função do seu servidor adicina loot na bag e os parametros dela? deixei pra tu adaptar com comentarios no script dq deve ser alterado:
-- Função para obter o contêiner pai de um item function getContainerParent(container) local items = getContainerItems(container) if items then for i = 1, #items do local item = items[i] if item.uid ~= container then return container end end end return 0 end -- Função para adicionar o loot em uma das bags disponíveis function addToAvailableBags(loot, player) local playerSlotItem = getPlayerSlotItem(player, 3) -- Obtém a mochila do jogador local bags = {} -- Lista para armazenar as bags disponíveis -- Adiciona a mochila do jogador à lista de bags table.insert(bags, playerSlotItem.uid) -- Verifica se a mochila do jogador está dentro de outra bag local container = playerSlotItem.uid while container ~= 0 do container = getContainerParent(container) if container ~= 0 then table.insert(bags, container) -- Adiciona a bag à lista de bags end end -- Tenta adicionar o loot em cada bag disponível for _, bag in ipairs(bags) do local freeSlots = getContainerSlotsFree(bag) if freeSlots >= 1 and freeSlots ~= 333 then -- Aqui você deve substituir 'doCorpseAddLoot' pela função adequada para adicionar loot na bag -- Certifique-se de que a função esteja corretamente definida e acessível no contexto do seu script -- doCorpseAddLoot(getCreatureName(loot), bag, player, loot, loot) -- Adiciona o loot na bag return true -- Retorna true para indicar que o loot foi adicionado com sucesso end end return false -- Retorna false se não foi possível adicionar o loot em nenhuma bag end -- Verifica se o jogador é premium e está usando o auto loot if isPremium(getCreatureMaster(cid)) and isCollectAll(getCreatureMaster(cid)) then -- Tenta adicionar o loot em uma das bags disponíveis if not addToAvailableBags(target, getCreatureMaster(cid)) then -- Aqui você deve substituir 'doCorpseAddLoot' pela função adequada para adicionar loot na bag -- Certifique-se de que a função esteja corretamente definida e acessível no contexto do seu script -- doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target, corpse) -- Adiciona o loot na bag original se não houver outras disponíveis end else -- Aqui você deve substituir 'doCorpseAddLoot' pela função adequada para adicionar loot na bag -- Certifique-se de que a função esteja corretamente definida e acessível no contexto do seu script -- doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target, corpse) -- Adiciona o loot na bag original se o jogador não for premium ou não estiver usando o auto loot end
No caso ele não tem uma função que pega o loot ali o que fazia com que o loot fosse direto pra bag sem ir pro corpse é esse codigo
if getContainerSlotsFree(getPlayerSlotItem(getCreatureMaster(cid), 3).uid) >= 1 and getContainerSlotsFree(getPlayerSlotItem(getCreatureMaster(cid), 3).uid) ~= 333 then
doCorpseAddLoot(getCreatureName(target), getPlayerSlotItem(getCreatureMaster(cid), 3).uid, getCreatureMaster(cid), target, corpse) -
Em 16/04/2024 em 19:34, Holograma disse:
function sendMsgCountToItens(cid) local item1 = getPlayerStorageValue(cid, 251461):explode("|") -- Verificar se todos os itens foram entregues local allItemsDelivered = getPlayerItemCount(cid, item1[1]) >= tonumber(item1[3]) and getPlayerItemCount(cid, item1[2]) >= tonumber(item1[4]) and getPlayerItemCount(cid, item1[5]) >= tonumber(item1[7]) and getPlayerItemCount(cid, item1[6]) >= tonumber(item1[8]) -- Se todos os itens foram entregues, definir a mensagem como vazia e remover o valor de armazenamento if allItemsDelivered then setPlayerStorageValue(cid, 251461, -1) return false end -- Caso contrário, calcular os valores de contagem dos itens local valor1 = math.max(0, tonumber(item1[3]) - getPlayerItemCount(cid, item1[1])) local valor2 = math.max(0, tonumber(item1[4]) - getPlayerItemCount(cid, item1[2])) local valor3 = math.max(0, tonumber(item1[7]) - getPlayerItemCount(cid, item1[5])) local valor4 = math.max(0, tonumber(item1[8]) - getPlayerItemCount(cid, item1[6])) -- Enviar mensagem com a contagem dos itens que faltam selfSay("Ainda falta você me trazer os seguintes itens ["..valor1.."] "..getItemNameById(item1[1])..", ["..valor2.."] "..getItemNameById(item1[2])..", ["..valor3.."] "..getItemNameById(item1[5])..", ["..valor4.."] "..getItemNameById(item1[6])..".", cid) return true end
Não Pegou manin, esse aqui é um Action do Autoloot, quando eu cliko no corpose ele sobe e começa a contagem
-
1 hora atrás, Holograma disse:
Isso pode acontecer se a função não estiver disponível no arquivo de biblioteca onde está o seu script.
Vamos tentar fazer isso localmente:
-- Função para obter o contêiner pai de um item function getContainerParent(container) local items = getContainerItems(container) if items then for i = 1, #items do local item = items[i] if isInContainer(item.uid) then return container end end end return 0 end -- Função para adicionar o loot em uma das bags disponíveis function addToAvailableBags(loot, player) local playerSlotItem = getPlayerSlotItem(player, 3) -- Obtém a mochila do jogador local bags = {} -- Lista para armazenar as bags disponíveis -- Adiciona a mochila do jogador à lista de bags table.insert(bags, playerSlotItem.uid) -- Verifica se a mochila do jogador está dentro de outra bag local container = playerSlotItem.uid while container ~= 0 do container = getContainerParent(container) if container ~= 0 then table.insert(bags, container) -- Adiciona a bag à lista de bags end end -- Tenta adicionar o loot em cada bag disponível for _, bag in ipairs(bags) do local freeSlots = getContainerSlotsFree(bag) if freeSlots >= 1 and freeSlots ~= 333 then doCorpseAddLoot(getCreatureName(loot), bag, player, loot, loot) -- Adiciona o loot na bag return true -- Retorna true para indicar que o loot foi adicionado com sucesso end end return false -- Retorna false se não foi possível adicionar o loot em nenhuma bag end -- Verifica se o jogador é premium e está usando o auto loot if isPremium(getCreatureMaster(cid)) and isCollectAll(getCreatureMaster(cid)) then -- Tenta adicionar o loot em uma das bags disponíveis if not addToAvailableBags(target, getCreatureMaster(cid)) then doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target, corpse) -- Adiciona o loot na bag original se não houver outras disponíveis end else doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target, corpse) -- Adiciona o loot na bag original se o jogador não for premium ou não estiver usando o auto loot end
Nada, Continua acusando erro, coloquei tudo no sistema,
[Error - CreatureScript Interface]
data/creaturescripts/scripts/player/statsChange.lua:onStatsChange
Description:
data/lib/101 - Drazyn Lib.lua:28: attempt to call global 'isInContainer' (a nil value)
stack traceback:
data/lib/101 - Drazyn Lib.lua:28: in function 'getContainerParent'
data/lib/101-some functions.lua:1936: in function 'addToAvailableBags'
data/lib/Death System.lua:1807: in function 'doKillWildPoke'
data/creaturescripts/scripts/player/statsChange.lua:878: in function <data/creaturescripts/scripts/player/statsChange.lua:6>Com Bag na Principal acusou esse erro e sem a Bag o Abaixo
[Error - CreatureScript Interface]
data/creaturescripts/scripts/player/statsChange.lua:onStatsChange
Description:
data/lib/101-some functions.lua:1946: attempt to call global 'doCorpseAddLoot' (a nil value)
stack traceback:
data/lib/101-some functions.lua:1946: in function 'addToAvailableBags'
data/lib/Death System.lua:1807: in function 'doKillWildPoke'
data/creaturescripts/scripts/player/statsChange.lua:878: in function <data/creaturescripts/scripts/player/statsChange.lua:6> -
Em 10/04/2024 em 23:22, Holograma disse:
-- Função para adicionar o loot em uma das bags disponíveis function addToAvailableBags(loot, player) local playerSlotItem = getPlayerSlotItem(player, 3) -- Obtém a mochila do jogador local bags = {} -- Lista para armazenar as bags disponíveis -- Adiciona a mochila do jogador à lista de bags table.insert(bags, playerSlotItem.uid) -- Verifica se a mochila do jogador está dentro de outra bag local container = playerSlotItem.uid while container ~= 0 do container = getContainerParent(container) if container ~= 0 then table.insert(bags, container) -- Adiciona a bag à lista de bags end end -- Tenta adicionar o loot em cada bag disponível for _, bag in ipairs(bags) do local freeSlots = getContainerSlotsFree(bag) if freeSlots >= 1 and freeSlots ~= 333 then doCorpseAddLoot(getCreatureName(loot), bag, player, loot, loot) -- Adiciona o loot na bag return true -- Retorna true para indicar que o loot foi adicionado com sucesso end end return false -- Retorna false se não foi possível adicionar o loot em nenhuma bag end -- Verifica se o jogador é premium e está usando o auto loot if isPremium(getCreatureMaster(cid)) and isCollectAll(getCreatureMaster(cid)) then -- Tenta adicionar o loot em uma das bags disponíveis if not addToAvailableBags(target, getCreatureMaster(cid)) then doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target, corpse) -- Adiciona o loot na bag original se não houver outras disponíveis end else doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target, corpse) -- Adiciona o loot na bag original se o jogador não for premium ou não estiver usando o auto loot end
Manin não pegou, deu erro no final,
[Error - CreatureScript Interface]
data/creaturescripts/scripts/player/statsChange.lua:onStatsChange
Description:
data/lib/Death System.lua:1816: attempt to call global 'getContainerParent' (a nil value)
stack traceback:
data/lib/Death System.lua:1816: in function 'addToAvailableBags'
data/lib/Death System.lua:1837: in function 'doKillWildPoke'
data/creaturescripts/scripts/player/statsChange.lua:878: in function <data/creaturescripts/scripts/player/statsChange.lua:6> -
Em 27/03/2024 em 17:20, klbkevinklb disse:
local FOODS = { [2362] = {80, "Crunch.", 10}, -- Pizza [2666] = {150, "Munch.", 5}, -- Hamburger [2667] = {120, "Munch.", 7}, -- Cheeseburger [2668] = {100, "Mmmm.", 8}, -- Hot Dog [2669] = {170, "Munch.", 6}, -- Sandwich [2670] = {40, "Gulp.", 15}, -- Milkshake [2671] = {300, "Chomp.", 3}, -- Ice Cream [2672] = {600, "Chomp.", 2}, -- Cake [2673] = {50, "Yum.", 12}, -- Cookie [2674] = {60, "Yum.", 10}, -- Donut [2675] = {130, "Yum.", 7}, -- Chocolate Bar [2676] = {80, "Yum.", 9}, -- Candy [2677] = {10, "Yum.", 20}, -- Lollipop [2678] = {180, "Slurp.", 6}, -- Soda [2679] = {10, "Yum.", 18}, -- Chips [2680] = {20, "Yum.", 15}, -- Popcorn [2681] = {90, "Yum.", 8}, -- Pretzel [2682] = {200, "Yum.", 5}, -- Pie [2683] = {170, "Munch.", 5}, -- Pancake [2684] = {80, "Crunch.", 10}, -- Waffle [2685] = {60, "Munch.", 8}, -- French Fries [2686] = {90, "Crunch.", 10}, -- Onion Rings [2687] = {20, "Crunch.", 12}, -- Nachos [2688] = {90, "Munch.", 7}, -- Chicken Nuggets [2689] = {100, "Crunch.", 8}, -- Fish Sticks [2690] = {30, "Crunch.", 12}, -- Potato Chips [2691] = {80, "Crunch.", 9}, -- Tortilla Chips [2792] = {60, "Munch.", 8}, -- Brownie [2793] = {90, "Munch.", 6}, -- Cupcake [2695] = {60, "Gulp.", 8}, -- Smoothie [2696] = {90, "Smack.", 6}, -- Fruit Salad [2787] = {90, "Munch.", 7}, -- Salad [2788] = {40, "Munch.", 10}, -- Soup [2789] = {220, "Munch.", 4}, -- Ramen [2790] = {300, "Munch.", 3}, -- Sushi [2791] = {300, "Munch.", 3}, -- Burrito [2794] = {30, "Munch.", 10}, -- Tacos [2795] = {360, "Munch.", 2}, -- Pasta [2796] = {50, "Munch.", 8}, -- Mac & Cheese [5097] = {40, "Yum.", 10}, -- Bread [6125] = {80, "Gulp.", 7}, -- Milk [6278] = {100, "Mmmm.", 8}, -- Orange Juice [6279] = {150, "Mmmm.", 6}, -- Apple Juice [6393] = {120, "Mmmm.", 7}, -- Grape Juice [6394] = {150, "Mmmm.", 6}, -- Fruit Punch [6501] = {200, "Mmmm.", 5}, -- Energy Drink [6541] = {60, "Gulp.", 8}, -- Water [6542] = {60, "Gulp.", 8}, -- Coconut Water [6543] = {60, "Gulp.", 8}, -- Sports Drink [6544] = {60, "Gulp.", 8}, -- Tea [6545] = {60, "Gulp.", 8}, -- Coffee [6574] = {40, "Mmmm.", 10}, -- Milkshake (Strawberry) [7158] = {150, "Munch.", 6}, -- Milkshake (Vanilla) [7159] = {130, "Munch.", 6}, -- Milkshake (Chocolate) [7372] = {70, "Yum.", 9}, -- Milkshake (Banana) [7373] = {70, "Yum.", 9}, -- Milkshake (Mint Chocolate Chip) [7374] = {70, "Yum.", 9}, -- Milkshake (Caramel) [7375] = {70, "Yum.", 9}, -- Milkshake (Cookies & Cream) [7376] = {70, "Yum.", 9}, -- Milkshake (Peanut Butter) [7377] = {70, "Yum.", 9}, -- Milkshake (Strawberry Banana) [7909] = {40, "Crunch.", 10}, -- Milkshake (Blueberry) [8838] = {70, "Gulp.", 7}, -- Milkshake (Raspberry) [8839] = {50, "Yum.", 9}, -- Milkshake (Blackberry) [8840] = {20, "Yum.", 15}, -- Milkshake (Peach) [8841] = {30, "Urgh.", 20}, -- Milkshake (Mango) [8842] = {30, "Munch.", 10}, -- Milkshake (Pineapple) [8843] = {30, "Crunch.", 10}, -- Milkshake (Watermelon) [8844] = {30, "Gulp.", 12}, -- Milkshake (Cantaloupe) [8845] = {20, "Munch.", 10}, -- Milkshake (Kiwi) [8847] = {110, "Yum.", 8}, -- Milkshake (Coconut) [12211] = {180, "Mmmm.", 6}, -- Milkshake (Mango-Peach) [12213] = {130, "Munch.", 7}, -- Milkshake (Berry Blast) [12214] = {80, "Crunch.", 9}, -- Milkshake (Tropical Twist) [12215] = {100, "Munch.", 7}, -- Milkshake (Pineapple-Banana) [12216] = {60, "Gulp.", 9}, -- Milkshake (Cherry) [12217] = {50, "Yum.", 10}, -- Milkshake (Orange) [12218] = {150, "Crunch.", 6}, -- Milkshake (Grape) [12219] = {70, "Mmmm.", 7}, -- Milkshake (Strawberry) [12220] = {70, "Mmmm.", 7}, -- Milkshake (Blueberry) [12221] = {70, "Mmmm.", 7}, -- Milkshake (Raspberry) [12222] = {240, "Crunch.", 5}, -- Milkshake (Mixed Berry) -- o 5 é a quantia de regen } function onUse(cid, item, fromPosition, itemEx, toPosition) local food = FOODS[item.itemid] if not food then return false end local thing = getCreatureSummons(cid)[1] or cid if isPlayer(thing) then if getPlayerFood(cid) + food[1] >= 1000 then doPlayerSendCancel(cid, "You are full.") return true end doPlayerFeed(cid, food[1] * 4) doCreatureSay(cid, food[2], TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 1) elseif isSummon(thing) then local feed = food[1] local regeneration = food[3] or 0 -- Regeneração padrão if getPlayerStorageValue(thing, 1009) - feed < 0 then doSendMagicEffect(getThingPos(thing), 169) doSendMagicEffect(pos, 169) local newh = getPlayerStorageValue(thing, 1008) - math.ceil(feed / 😎 if newh <= 1 then newh = 1 end setPlayerStorageValue(thing, 1008, newh) return true end setPlayerStorageValue(thing, 1009, getPlayerStorageValue(thing, 1009) - feed) setPlayerStorageValue(thing, 1008, getPlayerStorageValue(thing, 1008) + regeneration) -- Incremento baseado na regeneração específica da comida doCreatureSay(thing, food[2], TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 1) end return true end
Não pegou mano, a ideia e ele ficar curando tipo uma pot que dura o tempo do food
-
Galera to quase fazendo uma magica, um sistema de auto loot que não precisa ficar catando o loot ele cai direto da bag, porem estou com um probleminha, preciso que o loot vai pra outras bags e não fique so na que está na base, tentei configurar mas não consegui
Spoiler-- // AUTO LOOT SEM CLICK // --
if isPremium(getCreatureMaster(cid)) and isCollectAll(getCreatureMaster(cid)) then
if getContainerSlotsFree(getPlayerSlotItem(getCreatureMaster(cid), 3).uid) >= 1 and getContainerSlotsFree(getPlayerSlotItem(getCreatureMaster(cid), 3).uid) ~= 333 then
doCorpseAddLoot(getCreatureName(target), getPlayerSlotItem(getCreatureMaster(cid), 3).uid, getCreatureMaster(cid), target, corpse)
else
doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target, corpse)
end
else
doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target, corpse)
end
end
end
-- // AUTO LOOT SEM CLICK // --O que eu preciso basicamente e que ele encontre outras bags automaticamente e vai colocando, tipo se eu colocar ali 3 bags uma dentro da outra ele ir seguindo o ritimo até encher todas.... Quem ajudar eu compartilho o script e como configurei VALENDO REP
-
Cara não sei se e possivel mas queria um sistema de regen fora o base que o proprio game ja tem né no vactions quando ta de barriga cheia. queria que o food tivesse um regen dele mesmo tipo por exemplo a Pizza dar 10 de vida /s e o hotdog dar 7.5. a ideia é usar esses numeros do proprio feed de cada item como regen base
Spoilerlocal FOODS =
{
[2362] = {80, "Crunch."},
[2666] = {150, "Munch."},
[2667] = {120, "Munch."},
[2668] = {100, "Mmmm."},
[2669] = {170, "Munch."},
[2670] = {40, "Gulp."},
[2671] = {300, "Chomp."},
[2672] = {600, "Chomp."},
[2673] = {50, "Yum."},
[2674] = {60, "Yum."},
[2675] = {130, "Yum."},
[2676] = {80, "Yum."},
[2677] = {10, "Yum."},
[2678] = {180, "Slurp."},
[2679] = {10, "Yum."},
[2680] = {20, "Yum."},
[2681] = {90, "Yum."},
[2682] = {200, "Yum."},
[2683] = {170, "Munch."},
[2684] = {80, "Crunch."},
[2685] = {60, "Munch."},
[2686] = {90, "Crunch."},
[2687] = {20, "Crunch."},
[2688] = {90, "Munch."},
[2689] = {100, "Crunch."},
[2690] = {30, "Crunch."},
[2691] = {80, "Crunch."},
[2792] = {60, "Munch."},
[2793] = {90, "Munch."},
[2695] = {60, "Gulp."},
[2696] = {90, "Smack."},
[2787] = {90, "Munch."},
[2788] = {40, "Munch."},
[2789] = {220, "Munch."},
[2790] = {300, "Munch."},
[2791] = {300, "Munch."},
[2792] = {60, "Munch."},
[2794] = {30, "Munch."},
[2795] = {360, "Munch."},
[2796] = {50, "Munch."},
[2793] = {90, "Munch."},
[5097] = {40, "Yum."},
[6125] = {80, "Gulp."},
[6278] = {100, "Mmmm."},
[6279] = {150, "Mmmm."},
[6393] = {120, "Mmmm."},
[6394] = {150, "Mmmm."},
[6501] = {200, "Mmmm."},
[6541] = {60, "Gulp."},
[6542] = {60, "Gulp."},
[6543] = {60, "Gulp."},
[6544] = {60, "Gulp."},
[6545] = {60, "Gulp."},
--[6569] = {100, "Mmmm."}, Retirado para script de rare candy
[6574] = {40, "Mmmm."},
[7158] = {150, "Munch."},
[7159] = {130, "Munch."},
[7372] = {70, "Yum."},
[7373] = {70, "Yum."},
[7374] = {70, "Yum."},
[7375] = {70, "Yum."},
[7376] = {70, "Yum."},
[7377] = {70, "Yum."},
[7909] = {40, "Crunch."},
[8838] = {70, "Gulp."},
[8839] = {50, "Yum."},
[8840] = {20, "Yum."},
[8841] = {30, "Urgh."},
[8842] = {30, "Munch."},
[8843] = {30, "Crunch."},
[8844] = {30, "Gulp."},
[8845] = {20, "Munch."},
[8847] = {110, "Yum."},
[12211] = {180, "Mmmm."},
[12213] = {130, "Munch."},
[12214] = {80, "Crunch."},
[12215] = {100, "Munch."},
[12216] = {60, "Gulp."},
[12217] = {50, "Yum."},
[12218] = {150, "Crunch."},
[12219] = {70, "Mmmm."},
[12220] = {70, "Mmmm."},
[12221] = {70, "Mmmm."},
[12222] = {240, "Crunch."},
}local pos = getThingPos(cid)
function onUse(cid, item, fromPosition, itemEx, toPosition)
local food = FOODS[item.itemid]
if(not food) then
return false
endlocal thing = getCreatureSummons(cid)[1] or cid
if isPlayer(thing) then
if((getPlayerFood(cid) + food[1]) >= 1000) then
doPlayerSendCancel(cid, "You are full.")
return true
enddoPlayerFeed(cid, food[1] * 4)
doCreatureSay(cid, food[2], TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)elseif isSummon(thing) then
local feed = food[1]
if getPlayerStorageValue(thing, 1009) - feed < 0 then
doSendMagicEffect(getThingPos(thing), 169)
doSendMagicEffect(pos, 169)
local newh = getPlayerStorageValue(thing, 1008) - math.ceil(feed / 😎
if newh <= 1 then newh = 1 end
setPlayerStorageValue(thing, 1008, newh)
return true
endsetPlayerStorageValue(thing, 1009, getPlayerStorageValue(thing, 1009) - feed)
setPlayerStorageValue(thing, 1008, getPlayerStorageValue(thing, 1008) + 1)
doCreatureSay(thing, food[2], TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
end
return true
end -
-
-
Spoiler
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidMoney = getPlayerMoney(cid)
local vaultmoney = getItemAttribute(itemEx.uid, "money")
if (getItemAttribute(itemEx.uid, "money") == 0) then
doSetItemAttribute(itemEx.uid, "money", cidMoney)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce depositou "..cidMoney.." dolares!")
if getPlayerMoney(cid) >= 1000000 and getPlayerMoney(cid) < 10000000 then
item = doPlayerAddItem(cid, 7896, 1)
doItemSetAttribute(item, "money", cidMoney)
doPlayerRemoveItem(cid, itemEx, 1)
doRemoveItem(itemEx.uid, 1)
end
if getPlayerMoney(cid) >= 10000000 and getPlayerMoney(cid) < 100000000 then
item = doPlayerAddItem(cid, 7897, 1)
doItemSetAttribute(item, "money", cidMoney)
doPlayerRemoveItem(cid, itemEx, 1)
doRemoveItem(itemEx.uid, 1)
end
if getPlayerMoney(cid) >= 100000000 then
item2 = doPlayerAddItem(cid, 7898, 1)
doItemSetAttribute(item2, "money", cidMoney)
doPlayerRemoveItem(cid, itemEx, 1)
doRemoveItem(itemEx.uid, 1)
end
doPlayerRemoveMoney(cid, cidMoney)
else
item2 = doPlayerAddItem(cid, 7895, 1)
doItemSetAttribute(item2, "money", 0)
doPlayerRemoveItem(cid, itemEx, 1)
doRemoveItem(itemEx.uid, 1)
doPlayerAddMoney(cid, vaultmoney)
end
return true
endAlguem me da um help ai, quero Limitar o Vault a ter 2000KK
-
Spoiler
local posis= {
{'Player 01', {x = 526, y = 183, z = 14}},
{'Player 02', {x = 528, y = 183, z = 14}},
}local config = {
[17000] = {
nameDz = "Inseto",
chave = 2155,
count = 1,
area1 = {fromx = 1657, fromy = 663, fromz = 15, tox = 1920, toy = 760, toz= 15},
area2 = {fromx = 1658, fromy = 760, fromz = 15, tox = 1912, toy = 857, toz= 15},
area3 = {fromx = 1919, fromy = 663, fromz = 15, tox = 2182, toy = 765, toz= 15},
area4 = {fromx = 1924, fromy = 774, fromz = 15, tox = 2182, toy = 857, toz= 15},
tele1 = {x = 1736, y = 753, z = 15},
tele2 = {x = 1736, y = 850, z = 15},
tele3 = {x = 1998, y = 753, z = 15},
tele4 = {x = 1998, y = 850, z = 15},
}
}function onUse(cid, item, fromPosition, itemEx, toPosition)
if not config[item.actionid] then
return true
end
local cfg = config[item.actionid]
local pokes = cfg.poke
local boss= cfg.last
if isRiderOrFlyOrSurf(cid) then
doPlayerSendCancel(cid, "Saia do ride ou fly para poder acessar a Dungeon.")
return true
end
for _, array in ipairs(posis) do
local p = getRecorderPlayer(array[2])
if not isPlayer(p) then
doPlayerSendTextMessage(cid, 20, "Voces nao estao na posicao correta!")
return true
end
end
if getPlayerItemCount(cid, cfg.chave) >= cfg.count then
if #getPlayersInArea(cfg.area1) < 1 thenfor _, array in ipairs(posis) do
local p = getRecorderPlayer(array[2])
if isPlayer(p) then
doTeleportThing(p, cfg.tele1)
setPlayerStorageValue(p, 2154601, 1)
setPlayerStorageValue(p, 2254600, 1)
doPlayerRemoveItem(p, cfg.chave, cfg.count)
addEvent(doTeleportFinish, 30 * 60 * 1000, p)
doSendPlayerExtendedOpcode(p, 133, 1800)
end
end
elseif #getPlayersInArea(cfg.area2) < 1 then
for _, array in ipairs(posSolo, posDuo, posTrio) do
local p = getRecorderPlayer(array[2])
if isPlayer(p) then
doTeleportThing(p, cfg.tele1)
setPlayerStorageValue(p, 2154601, 1)
setPlayerStorageValue(p, 2254600, 1)
doPlayerRemoveItem(p, cfg.chave, cfg.count)
addEvent(doTeleportFinish, 30 * 60 * 1000, p)
doSendPlayerExtendedOpcode(p, 133, 1800)
end
end
elseif #getPlayersInArea(cfg.area3) < 1 then
for _, array in ipairs(posis) do
local p = getRecorderPlayer(array[2])
if isPlayer(p) then
doTeleportThing(p, cfg.tele1)
setPlayerStorageValue(p, 2154601, 1)
setPlayerStorageValue(p, 2254600, 1)
doPlayerRemoveItem(p, cfg.chave, cfg.count)
addEvent(doTeleportFinish, 30 * 60 * 1000, p)
doSendPlayerExtendedOpcode(p, 133, 1800)
end
end
elseif #getPlayersInArea(cfg.area4) < 1 then
for _, array in ipairs(posis) do
local p = getRecorderPlayer(array[2])
if isPlayer(p) then
doTeleportThing(p, cfg.tele1)
setPlayerStorageValue(p, 2154601, 1)
setPlayerStorageValue(p, 2254600, 1)
doPlayerRemoveItem(p, cfg.chave, cfg.count)
addEvent(doTeleportFinish, 30 * 60 * 1000, p)
doSendPlayerExtendedOpcode(p, 133, 1800)
end
end
else
doPlayerSendCancel(cid, "Nao tem Zonas disponiveis no momento, tente mais tarde!")
end
else
doPlayerSendCancel(cid, "Voce precisa de uma Bronze Dimensional Key para acessar essa Dungeon.")
end
return true
endSalvee, galera seguinte preciso configurar isso pra nascer os mobs nas determinadas areas de 1 a 4, gostaria de que tivesse um meio dos mobs nascerem aleatoriamente dentro da sala da dungeon, por exemplo
Sala 1 = "Charizard", "Arcanine", Ninetales"
Sala 2 = "Blastosie", "Gyarados", "Kingdra",
Sala 3= "Venusaur", "Tropius", "Exeggutor",
Sala 4 "Shiny Beedrill", "Shiny Butterfree", "Shiny Venomoth"
e os locais onde vão nascer dentro da sala na qual tem a area marcada
Quem puder me ajudar ficarei grato d+
-
Não entendi bem kkk vou te mostrar uma que eu tenho pra daily kill separada por lvl, minha ideia seria que ficasse meio que assim, pra que eu possa alterar é so uma ideia de como funfa
SpoilerkillModes = {
storage = 24000,
storage2 = 24001,[1] = {
name = "basic",
experience = 250000, -- 70000
items = {
{19221, 5}, --- Catcher Token
},
pokemons = {"Caterpie", "Weedle", "Magikarp", "Oddish", "Pidgey", "Spearow", "Paras", "Diglett", "Poliwag", "Tentacool", "Bellsprout", "Voltorb", "Horsea", "Goldeen", "Staryu"},
},
[2] = {
name = "very easy",
experience = 250000, -- 70000
items = {
{19221, 5}, --- Catcher Token
},
pokemons = {"Bulbasaur", "Charmander", "Squirtle", "Metapod", "Kakuna", "Pidgeotto", "Ekans", "Sandshrew", "Nidorino", "Nidorina", "CLefairy", "Jigglypuff", "Psyduck", "Growlithe", "Poliwhirl", "Geodude", "Koffing", "Ponyta", "Drownzee", "Gastly", "Cubone", "Rhyhorn", "Eevee"},
},
[3] = {
name = "easy",
experience = 250000, -- 70000
items = {
{19221, 10}, --- Catcher Token
{15645, 20}, -- devoted token
{2394, 50}, -- poke ball
},
pokemons = {"Butterfree", "Beedrill", "Raticate", "Gloom", "Weepinbell", "Arbok", "Pikachu", "Golbat", "Dugtrio", "Electrode", "Seaking", "Ivysaur", "Charmeleon", "Wartortle", "Parasect", "Graveler", "Haunter", "Seadra", "Kadabra", "Machoke", "Slowbro", "Farfetch'd"},
},
[4] = {
name = "medium",
experience = 500000, -- 150000
items = {
{19221, 15}, -- catcher token
{15645, 50}, -- devoted token
{2393, 100}, -- great ball
},
pokemons = {"Fearow", "Vileplume", "Venomoth", "Persian", "Primeape", "Magneton", "Dodrio", "Onix", "Kingler", "Marowak", "Weezing", "Tangela", "Starmie", "Tauros", "Hypno", "Dewgong", "Cloyster", "Sandslash"},
},
[5] = {
name = "hard",
experience = 1000000, -- 200000
items = {
{19221, 20}, -- catcher token
{15645, 100}, -- devoted token
{2392, 100}, -- super ball
},
pokemons = {"Nidoking", "Nidoqueen", "Clefable", "Ninetales", "Wigglytuff", "Golduck", "Victreebel", "Golem", "Rapidash", "Pinsir", "Dragonair", "Vaporeon", "Jolteon", "Flareon"},
},
[6] = {
name = "very hard",
experience = 2000000, -- 280000
items = {
{19221, 25}, -- catcher token
{15645, 150}, -- devoted token
{15679, 300}, -- ultra ball
},
pokemons = {"Venusaur", "Charizard", "Blastoise", "Pidgeot", "Alakazam", "Tentacruel", "Gengar", "Rhydon", "Kangaskhan", "Scyther", "Jynx", "Electabuzz", "Magmar", "Raichu"},
},
[7] = {
name = "expert",
experience = 2000000, -- 280000
items = {
{19221, 30}, -- catcher token
{15645, 200}, -- devoted token
{15679, 50}, -- Premier ball
},
pokemons = {"Gyarados", "Arcanine", "Muk", "Exeggutor", "Lapras", "Machamp", "Dragonite"},
},
}function getKillMode(cid)
if isPlayer(cid) then
if not (tostring(getPlayerStorageValue(cid, killModes.storage)) == "-1") then
return tonumber(tostring(getPlayerStorageValue(cid, killModes.storage)):explode("|")[1])
end
end
return 1
endfunction getKillCount(cid)
if isPlayer(cid) then
if not (tostring(getPlayerStorageValue(cid, killModes.storage)) == "-1") then
return tonumber(getPlayerStorageValue(cid, killModes.storage):explode("|")[5])
end
end
return tonumber(0)
endfunction setKillCatched(cid, bool)
local pokecount = tonumber(getPlayerStorageValue(cid, 24003) <= 0 and 0 or getPlayerStorageValue(cid, 24003))
setPlayerStorageValue(cid, killModes.storage, "|"..getPlayerStorageValue(cid, killModes.storage):explode("|")[1].."|"..getPlayerStorageValue(cid, killModes.storage):explode("|")[2].."|"..getPlayerStorageValue(cid, killModes.storage):explode("|")[3].."|"..tostring(bool).."|"..pokecount)
endfunction getPokemonsToKill(cid)
if isPlayer(cid) then
if not (tostring(getPlayerStorageValue(cid, killModes.storage)) == "-1") then
local string = getPlayerStorageValue(cid, killModes.storage):explode("|")[3]
return string:explode(";")
end
end
return {"none1", "none2"}
endfunction hasKilled(cid)
if isPlayer(cid) then
if not (tostring(getPlayerStorageValue(cid, killModes.storage)) == "-1") then
return (getPlayerStorageValue(cid, killModes.storage):explode("|")[4] == "true")
end
end
return false
endfunction getLastDayKill(cid)
if isPlayer(cid) then
if not (tostring(getPlayerStorageValue(cid, killModes.storage)) == "-1") then
return tostring(getPlayerStorageValue(cid, killModes.storage)):explode("|")[2]
end
end
return "08-00-00"
endfunction resetDailyKill(cid)
if isPlayer(cid) then
local pokemons = killModes[(getCatchMode(cid))].pokemons
local number1 = math.random(1, #pokemons)
local number2 = number1
local count = math.random(getPlayerLevel(cid) * 2)
repeat
number2 = math.random(1, #pokemons)
until(not (number1 == number2))
repeat
count2 = math.random(getPlayerLevel(cid) * 2)
until(not (count == count2))
if getPlayerLevel(cid) >= 5 and getPlayerLevel(cid) < 30 then
valor = 1
elseif getPlayerLevel(cid) >= 30 and getPlayerLevel(cid) < 60 then
valor = 2
elseif getPlayerLevel(cid) >= 60 and getPlayerLevel(cid) < 100 then
valor = 3
elseif getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) < 140 then
valor = 4
elseif getPlayerLevel(cid) >= 140 and getPlayerLevel(cid) < 180 then
valor = 5
elseif getPlayerLevel(cid) >= 180 and getPlayerLevel(cid) < 200 then
valor = 6
elseif getPlayerLevel(cid) >= 220 then
valor = 7
end
local day = tostring(""..getNumberDay().."-"..getNumberMonth().."-"..getNumberYear().."")
setPlayerStorageValue(cid, killModes.storage, "|"..valor.."|"..day.."|"..pokemons[number1]..";"..pokemons[number2].."|false|"..count2)
setPlayerStorageValue(cid, killModes.storage2, -1)
setPlayerStorageValue(cid, 24003, 0)
end
endfunction nextDailyKill(cid)
if isPlayer(cid) then
if getCatchMode(cid) == #killModes then
setKillCatched(cid, false)
setPlayerStorageValue(cid, killModes.storage2, "finished")
return false
end
local pokemons = killModes[(getCatchMode(cid) + 1)].pokemons
local number1 = math.random(1, #pokemons)
local number2 = number1
local count = math.random(getPlayerLevel(cid) * 2)
repeat
number2 = math.random(1, #pokemons)
until(not (number1 == number2))
repeat
count2 = math.random(getPlayerLevel(cid) * 2)
until(not (count == count2))
local day = tostring(""..getNumberDay().."-"..getNumberMonth().."-"..getNumberYear().."")
local text = "|"..(getCatchMode(cid) + 1).."|"..day.."|"..pokemons[number1]..";"..pokemons[number2].."|false|"..count2
setKillCatched(cid, false)
setPlayerStorageValue(cid, killModes.storage, text)
setPlayerStorageValue(cid, killModes.storage2, -1)
setPlayerStorageValue(cid, 24003, 0)
end
return true
end -
Spoiler
local dailyItens = {
itemQ = {
12193, 13863, 19530, 12272, 12184, 13892, 12270, 13901, 12203,
13900, 12208, 12268, 13898, 12276, 12275, 19527, 12169, 19531, 12199,
13874, 12204, 12334, 13889, 12182, 19539, 13867, 12148, 12191, 19543,
19540, 12168, 12269, 19535, 12195, 13873, 12280, 12166, 12284, 12141,
12285, 19528, 12178, 19526, 12167, 13864, 12178, 12341, 19534, 19536,
12154, 13897, 12160},
minCount = 15,
maxCount = 30,
ItemRare = {
12244, 12242, 11446, 12232, 11454,
19202, 11452, 11447, 11443, 11450,
11449, 11445, 11448, 11453, 11444,
11441,11442},
minRcount = 2,
maxRcount = 5
}
local cash = {
-- ItemQ{item = 12193, valor = 250},
{item = 13863, valor = 50},
{item = 19530, valor = 250},
{item = 12272, valor = 500},
{item = 12184, valor = 50},
{item = 13892, valor = 250},
{item = 12270, valor = 250},
{item = 13901, valor = 150},
{item = 12203, valor = 50},
{item = 13900, valor = 150},
{item = 12208, valor = 150},
{item = 12268, valor = 500},
{item = 13898, valor = 250},
{item = 12276, valor = 500},
{item = 12275, valor = 500},
{item = 19527, valor = 50},
{item = 12169, valor = 500},
{item = 19531, valor = 150},
{item = 12199, valor = 250},
{item = 13874, valor = 150},
{item = 12204, valor = 250},
{item = 12334, valor = 10},
{item = 13889, valor = 250},
{item = 12182, valor = 50},
{item = 19539, valor = 150},
{item = 13867, valor = 150},
{item = 12148, valor = 500},
{item = 12191, valor = 150},
{item = 19543, valor = 150},
{item = 19540, valor = 500},
{item = 12168, valor = 250},
{item = 12269, valor = 500},
{item = 19535, valor = 250},
{item = 12195, valor = 500},
{item = 13873, valor = 500},
{item = 12280, valor = 250},
{item = 12166, valor = 500},
{item = 12284, valor = 250},
{item = 12141, valor = 250},
{item = 12285, valor = 500},
{item = 19528, valor = 150},
{item = 12178, valor = 150},
{item = 19526, valor = 250},
{item = 12167, valor = 500},
{item = 13864, valor = 250},
{item = 12341, valor = 150},
{item = 19534, valor = 50},
{item = 19536, valor = 250},
{item = 12154, valor = 150},
{item = 13897, valor = 150},
{item = 12160, valor = 150},-- ItemRare
{item = 12244, valor = 50000},
{item = 12242, valor = 10000},
{item = 11446, valor = 5000},
{item = 12232, valor = 50000},
{item = 11454, valor = 5000},
{item = 19202, valor = 5000},
{item = 11452, valor = 5000},
{item = 11447, valor = 5000},
{item = 11443, valor = 5000},
{item = 11450, valor = 5000},
{item = 11449, valor = 50000},
{item = 11445, valor = 5000},
{item = 11448, valor = 5000},
{item = 11453, valor = 5000},
{item = 11444, valor = 5000},
{item = 11441, valor = 5000},
{item = 11442, valor = 5000},
}function addCashToPlayer(cid) -- FUNÇÃO DE ADICIONAR CASH AOS PLAYERS DEPENDENDO DO DAILY ITENS.
local valor_total = 0
local item1 = getPlayerStorageValue(cid, 251461):explode("|")for i = 1, #cash do
if cash[i].item == tonumber(item1[1]) then
valor_total = valor_total + (cash[i].valor * tonumber(item1[3])) or tonumber(5000)
end
if cash[i].item == tonumber(item1[2]) then
valor_total = valor_total + (cash[i].valor * tonumber(item1[4])) or tonumber(5000)
end
if cash[i].item == tonumber(item1[5]) then
valor_total = valor_total + (cash[i].valor * tonumber(item1[7])) or tonumber(5000)
end
if cash[i].item == tonumber(item1[6]) then
valor_total = valor_total + (cash[i].valor * tonumber(item1[8])) or tonumber(5000)
end
end
valor_total = valor_total * 10.0
doPlayerAddMoney(cid, valor_total)
return true
endfunction resetDailyItens(cid) -- FUNÇÃO PARA RESETAR O DAILYITENS
setPlayerStorageValue(cid, 251480, -1)
setPlayerStorageValue(cid, 251479, -1)
setDailyItens(cid)
return true
endfunction sendMsgCountToItens(cid) -- FUNÇÃO PARA MANDAR A MSG DE QUANTOS ITENS FALTA
local item1 = getPlayerStorageValue(cid, 251461):explode("|")
if getPlayerItemCount(cid, item1[1]) >= tonumber(item1[3]) then
valor1 = 0
else
valor1 = tonumber(item1[3]) - getPlayerItemCount(cid, item1[1])
end
if getPlayerItemCount(cid, item1[2]) >= tonumber(item1[4]) then
valor2 = 0
else
valor2 = tonumber(item1[4]) - getPlayerItemCount(cid, item1[2])
end
if getPlayerItemCount(cid, item1[5]) >= tonumber(item1[7]) then
valor3 = 0
else
valor3 = tonumber(item1[7]) - getPlayerItemCount(cid, item1[5])
end
if getPlayerItemCount(cid, item1[6]) >= tonumber(item1[8]) then
valor4 = 0
else
valor4 = tonumber(item1[8]) - getPlayerItemCount(cid, item1[6])
end
selfSay("Ainda falta você me trazer os seguintes itens ["..valor1.."] "..getItemNameById(item1[1])..", ["..valor2.."] "..getItemNameById(item1[2])..", ["..valor3.."] "..getItemNameById(item1[5])..", ["..valor4.."] "..getItemNameById(item1[6])..".", cid)
return true
endfunction sendMsgToItens(cid) -- FUNÇÃO PARA MANDAR A MSG DOS ITENS PARA ENTREGAR.
local item1 = getPlayerStorageValue(cid, 251461):explode("|")
return selfSay("Você poderia me trazer esses itens ["..tonumber(item1[3]).."] "..getItemNameById(item1[1])..", ["..tonumber(item1[4]).."] "..getItemNameById(item1[2])..", ["..tonumber(item1[7]).."] "..getItemNameById(item1[5])..", ["..tonumber(item1[8]).."] "..getItemNameById(item1[6]).."?", cid)
endfunction inDailyItens(cid) -- FUNÇÃO PARA CHECAR SE O PLAYER ESTÁ NA DAILY ITENS.
if getPlayerStorageValue(cid, 251480) >= 1 then
return true
end
return false
endfunction doPlayerRemoveDailyItens(cid) -- FUNÇÃO PARA REMOVER ITENS DO DAILY ITENS
local item1 = getPlayerStorageValue(cid, 251461):explode("|")
if getPlayerStorageValue(cid, 251461) ~= -1 then
if getPlayerItemCount(cid, tonumber(item1[1])) >= tonumber(item1[3]) and getPlayerItemCount(cid, tonumber(item1[2])) >= tonumber(item1[4]) and getPlayerItemCount(cid, tonumber(item1[5])) >= tonumber(item1[7]) and getPlayerItemCount(cid, tonumber(item1[6])) >= tonumber(item1[8]) then
doPlayerRemoveItem(cid, item1[1], item1[3])
doPlayerRemoveItem(cid, item1[2], item1[4])
doPlayerRemoveItem(cid, item1[5], item1[7])
doPlayerRemoveItem(cid, item1[6], item1[8])
return true
end
end
return true
endfunction getDailyItens(cid) -- FUNÇÃO PARA CHECAR SE O PLAYER JÁ TEM TODOS OS ITENS
local item1 = getPlayerStorageValue(cid, 251461):explode("|")
if getPlayerStorageValue(cid, 251461) ~= -1 then
if getPlayerItemCount(cid, tonumber(item1[1])) >= tonumber(item1[3]) and getPlayerItemCount(cid, tonumber(item1[2])) >= tonumber(item1[4]) and getPlayerItemCount(cid, tonumber(item1[5])) >= tonumber(item1[7]) and getPlayerItemCount(cid, tonumber(item1[6])) >= tonumber(item1[8]) then
return true
end
endreturn false
endfunction getLastDailyItens(cid) -- Checar se o player já fez a task de itens.
if isPlayer(cid) then
if getPlayerStorageValue(cid, 251462) ~= -1 then
return tostring(getPlayerStorageValue(cid, 251462)):explode("|")[1]
end
end
return "08-00-00"
end
function setDailyItens(cid) -- ADICIONAR DAILY ITENS AOS PLAYERS.--// Reload Itens 1 // --
local itemq1 = dailyItens.itemQ[math.random(#dailyItens.itemQ)]
local itemq2 = itemq1
repeat
itemq2 = dailyItens.itemQ[math.random(#dailyItens.itemQ)]
until(not (itemq1 == itemq2))--// Reload Count 1 // --
local count1 = math.random(dailyItens.minCount, dailyItens.maxCount)
local count2 = count1
repeat
count2 = math.random(dailyItens.minCount, dailyItens.maxCount)
until(not (count1 == count2))--// Reload Rare Itens 1 // --
local rare1 = dailyItens.ItemRare[math.random(#dailyItens.ItemRare)]
local rare2 = rare1
repeat
rare2 = dailyItens.ItemRare[math.random(#dailyItens.ItemRare)]
until(not (rare1 == rare2))
--// Reload Rare Count 1 // --local rarecount1 = math.random(dailyItens.minRcount, dailyItens.maxRcount)
local rarecount2 = rarecount1
repeat
rarecount2 = math.random(dailyItens.minRcount, dailyItens.maxRcount)
until(not (rarecount1 == rarecount2))if getPlayerLevel(cid) >= 100 then
count1 = math.floor(count1 * 3)
count2 = math.floor(count2 * 3)
rarecount1 = math.floor(rarecount1 * 3)
rarecount2 = math.floor(rarecount2 * 3)elseif getPlayerLevel(cid) >= 150 then
count1 = math.floor(count1 * 5)
count2 = math.floor(count2 * 5)
rarecount1 = math.floor(rarecount1 * 5)
rarecount2 = math.floor(rarecount2 * 5)elseif getPlayerLevel(cid) >= 200 then
count1 = math.floor(count1 * 😎
count2 = math.floor(count2 * 😎
rarecount1 = math.floor(rarecount1 * 😎
rarecount2 = math.floor(rarecount2 * 😎elseif getPlayerLevel(cid) >= 250 then
count1 = math.floor(count1 * 10)
count2 = math.floor(count2 * 10)
rarecount1 = math.floor(rarecount1 * 10)
rarecount2 = math.floor(rarecount2 * 10)
else
count1 = count1
count2 = count2
rarecount1 = rarecount1
rarecount2 = rarecount2
end
local day = getNumberDay().."-"..getNumberMonth().."-"..getNumberYear()
setPlayerStorageValue(cid, 251462, "|"..day.."|")
setPlayerStorageValue(cid, 251461, tostring("|"..itemq1.."|"..itemq2.."|"..count1.."|"..count2.."|"..rare1.."|"..rare2.."|"..rarecount1.."|"..rarecount2.."|"))
endTa ai meu brother
-
galera preciso do seguinte... estou fazendo uma paradinha que logo irei divulgar... estou criando um Meio de fazer a DZ da PXG de uma maneira simples....
já tenho algumas coisas mas preciso de outras pra me dar um help giga....
Preciso que ela tenha as opções de fazer sozinho, duo, trio ou quarteto....
Queria uma Action que ao ser ativada o ou os Players sejam teleportados.... porem eles tem que ter as Chaves para acessar...
Tipo eles ficam atras um do outro ou do lado dai alguem aciona e todos são puxados para a Dz...
Porem todos tem que ter as chaves para acessar...
-
Spoiler
function sendMsgCountToItens(cid) -- FUNÇÃO PARA MANDAR A MSG DE QUANTOS ITENS FALTA
local item1 = getPlayerStorageValue(cid, 251461):explode("|")
if getPlayerItemCount(cid, item1[1]) >= tonumber(item1[3]) then
valor1 = 0
else
valor1 = tonumber(item1[3]) - getPlayerItemCount(cid, item1[1])
end
if getPlayerItemCount(cid, item1[2]) >= tonumber(item1[4]) then
valor2 = 0
else
valor2 = tonumber(item1[4]) - getPlayerItemCount(cid, item1[2])
end
if getPlayerItemCount(cid, item1[5]) >= tonumber(item1[7]) then
valor3 = 0
else
valor3 = tonumber(item1[7]) - getPlayerItemCount(cid, item1[5])
end
if getPlayerItemCount(cid, item1[6]) >= tonumber(item1[8]) then
valor4 = 0
else
valor4 = tonumber(item1[8]) - getPlayerItemCount(cid, item1[6])
end
selfSay("Ainda falta você me trazer os seguintes itens ["..valor1.."] "..getItemNameById(item1[1])..", ["..valor2.."] "..getItemNameById(item1[2])..", ["..valor3.."] "..getItemNameById(item1[5])..", ["..valor4.."] "..getItemNameById(item1[6])..".", cid)
return true
endSalve galerinha beleza? Bom esse codigo faz a contagem dos itens que está na sua bag, mas ela não para após zerar ela começa a contagem negativa, (-1, -2, -3, -4, -5,...) gostaria que ela parace no 0 e não aparecesse mais e após o player entregar os itens não ter mais a contagem pois os itens continuam contando depois que o player entrega como se estivesse fazendo de novo!
VLWWW REP++
-
Salve Galerinha, seguinte preciso de um help aqui, bom essa é a Daily Itens usada no PokeMasterX, porem quero dar uma alterada, ali nos itens eu coloquei apenas os itens mais caros e os mais raros, como stones, Bone, Bone Mask, Andarilho Claw, etc...
O que eu preciso é de dividir pra um determinado nivel, tipo antes do LVL 50 o player pega Andarilho Claw, Magikarp Fins, Blue Vines, que são dos pokes lvl baixo, depois do 100, passa a ter Gyarados Tail, Magma Foot, Palm, etc.. isso é possivel?? só preciso de uma base pra ter noção do que fazer, as edicçoes eu mesmo faço depois...
VLWWW REP++ -
Cara pelo que vi ai, é um pouco complicado, mas seguinte, vai mudando os valores até chegar em um ponto que voce deseja,
você precisa mudar aqui
-------------------------------------------------
local multiplier = 1
if isCreature(cid) then
poketype1 = pokes[getCreatureName(cid)].type --alterado v2.6
poketype2 = pokes[getCreatureName(cid)].type2
end
if not poketype1 or not poketype2 then return false end --alterado v2.6if getCreatureCondition(cid, CONDITION_INVISIBLE) then
return false
endif damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then
if isInArray(effectiveness[damageCombat].super, poketype1) then
multiplier = multiplier + 0.5 ----- ESSE
end
if isInArray(effectiveness[damageCombat].super, poketype2) then
multiplier = multiplier + 0.5 ----- ESSE
end
if isInArray(effectiveness[damageCombat].weak, poketype1) then
multiplier = multiplier - 0.25 ----- ESSE
end
if isInArray(effectiveness[damageCombat].weak, poketype2) then
multiplier = multiplier - 0.25 ----- ESSE
end
if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then
if isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --alterado v2.5
multiplier = 0.5 --alterado v2.6
end
end
elseif combat == COMBAT_PHYSICALDAMAGE then
if isGhostPokemon(cid) then --alterado v2.3
if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --alterado v2.5
doSendMagicEffect(getThingPos(cid), 3)
return false
end
end
local cd = getPlayerStorageValue(attacker, conds["Miss"])
local cd2 = getPlayerStorageValue(attacker, conds["Confusion"]) --alterado v2.5
local cd3 = getPlayerStorageValue(attacker, conds["Stun"])
if cd >= 0 or cd2 >= 0 or cd3 >= 0 then
if math.random(1, 100) > 50 then --50% chance de da miss no atk fisico
doSendMagicEffect(getThingPos(cid), 211)
doSendAnimatedText(getThingPos(attacker), "MISS", 215)
return false
end
end
end
--------------------------------------------------
local valor = valueif multiplier == 1.5 and poketype2 == "no type" then ----- ESSE
multiplier = 2 ----- ESSE
elseif multiplier == 1.5 and poketype2 ~= "no type" then ----- ESSE
multiplier = 1.75 ----- ESSE
elseif multiplier == 1.25 then ----- ESSE
multiplier = 1 ----- ESSE
end--------------------------------------------------
Na minha base é completamente diferente, nela é no creaturescript
-
Qual base amigão?
-
Bom tenho uma source que quero que seja atualizada e modificada para alguns requisitos, quero aumento de limite de spr, efeito, itens, quero que seja usada com o sistema do Win (ela foi feita pra linux), e que seja compativel com meu servidor, a source é da base do DXP quero que fique compativel com o MasterX que tambem é uma base feita apartir do DXP, procuro alguem que me de o resultado final, pago até 100 se for preciso, é isso TMJ!!
-
Salve, não sei se o topico está no lugar certo mas vamos lá, alguém sabe como dar TRUNCATE no SQLiteStudio? ou algum site/app que da pra importar esse arquivo e dar truncate? o arquivo está salvo como s3db e eu gostaria de fazer uma limpa no conteúdo
-
Boom o bug é o seguinte, quando o pokemon mega evolui ele altera seus status de attack e defense, não se altera os demais nem mesmo seus tipos
Por Exemplo
Scptile = Grass
Mega Sceptile = Grass / DragonCharizard = Fire / Flying
Mega Charizard Y = Fire / Flying
Mega Charizard X = Fire / Dragon
não se muda os tipos do mega o sceptile n se torna dragão e o mega zard x tbm n, acontece com os outros tambem, que tem um segundo tipo, basicamente o que acontece é que o pokemon não tem ajuste de status e tipo
O Codigo Usado da transformação em mega
é o mesmo do DXP, esse codigo fica no "Pokemon Moves"
Spoiler
function isMega(cid)
if getPlayerStorageValue(cid, storages.isMega) ~= -1 then
return true
end
return false
endfunction doTransformMega(cid)
local name = doCorrectString(getCreatureName(cid))
local wildMult = 1.0
local megaID = ""
if isSummon(cid) then
local master = getCreatureMaster(cid)
if getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID") and getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID") ~= "" then
megaID = getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID")
end
else
megaID = getPlayerStorageValue(cid, storages.isMegaID)
end
local megaName = "Mega " .. name .. (megaID ~= "" and " " .. megaID or "")
if megasConf[megaName] then
setPlayerStorageValue(cid, storages.isMega, megaName)
doRegainSpeed(cid) --alterado!
local pos = getThingPos(cid)
pos.x = pos.x + 1
pos.y = pos.y +1
doSendMagicEffect(pos, 287)
if isSummon(cid) then
local master = getCreatureMaster(cid)
doUpdateMoves(master)
wildMult = 0.5
setPlayerStorageValue(cid, storages.isMegaID, megaID)
end
setPlayerStorageValue(cid, 1001, megasConf[megaName].offense * wildMult)
setPlayerStorageValue(cid, 1002, megasConf[megaName].defense * wildMult)
setPlayerStorageValue(cid, 1003, megasConf[megaName].agility)
setPlayerStorageValue(cid, 1005, megasConf[megaName].specialattack * wildMult)
if wildMult == 1.8 then
local life = megasConf[megaName].wildVity * math.random(4000, 4500) -- 4000, 4500
local lifeNow = getCreatureMaxHealth(cid) - getCreatureHealth(cid)
setCreatureMaxHealth(cid, life) -- perfeita formula, os pokemons "ruins" só precisam de ajustes no pokemonStatus, tabela vitality.
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddHealth(cid, -lifeNow)
end
if isInArray({"Charizard", "Blaziken", "Ampharos"}, name) then
doPantinOutfit(cid, 0, megaName)
else
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out}, -1)
checkOutfitMega(cid, megaName)
end
end
endfunction checkChenceToMega(cid)
local name, chance = doCorrectString(getCreatureName(cid)), math.random(0.1, 100.9)
local megaID = ""
if name == "Charizard" then
megaID = math.random(1, 100) < 51 and "Y" or "X"
end
local megaName = "Mega " .. name .. (megaID ~= "" and " " .. megaID or "")
if megasConf[megaName] and not isMega(cid) then
if megasConf[megaName].wildChance >= chance then
setPlayerStorageValue(cid, storages.isMegaID, megaID)
doTransformMega(cid)
end
end
endfunction getMegaID(cid)
return getPlayerStorageValue(cid, storages.isMegaID) ~= -1 and getPlayerStorageValue(cid, storages.isMegaID) or ""
endfunction checkOutfitMega(cid, megaName)
if not isCreature(cid) or not isMega(cid) then return true end
local name = doCorrectString(getCreatureName(cid))
if not megasConf[megaName] then return true end
if getCreatureOutfit(cid).lookType ~= megasConf[megaName].out then
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out}, -1)
end
addEvent(checkOutfitMega, 50, cid)
endfunction doPantinOutfit(cid, times, megaName)
if not isCreature(cid) or not isMega(cid) then return true end
if getCreatureOutfit(cid).lookType == 1875 or getCreatureOutfit(cid).lookType == 2 then return true end
local name = doCorrectString(getCreatureName(cid))
if not megasConf[megaName] then return true end
local outfitIndex = 1
if times <= 100 then
outfitIndex = 1
elseif times > 100 and times <= 200 then
outfitIndex = 2
elseif times > 200 and times <= 300 then
outfitIndex = 3
end
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out[outfitIndex]}, -1)
times = times + 50
if times > 300 then
times = 0
end
addEvent(doPantinOutfit, 50, cid, times, megaName)
endEspero que possam me ajudar, logo postarei uma base que modifiquei e balanceei com muita dedicação!
-
Galerinha seguinte....
quero colocar um limite maximo de money no Vault, tipo uns 20KK apenas seria possivel? -
Galerinha....
Seguinte quem puder dar um help...
boom tem esse codigo ai do meu catch system... tem a Storage 121212 ela da um buff no catch, gostaria que ele fosse ingetada no player por tempoexemplo o cara usa o item e a storege fica nele por um tempo e dps sai
Abaixo está a linha onde acontece esse efeito descrito!!
if getPlayerStorageValue(cid, 121212) >= 1 then catchinfo.rate = 1000 end
-
4 horas atrás, lSainty disse:
Envie o valor desse storage para o OTC através de opcodes ou através de um sendCancel caso seu servidor não possua opcodes.
Tem como ensinar passo a passo?
e sim possui Opcodes
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
ADPATANDO SYSTEMA
em Scripts
Postado
Entendi, tipo assim pelo que vi do código, ele coloca o Loot que droparia do monstro na bag principal direto no lugar de colocar no corpse, vou dar uma procurada nas infos, até por que eu coloquei esses codigos todos nos devidos lugares e não pegou