
Alberto1997
Membro
-
Registro em
Histórico de Curtidas
-
Alberto1997 recebeu reputação de Sekk em [AJUDA] Recompensas a cada 30 minutos!Não apareceu erros ao iniciar o server, mas depois apareceu isso:
Lua Script Error: [GlobalEvent Interface] data/globalevents/scripts/online.lua:onThink data/globalevents/scripts/online.lua:17: attempt to index field 'rewards' (a nil value) stack traceback: [C]: in function '__index' data/globalevents/scripts/online.lua:17: in function <data/globalevents/scripts/online.lua:9> [Error - GlobalEvents::think] Failed to execute event: OnlinePoints
Edit:
Funcionou agora, retirei o 'rewards' e coloquei 'items', agora funcionou.
OBRIGADO!!
Para quem futuramente precisar do script:
local config = { items = { {itemId = 11219, count = 1}, }, minLevel = 100 -- level minimo para receber os items } function onThink(interval) local players = Game.getPlayers() if #players == 0 then return true end for _, player in ipairs(players) do if player:getLevel() >= config.minLevel then local reward = config.items[math.random(#config.items)] local ret = player:addItemEx(Game.createItem(reward.itemId, reward.count)) if ret ~= RETURNVALUE_NOERROR then local inbox = player:getInbox() if inbox then inbox:addItemEx(rewardItem, INDEX_WHEREEVER, FLAG_NOLIMIT) end end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format('Did you recived %s. You can get more items within 30 minutes. %s', ItemType(reward.itemId):getName(), ret ~= 0 and "The reward was sent to your inbox due not enough capacity or room in your backpack." or "")) end end return true end
-
Alberto1997 deu reputação a Sekk em [AJUDA] Recompensas a cada 30 minutos!local config = { items = { {itemId = 11219, count = 1}, }, minLevel = 100 -- level minimo para receber os items } function onThink(interval) local players = Game.getPlayers() if #players == 0 then return true end for _, player in ipairs(players) do if player:getLevel() >= config.minLevel then local reward = config.rewards[math.random(#config.items)] local ret = player:addItemEx(Game.createItem(reward.itemId, reward.count)) if ret ~= RETURNVALUE_NOERROR then local inbox = player:getInbox() if inbox then inbox:addItemEx(rewardItem, INDEX_WHEREEVER, FLAG_NOLIMIT) end end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format('Did you recived %s. You can get more items within 30 minutes. %s', ItemType(reward.itemId):getName(), ret ~= 0 and "The reward was sent to your inbox due not enough capacity or room in your backpack." or "")) end end return true end
-
Alberto1997 deu reputação a Antipush em [AJUDA] Recompensas a cada 30 minutos!tenta ai
-
Alberto1997 deu reputação a Albeck em [AJUDA] PREMIUM POINTS COIN@Alberto1997
local points = 10 function onUse(player, item, fromPosition, itemEx, toPosition) db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." WHERE id=" ..player:getAccountId()) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Você recebeu '..points..' premium points!') player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) Item(item.uid):remove(1) return true end
-
Alberto1997 deu reputação a runeraserver em Custom Cliente - Todas as versões - Qualquer IPFala galera,
Vejo muita gente com dúvida de como fazer custom clients. Neste tutorial vou ensinar para vocês criar custom clients de todas as versões e com qualquer ip.
1º Passo:
• Baixe o programa NotePad http://notepad-plus-plus.org/repository/6.x/6.7.5/npp.6.7.5.Installer.exe
2º Passo:
• Vá no diretório onde está instalado o client que deseja editar, clique com o direito em Tibia.exe e selecione "Edit with Notepad++"
3º Passo:
• Pressione ctrl + f e busque por login01.tibia.com e substitua pelo seu ip, (exemplo.com.br).
Perceba que login01.tibia.com + os 3 NUL que aparecem, somam 20 caracteres (NUL conta como 1).
O seu IP deverá conter 20 caracteres ou menos.
Exemplo:
exemplo.com.br possui 14 caracteres
Como o meu exemplo possui 14 caracteres e login01.tibia.comNULNULNUL possui 20, vou ter que preencher esses 6 caracteres que faltam com 6 NUL.
Para isso, você deverá deixar o cursos de texto na frente do seu ip (exemplo.com.br"AQUI") e ir para Plugins>Converter>Conversion.
Digite 0 em decimal e clique em (ASCII: Insert) 6 vezes, devendo ficar assim: exemplo.com.brNULNULNULNULNULNUL (Lembrando que acrescenta 6 NUL no caso do exemplo, o seu IP deverá completar os 20 caracteres podendo haver mais ou menos NULs).
Procure por esses ips e faça os passos acima em todos:
login01.tibia.com login02.tibia.com login03.tibia.com login04.tibia.com login05.tibia.com tibia01.cipsoft.com tibia02.cipsoft.com tibia03.cipsoft.com tibia04.cipsoft.com tibia05.cipsoft.com Feito isso, procure por:
132127743205872284062295099082293384952776326496165507967876361843343953435544496682053323833394351797728954155097012103928360786959821132214473291575712138800495033169914814069637740318278150290733684032524174782740134357629699062987023311132821016569775488792221429527047321331896351555606801473202394175817 Substitue por:
109120132967399429278860960508995541528237502902798129123468757937266291492576446330739696001110603907230888610072655818825358503429057592827629436413108566029093628212635953836686562675849720620786279431090218017681061521755056710823876476444260558147179707119674283982419152118103759076030616683978566631413 Créditos: Gesior
-
Alberto1997 deu reputação a Skydangerous em [CreatureEvent] Level up = Ful Mana e Full HealthScript: Level up = Ful Mana e Full Health
Função: Ao evoluir sua vida e mana regenera no máximo
Testado: Versão 8.6
INSTALANDO
vá na pasta creaturescript/scripts e cria um arquivo no formato .lua com o nome de fullmh
e cole isto:
function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL then doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) end return TRUE end em seguida, em login.lua adicione o evento registerCreatureEvent(cid, "fullmh") depois em creaturescript.xml adicione a tag: <event type="advance" name="fullmh" event="script" value="fullmh.lua"/>
Script Exclusivo Tibia King