-
Total de itens
2221 -
Registro em
-
Última visita
-
Dias Ganhos
60
Tudo que Yan Oliveira postou
-
Sim, isso ai é o de menos de não dar catch durante o evento, mas o que eu falei seria no final, na parte de dar catch. Porque o algoritmo da pxg te da possibilidade de jogar ball no pokémon que você mais matou, porém se dois ou mais players matarem a mesma quantidade de um mesmo pokémon, não da para saber se aparece esse pokémon para todos no final, se é random. Mas é como você disse, é só usar a criatividade que da para criar um sistema de zone legal.
-
Esse é um sistema um pouco complexo, porque teria que mexer em sources, inclusive na do client. Mas da para fazer um sistema mais simples parecido, na qual pega uma quantidade de players em determinados pisos, e se alguém clicassem em alguma alavanca ou algum item, teleportaria os players para uma arena. O problema mesmo seria gerar os pokémons no final para dar catch.
-
Magina, eu imaginei que está aprendendo mesmo ?, no caso eu não tive ajuda para aprender, aprendi sozinho. Então procura sempre ajuda quando posso.
-
Que bom que conseguiu resolver seu problema ?.
-
O seu é para funcionar também, está parecido com o do colega acima, mas o seu tem a verificação caso o player não tenha valor para storage acima de 0. Porém vou te dar um conselho, no seu caso, não precisava ter feito aquele elseif, pois se o valor da storage não for 1 ou maior que 1 já vai executar o else, então seria bem melhor só colocar else. E também é mais fácil e legível criar uma variável para a storage, pois fica mais fácil de mexer no código e também a chance de errar o valor na verificação é menor. Enfim, se nenhum dos dois códigos dos colegas acima não funcionar, tente este, é para funcionar: local stor, limit = 7575, 30 --storage, limit to add. local allow_container = false --empty! not looted with items, atleast for now. local storage_quest = 25425 -- ID DA STORAGE DA QUEST PARA USAR O TALKACTION local texto = "Você precisa completar uma quest para usar este comando." function onSay(cid, words, param) local expl = param:explode(':') local action, rst = expl[1], expl[2] if getPlayerStorageValue(cid, storage) < 1 then doPlayerSendTextMessage(cid, 27, texto) doPlayerSendCancel(cid, texto) return true end if (action:lower() == 'check') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):explode(',') end local txt = 'Autoloot List:\n' if (#list > 0) then for k, id in ipairs(list) do id = id:gsub('_', '') if tonumber(id) then txt = txt .. getItemNameById(tonumber(id)) .. ((k < #list) and '\n' or '') end end else txt = 'Empty' end doPlayerPopupFYI(cid, txt) elseif (action:lower() == 'add') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):gsub('_', ''):explode(',') end if (#list >= limit) then return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.') end local item = tonumber(rst) if not item then item = getItemIdByName(rst, false) if not item then return doPlayerSendCancel(cid, 'not valid item.') end end if not allow_container and isItemContainer(item) then return doPlayerSendCancel(cid, 'this item can not be autolooted.') end local attrs = getItemInfo(item) if not attrs then return doPlayerSendCancel(cid, 'not valid item.') elseif not attrs.movable or not attrs.pickupable then return doPlayerSendCancel(cid, 'this item can not be autolooted.') end if isInArray(list, item) then return doPlayerSendCancel(cid, 'already added.') end table.insert(list, tostring(item)) local new = '' for v, id in ipairs(list) do new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '') end doPlayerSetStorageValue(cid, stor, tostring(new)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< has been added to the autoloot list.') elseif (action:lower() == 'remove') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):gsub('_', ''):explode(',') end if (#list == 0) then return doPlayerSendCancel(cid, 'You dont have any item added.') end if (#list >= limit) then return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.') end local item = tonumber(rst) if not item then item = getItemIdByName(rst, false) if not item then return doPlayerSendCancel(cid, 'not valid item.') end end if not isInArray(list, item) then return doPlayerSendCancel(cid, 'This item is not in the list.') end local new = '' for v, id in ipairs(list) do if (tonumber(id) ~= item) then new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '') end end doPlayerSetStorageValue(cid, stor, tostring(new)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< removed from the autoloot list.') end return true end Lembrando que irá precisar colocar a storage que está usando na quest na variável storage_quest.
-
[PEDIDO] Player so poder usar outfit da propria vocacao + citizen...
pergunta respondeu ao luancmunhoz de Yan Oliveira em Scripts
O que seria rook e quando ele chega em main? Qual é o id da vocation? E o outfit citizen + outfit da vocação seria junção para virar uma outfit só? -
Você precisa descrever como é o funcionamento desse sistema para que consigam te ajudar.
-
Olá amigo, desculpe a demora, o fórum não notificou que você respondeu, só está notificando quando cita o post. Vamos lá, realmente foi erro meu no código, pois eu usei o for errado, substitua o código por este: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end -- VARIÁVEIS -- local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid msg = string.lower(msg) local level = 100 local storages = {9361, 9363, 9366, 9364, 9365, 9367, 9368, 9369, 9370, 9371, 9372, 9373, 9374, 9375, 9376, 9377, 9378, 9379, 9380, 9381, 9382, 9383, 9384, 9385, 9386, 9387, 9388, 9389, 9390, 9391, 9392, 9393, 9394, 9395, 9396, 9397, 9398, 9399, 9400} ----------------------------------- [ DIALOGO COM NPC] --------------------------------- if msgcontains(msg, 'help') or msgcontains(msg, 'ajuda') then selfSay("Se você for nível "..level.. " ou mais eu posso resetar todas as quests que você já fez. Gostaria de reseta-lás?", cid) talkState[talkUser] = 1 elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) and talkState[talkUser] == 1 then if getPlayerLevel(cid) >= level then for _, i in pairs(storages) do if getPlayerStorageValue(cid, storages[i]) >= 0 then setPlayerStorageValue(cid, storages[i], -1) end end doSendMagicEffect(getPlayerPosition(cid), 28) selfSay("Todas as quests que você já fez foram resetadas com sucesso! Agora você pode fazê-las novamente.", cid) talkState[talkUser] = 0 return true else selfSay("Você não tem level suficiente para resetar as quests. É necessário ter " ..level " ou mais para resetar as quests.", cid) talkState[talkUser] = 0 return true end elseif (msgcontains(msg, 'no') or msgcontains(msg, 'não')) and talkState[talkUser] == 1 then selfSay("Ok então.", cid) talkState[talkUser] = 0 return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Teste e me fale se deu algum problema, mas é para funcionar assim.
-
Substitui o código por esse e testa: local items = { -- you need to set up all items here where : [2466] = {cost = 100}, [2446] = {cost = 3000}, [2470] = {cost = 4000}, } local basin = {x=999, y=1001, z=7, stackpos = 1} -- basin pos -- // SCRIPT START \\ -- function getContentDescription(uid, li) -- credits to Cyko for main form of this function local ret, i, containers,removes, left = {}, 0, {}, {}, {} while i <= getContainerSize(uid) do local v = getContainerItem(uid, i) local k = v.uid local k2 = v.itemid local check = items[k2] if check then table.insert(ret, k2) table.insert(removes,k) end if isContainer(k) then table.insert(containers, k) end i = i + 1 end for i = 1, #containers do local bah = getContentDescription(containers[i], li) for i = 1,#bah do if li == 1 then table.insert(removes,bah[i]) elseif li == 2 then table.insert(ret,bah[i]) end end end return li== 1 and removes or ret end function getKey(t) local s = {} for k,v in pairs(t) do table.insert(s,k) end return s end function onUse(cid, item, fromPosition, itemEx, toPosition) local exist = getThingPos(basin) local itm = getThingFromPos(basin).itemid if isContainer(exist) then local t = getContentDescription(exist,2) local t2 = getContentDescription(exist,1) if #t > 0 then local f = {} for i = 1,#t do if not isInArray(getKey(f),t[i]) then f[t[i]] = 1 else f[t[i]] = f[t[i]] + 1 end end local str = "Sold items : " local money = 0 for k,v in pairs(f) do str = str.."\n".."•••• "..v.."x "..getItemNameById(k).." : ".. ( tonumber(items[k].cost) * tonumber(v) ) .. " gold coins." money = money + tonumber(items[k].cost) * tonumber(v) end for i = 1,#t2 do doRemoveItem(t2[i]) end doPlayerSendTextMessage(cid,27,str) doPlayerAddMoney(cid,money) if #t > 1 then doPlayerSendTextMessage(cid,19," Total money : ".. money.." gold coins.") end else doPlayerSendTextMessage(cid,18,"Warning : Sold nothing --> either bag is empty or items included arn't sellable here.") doSendMagicEffect(fromPosition,2) end else local merge = items[itm] if not merge then doPlayerSendTextMessage(cid,18,"Warning : This item isn't sellable here.") doSendMagicEffect(fromPosition,2) else doRemoveItem(exist) doPlayerSendTextMessage(cid,27,"Sold item : \n •••• 1x "..getItemNameById(itm).." : "..merge.cost.."." ) doPlayerAddMoney(cid,merge.cost) end end return doTransformItem(item.uid,item.uid == 1945 and 1946 or 1945) end Veja se ainda continua dando erro.
-
Substitua o código por este: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end -- VARIÁVEIS -- local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid msg = string.lower(msg) local id_coin = 2152 -- ID DO GOLD COIN local quantidade_coin_ice_island = 40 -- QUANTIDADE COINS QUE PRECISA PARA VIAJAR PARA ICE ISLAND local quantidade_coin_fuchsia = 40 -- QUANTIDADE COINS QUE PRECISA PARA VIAJAR PARA FUCHSIA local quantidade_coin_azalea = 200 -- QUANTIDADE COINS QUE PRECISA PARA VIAJAR PARA AZALEA local level = 30 --LEVEL MÍNIMO PARA VIAJAR local position_ice_island = {x= 2449, y= 2305, z= 6} -- POSIÇÃO DE ONDE O PLAYER IRÁ AO SER TELEPORTADO EM ICE ISLAND local position_fuchsia = {x= 1044, y= 1396, z= 6} -- POSIÇÃO DE ONDE O PLAYER IRÁ AO SER TELEPORTADO EM FUCHSIA local position_azalea = {x= 1132, y= 2748, z= 6} -- POSIÇÃO DE ONDE O PLAYER IRÁ AO SER TELEPORTADO EM AZALEA ----------------------------------- [ DIALOGO COM NPC] --------------------------------- if msgcontains(msg, 'help') or msgcontains(msg, 'travel') or msgcontains(msg, 'viagem') then selfSay("I can take you to {Ice Island} for "..quantidade_coin_ice_island.. " coins, to {Fuchsia} for " ..quantidade_coin_fuchsia.. " coins or to {Azalea} for " ..quantidade_coin_azalea.. " coins. Say the name of place that you want to travel.", cid) talkState[talkUser] = 1 --- AZALEA --- elseif msgcontains(msg, 'Azalea')) and talkState[talkUser] == 1 then if isPremium(cid) then if getPlayerLevel(cid) >= level then if getPlayerItemCount(cid, id_coin) >= quantidade_coin_azalea then doPlayerRemoveItem(cid, id_coin, quantidade_coin_azalea) selfSay("Good Luck!", cid) doTeleportThing(cid, position_azalea) talkState[talkUser] = 0 return true else selfSay("You don't have " ..quantidade_coin_azalea.. " gold coins.", cid) talkState[talkUser] = 0 return true end else selfSay("You need to be at least level" ..level.. " or more to travel.", cid) talkState[talkUser] = 0 return true end else selfSay("You need to be premium account to travel to {Azalea}.", cid) talkState[talkUser] = 0 return true end --- ICE ISLAND --- elseif msgcontains(msg, 'Ice Island') and talkState[talkUser] == 1 then if getPlayerLevel(cid) >= level then if getPlayerItemCount(cid, id_coin) >= quantidade_coin_ice_island then doPlayerRemoveItem(cid, id_coin, quantidade_coin_ice_island) selfSay("Good luck!", cid) doTeleportThing(cid, position_ice_island) talkState[talkUser] = 0 return true else selfSay("You don't have " ..quantidade_coin_ice_island.. " gold coins.", cid) talkState[talkUser] = 0 return true end else selfSay("You need to be at least level" ..level.. " or more to travel.", cid) talkState[talkUser] = 0 return true end --- FUCHSIA --- elseif msgcontains(msg, 'Fuchsia') and talkState[talkUser] == 1 then if getPlayerLevel(cid) >= level then if getPlayerItemCount(cid, id_coin) >= quantidade_coin_fuchsia then doPlayerRemoveItem(cid, id_coin, quantidade_coin_fuchsia) selfSay("Good luck!", cid) doTeleportThing(cid, position_fuchsia) talkState[talkUser] = 0 return true else selfSay("You don't have " ..quantidade_coin_fuchsia.. " gold coins.", cid) talkState[talkUser] = 0 return true end else selfSay("You need to be at least level" ..level.. " or more to travel.", cid) talkState[talkUser] = 0 return true end elseif (msgcontains(msg, "Ice Island") ~= "Ice Island" or msgcontains(msg, "Fuchsia") ~= "Fuchsia" or msgcontains(msg, "Azalea") ~= "Azalea") and talkState[talkUser] == 1 then selfSay("I don't know this place.", cid) return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Eu ajustei o script, então agora o player precisa falar o nome do lugar que quer ir. Como você não colocou a quantidade coins para dois lugares, eu deixei 40 e o lugar para vip 200. Mas isso você pode mudar. Só tem acesso vip Azalea assim como pediu. Teste e me fale se deu certo.
-
Não é no XML que configura o scipt dele, mas sim no arquivo.lua.
-
Fala como ela funciona que posso tentar criar para você.
-
Transformar Tibia coin em Coin no store in-game
pergunta respondeu ao Shuriel de Yan Oliveira em Scripts
Como assim? Você diz quando juntar 100 coin transformar (empilhar) em um outro item? -
suporte scripts [BUG] Pokemon selvagens não atacam o player!
pergunta respondeu ao boxxer321 de Yan Oliveira em Scripts
Qual é a sua base? -
OTC - hotkeys (ctrl + arrows/UP/RIGHT/LEFT/DOWN)
pergunta respondeu ao pesiarzyk de Yan Oliveira em Scripts
I did and worked here. Post the script of file hotkeys_manager.lua. -
VIP Acaba mas players continuam acessando area
pergunta respondeu ao Mattchopz de Yan Oliveira em Scripts
Você seguiu todos os passos certinhos na instalação desse sistema? Pois vi aqui que ele é bem chatinho e fácil de dar problema, e várias pessoas que usam TFS 0.4 deram problema, que no caso pelo que vi no tópico é a mesma versão do seu. -
VIP Acaba mas players continuam acessando area
pergunta respondeu ao Mattchopz de Yan Oliveira em Scripts
Acontece o erro sempre que usa o comando normal ou quando usa o comando sob alguma condição específica? -
VIP Acaba mas players continuam acessando area
pergunta respondeu ao Mattchopz de Yan Oliveira em Scripts
Sim, posta o script addvip.lua -
OTC - hotkeys (ctrl + arrows/UP/RIGHT/LEFT/DOWN)
pergunta respondeu ao pesiarzyk de Yan Oliveira em Scripts
To solve that problem you need to go to the directory of the client Client/modules/game_hotkeys and open the file hotkeys_manager, after you need to search that table defaultComboKeysTable = { [1] = {key = 'F1', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m1'}, [2] = {key = 'F2', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m2'}, [3] = {key = 'F3', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m3'}, [4] = {key = 'F4', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m4'}, [5] = {key = 'F5', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m5'}, [6] = {key = 'F6', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m6'}, [7] = {key = 'F7', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m7'}, [8] = {key = 'F8', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m8'}, [9] = {key = 'F9', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m9'}, [10] = {key = 'F10', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m10'}, [11] = {key = 'F11', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m11'}, [12] = {key = 'F12', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s m12'}, --[13] = {key = 'Ctrl+Up', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s t1'}, --[14] = {key = 'Ctrl+Right', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s t2'}, --[15] = {key = 'Ctrl+Down', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s t3'}, --[16] = {key = 'Ctrl+Left', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s t4'}, [16] = {key = 'PageUp', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s h1'}, [17] = {key = 'PageDown', autoSend = true, itemId = nil, subType = nil, useType = nil, value = '#s h2'}, [18] = {key = 'MouseMiddle', autoSend = false, itemId = 3453, subType = nil, useType = 3, value = nil}, } and comment that lines have ctrl+ arrows. I have already comment in the exemple above, if you want to put that table in your file, or you can comment and change the next indices to follow. -
VIP Acaba mas players continuam acessando area
pergunta respondeu ao Mattchopz de Yan Oliveira em Scripts
Substitui todo código do epicvip.lua por este: local config = { msgDenied = "Olá "..getCreatureName(cid)..". Você não é vip donate adquira agora mesmo em nósso site: realbaiak.online", msgWelcome = "Seja Bem Vindo a Área donate "..getCreatureName(cid)..".", } function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if not isPremium(cid) then doTeleportThing(cid, fromPosition) doPlayerPopupFYI(cid, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_POFF) return true else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, config.msgWelcome) return true end end Teste e veja se ainda da para os players que não são vip passarem. -
Como assim "sim"? Kkk
-
Tem que saber as coordenadas e criar as condições de acordo com o lugar que quer ir. Me fala a posição de cada lugar e o nome (palavra-chave) que o player precisa dizer para ir para tal lugar, igual ali Ice Island que eu faço para você.
-
O sistema do ícone system geralmente fica na pasta Data/Lib/IconSys.lua (na base do PokeRoxy fica lá), e o script pega a ball na bag e transforma no id com ícone. Só que tem base que só transforma a ball em ícone quando coloca a ball no slot de soltar o pokémon e tem base que pega da bag. Mas pelo que vi, nessa base pega do slot.
-
VIP Acaba mas players continuam acessando area
pergunta respondeu ao Mattchopz de Yan Oliveira em Scripts
Sobre ter acesso a área é na pasta movements e não em creaturescripts, e ele estar conseguindo acessar a área mesmo sem vip pode ser alguma storage, mas pelo que falou do valor do vip_time, como fica maior que 0, pode ser isso que está permitindo. Precisa postar todos os scripts relacionado a esse sistema para analisar direitinho o que pode ser o problema. -
De nada, que isso. Haha, podemos ver sobre isso. Sobre o npc, estou trabalhando nele.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.