Ir para conteúdo

Absolute

Héroi
  • Registro em

  • Última visita

Tudo que Absolute postou

  1. Fala galera do TIBIAKING! Trago hoje um sistema fácil de adaptação, ou seja apenas um arquivo MOD! Sem mimimi vamos ao que interessa: Crie um arquivo com o nome de Loterry.xml na pasta data/mods do seu servidor e dentro do arquivo adicione: <mod name="Lottery System" version="1.5" author="Absolute" contact="[email protected]" enabled="yes"> <config name="lottery_config"><![CDATA[ config = { lottery_hour = "2 hour", -- Time to next lottery (only for broadcast message, real time you can set on globalevents.xml) rewards_id = {2160}, -- Rewards ID crystal_counts = 10, -- Used only if on rewards_id is crystal coin (ID: 2160). website = "no" -- Only if you have php scripts and table `lottery` in your database! } ]]></config> <globalevent name="lottery" interval="3600000" event="script"><![CDATA[ domodlib('lottery_config') function onThink(interval, lastExecution) if(getWorldCreatures(0) == 0)then return true end local list = {} for i, tid in ipairs(getPlayersOnline()) do list[i] = tid end local winner = list[math.random(1, #list)] local random_item = config.rewards_id[math.random(1, #config.rewards_id)] if(random_item == 2160) then doPlayerAddItem(winner, random_item, config.crystal_counts) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. config.crystal_counts .. " " .. getItemNameById(random_item) .. "s! Congratulations! (Next Lottery in " .. config.lottery_hour .. ")") else doBroadcastMessage("[Loteria Automatica] Ganhador: " .. getCreatureName(winner) .. ", Reward: " .. getItemNameById(random_item) .. "! Parabens (Next Lottery in " .. config.lottery_hour .. ")") doPlayerAddItem(winner, random_item, 1) end if(config.website == "yes") then db.executeQuery("INSERT INTO `lottery` (`name`, `item`) VALUES ('".. getCreatureName(winner) .."', '".. getItemNameById(random_item) .."');") end return true end ]]></globalevent> </mod> No seu PHPMYADMIN, execute a seguinte query: CREATE TABLE `lottery` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `item` varchar(255) NOT NULL, `world_id` tinyint(2) unsigned NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; Depois: INSERT INTO `lottery` (`id`, `name`, `item`, `world_id`) VALUES (NULL, 'Nobody', 'nothing', 0); Agora na pasta do seu site, htdocs ou www crie um arquivo com o nome de loteria.php e dentro adicione: <?PHP $main_content .= '<center><h1>Lottery</h1><h3>As loterias acontecem todo dia no servidor.</h3></center><br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><tr BGCOLOR="'.$config['site']['vdarkborder'].'"><td CLASS=white><center><b>Nome do ganhador</b></center></td><td CLASS=white width=184 colspan=2><center><b>Recompensa</b></center></td><td width=100 CLASS=white><center><b>World</b></center></td></tr>'; $lottery = $SQL->query('SELECT id, name, item, world_id FROM lottery WHERE world_id = 0 ORDER BY id DESC;'); foreach($lottery as $result) { $players++; if(is_int($players / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=35%><center><a href="?subtopic=characters&name='.urlencode($result['name']).'">'.$result['name'].'</a></center></td><TD WIDTH=5%><img src=\'/images/'.urlencode($result['item']).'.gif\'></td><TD WIDTH=30%><b>'.$result['item'].'</b></td><TD WIDTH=30%><center>Norah World</center></td></tr> <center><a href="http://www.tibiaking.com/forum/user/116608-absolute/">Absolute</a> on tibiaking - Todos os direitos reservados</center> '; } $main_content .= '</table>'; ?> Em seu index.php adicione: case "lottery"; $topic = "Lottery System"; $subtopic = "lottery"; include("lottery.php"); break; Adicione onde preferir no menu do seu Gesior no layout.php Modelo base: Créditos: Absolute vdK KleKSu Caso haja dúvidas não deixe de perguntar Até o próximo. Absolute.
  2. Absolute postou uma resposta no tópico em Suporte Tibia OTServer
    Brother, busque aqui: http://www.tibiaking.com/forum/forum/115-otservs-86x/
  3. Meu Deus. Ele pediu só o script não tutorial de instalação. Porém se quer usar e solicita o resto: <action actionid="45901" event="script" value="pedidotk.lua"/> Na alavanca coloca 45901 e no arquivo pedidotk.lua ...
  4. Aqui brother: -- Start Config -- local topos = {x=170, y=61, z=7} -- End Config -- function onUse(cid) if doTeleportThing(cid, topos) then doPlayerSendTextMessage(cid,20,"Voce foi teleportado para.") end end
  5. O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → Geral" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
  6. Absolute postou uma resposta no tópico em Playground (Off-topic)
    Bom, vi agora e trago minha opinião. A tempos que vejo o tal membro Sr Samuel postando coisas inúteis, tanto no playground quanto nas outras seções. Eu acho que brincadeiras tem limite dentro de um fórum que busca o conhecimento do open tibia e tem suas seções de idéias espontâneas como o playground. Já você caro Markin, procure evitar esses posts inúteis de má fé (digo dos outros) e traga novos sistemas, scripting como já trouxe ao fórum, eu creio que seu nome será mais visível pela comunidade do tk e o membros ficarão contentes com sua mudança. Caso contrário para brother, para com isso, tu deve ser maior de idade já! (ou não). Quanto ao banimento estou de acordo, como já disse o Luan, AQUI NÃO É CIRCO!
  7. Tente: function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") end return true end
  8. Exato, assim está certo: dailyFragsToRedSkull = 20 weeklyFragsToRedSkull = 30 e redSkullLength = 24 * 60 * 60 blackSkullLength = 24 * 60 * 60 24h de duração, não há erros, teste.
  9. Amigo isso é flood 2.4 - Mensagens inúteis: Não poste mensagens sem conteúdo, que não contribuem em nada ou que não estejam relacionadas ao assunto do tópico. Mensagens assim são chamadas de Floods. Postar coisas como "haha", "lol", "me add no msn aí", entre outras, é o que considera-se completamente inútil. Postar várias mensagens iguais, mesmo que em tópicos diferentes, também pode ser considerado Flood. Leia as Regras. Espero não ver mais isso de sua parte, caso contrário será alertado. @TOPIC: Amigo isso é nas sources, aconselho tentar adaptar outra.
  10. Absolute postou uma resposta no tópico em Suporte Tibia OTServer
    O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Suporte OTServ → Suporte de Scripts" Para: "OTServ → Suporte OTServ → Suporte de OTServ Geral"
  11. Caso queira em MODS apenas: <?xml version="1.0" encoding="UTF-8"?> <mod name="First Items" enabled="yes"> <config name="firstitems_config"><![CDATA[ STORAGE = 30001 commonItems = { {itemid=2152, count=25, inContainer = true}, -- 25 platinum coins {itemid=2643}, -- leather boots {itemid=2173} -- aol } firstItems = { { -- Sorcerer {itemid=15645}, -- backpack {itemid=2175}, -- spellbook {itemid=2190}, -- wand of vortex {itemid=8819}, -- magician's robe {itemid=8820}, -- mage hat {itemid=2648} -- chain legs }, { -- Druid {itemid=15645}, -- backpack {itemid=2175}, -- spellbook {itemid=2182}, -- snakebite rod {itemid=8819}, -- magician's robe {itemid=8820}, -- mage hat {itemid=2648} -- chain legs }, { -- Paladin {itemid=15645}, -- backpack {itemid=2525}, -- dwarven shield {itemid=2389, count=3}, -- 3 spears {itemid=2463}, -- plate armor {itemid=2457}, -- steel helmet {itemid=2647} -- plate legs }, { -- Knight {itemid=15645}, -- backpack {itemid=2525}, -- dwarven shield {itemid=2383}, -- spike sword {itemid=2463}, -- plate armor {itemid=2457}, -- steel helmet {itemid=2647}, -- plate legs {itemid=2428} -- axe } } ]]></config> <event type="login" name="FirstItems" event="script"><![CDATA[ domodlib('firstitems_config') for _, items in ipairs(firstItems) do for _, item in ipairs(commonItems) do table.insert(items, item) end end function onLogin(cid) if getPlayerGroupId(cid) < 4 and getPlayerStorageValue(cid, STORAGE) < 1 and firstItems[getPlayerVocation(cid)] then for _, v in ipairs(firstItems[getPlayerVocation(cid)]) do if isItemContainer(v.itemid) then backpack = doPlayerAddItem(cid, v.itemid, 1) elseif v.inContainer then doAddContainerItem(backpack, v.itemid, v.count or 1) else doPlayerAddItem(cid, v.itemid, v.count or 1) end end setPlayerStorageValue(cid, STORAGE, 1) end return true end ]]></event> </mod>
  12. Impossível o items.otb que tem no items do ot é o que tem que ir no remeres, ele vai corresponder por esses (igual fica online e o tfs verifica) Faça novamente e reabra o remeres.
  13. Va até a pasta do remeres/data/SELECIONA A PASTA DA VERSÃO QUE VOCÊ TA EDITANDO E lá vai ter items.xml items.otb tal, exclui o items.otb e coloca no lugar o items.otb do seu servidor da pasta items do ot
  14. Não tem cara, 15 dias é praticamente de graça. Quem trabalha de graça é relógio.
  15. Ninguém está reclamando, apenas sugeri que o membro retirasse os bugs propositais conforme as regras. Servidor pode ser bom, porém está com esses bugs que o próprio criador do tópico reconheceu, leia bem antes de citar.
  16. Absolute postou uma resposta no tópico em Suporte Tibia OTServer
    function onSay(cid, words, param, channel) local strings, i, position, added, showGamemasters = {""}, 1, 1, false, getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) for _, pid in ipairs(getPlayersOnline()) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end added = false if((showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, [PokeLute] (i - 1) .. " player" .. (i > 1 and "s" or "") .. " online.") return true end
  17. Absolute postou uma resposta no tópico em Suporte Tibia OTServer
    Isso no caso? local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local i, position = 1, 1 local added = false for _, pid in ipairs(players) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. "" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, [PokeLute] (i - 1) .. " player(s) online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end
  18. Nada, fique tranquilo.
  19. Troque PVP por Open
  20. No seu config.lua procure por Baiak Yurots e mude para Baiak Yurots.otbm
  21. Veja no seu phpmyadmin na tabela players estão lá eles, basta alterar a posição deles e criar novo char pra testar.
  22. Você alterou a posição dos chares: rook sample, druid sample, knight sample, paladin sample, sorcerer sample ????
  23. Na verdade você consegue, porém não é so no config.php tem que alterar na página de create character etc.

Informação Importante

Confirmação de Termo