Ir para conteúdo

Pedro.

Membro
  • Registro em

  • Última visita

Tudo que Pedro. postou

  1. ALTER TABLE `players` ADD `frags` INT NOT NULL DEFAULT '0'
  2. e ta dando o mesmo erro? vai em players lá, depois estrutura e vê se o resets ta lá, "resets"
  3. ta faltando uma tabela resets, adiciona lá no phpmyadmin. ALTER TABLE `players` ADD `resets` INT( 11 ) NOT NULL DEFAULT '0';
  4. vamo lá. npc.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Guard" script="guard.lua" walkinterval="0" floorchange="0"> <health now="100" max="100" /> <look type="139" head="20" body="39" legs="45" feet="7" addons="0" /> </npc> guard.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end local config = { attackRadius = {x = 7, y = 5, targetDistance = 2, walkDistance = 7}, attackPK = {value = true, skulls = {SKULL_WHITE, SKULL_RED}}, attackMonster = {value = true, ignore = {"Rat", "Cave Rat"}, ignoreSummon = true}, damageValue = {min = 10, max = 20} } -- Do not touch local targetId = 0 local masterPosition function Creature.isAttackable(self) if not self:isNpc() then if self:isPlayer() and not self:getGroup():getAccess() then if config.attackPK.value and isInArray(config.attackPK.skulls, self:getSkull()) then return true end end if self:isMonster() and config.attackMonster.value then local master = self:getMaster() if (config.attackMonster.ignoreSummon and master and not master:isPlayer()) or not isInArray(config.attackMonster.ignore, self:getName()) then return true end end end return false end function Npc.searchTarget(self) local attackRadius = config.attackRadius for _, spectator in ipairs(Game.getSpectators(self:getPosition(), false, false, attackRadius.x, attackRadius.x, attackRadius.y, attackRadius.y)) do if spectator:isAttackable() then targetId = spectator:getId() end end end function onThink() local npc = Npc() local target = Creature(targetId) -- If we have not a target, then we shall search for one if not target then npc:searchTarget() return end -- Let's get target offset position local npcPosition = npc:getPosition() local targetPosition = target:getPosition() local offsetX = npcPosition.x - targetPosition.x local offsetY = npcPosition.y - targetPosition.y -- Target is out of reach, search for new one local radius = config.attackRadius if math.abs(offsetX) > radius.x or math.abs(offsetY) > radius.y then npc:searchTarget() return end -- Back to spawn position if npcPosition:getDistance(masterPosition) >= radius.walkDistance then npcPosition:sendMagicEffect(CONST_ME_TELEPORT) npc:teleportTo(masterPosition) return end -- If target is found local npcId = npc:getId() doTargetCombatHealth(npcId, targetId, COMBAT_FIREDAMAGE, -config.damageValue.min, -config.damageValue.max, CONST_ME_HITBYFIRE) npcPosition:sendDistanceEffect(targetPosition, CONST_ANI_FIRE) doNpcSetCreatureFocus(targetId) -- Follow Target local distance = radius.targetDistance local path = npc:getPathTo(targetPosition, 0, distance, true, true) if path and npcPosition:getDistance(targetPosition) > distance then doMoveCreature(npcId, path[1]) end npcHandler:onThink() end function onCreatureAppear(self) if self == Npc() and not masterPosition then masterPosition = self:getPosition() end npcHandler:onCreatureAppear(self) end
  5. O titulo já diz tudo né? basicamente você adiciona funções a sua equipe. pra instalar, você precisa adicionar uma nova tabela na sua database. ALTER TABLE `players` ADD `function` VARCHAR(100) NOT NULL DEFAULT ''; Segue o código em php. <?php if(!defined('INITIALIZED')) exit; $list = $SQL->query('SELECT ' . $SQL->fieldName('name') . ', ' . $SQL->fieldName('id') . ', ' . $SQL->fieldName('group_id') . ', ' . $SQL->fieldName('function') . ' FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' IN (' . implode(',', $config['site']['groups_support']) . ') ORDER BY ' . $SQL->fieldName('group_id') . ' DESC'); $main_content .= '<div class="TableContainer"> <div class="CaptionContainer"> <div class="CaptionInnerContainer"> <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span> <div class="Text">Contact Information</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> </div> </div><table class="Table4" cellpadding="0" cellspacing="0"> <tbody><tr> <td> <div class="InnerTableContainer"> <table style="width:100%;"> <tbody><tr> <td> <div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);"> <div class="TableContentContainer"> <table border="1" cellpadding="4" cellspacing="1" class="TableContent" width="100%" style="border:1px solid #faf0d7;"> <tbody> <tr><td bgcolor="#D4C0A1"><table border="0" cellpadding="8"> <tbody> <tr><td>Support Email:</td><td><a>[email protected]</a></td></tr> </tbody></table></td></tr> </tbody></table> </div> </div> <div class="TableShadowContainer"> <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div> </div> </div> </td> </tr> </tbody></table> </div> </td></tr></tbody></table> </div><br><div class="TableContainer"> <div class="CaptionContainer"> <div class="CaptionInnerContainer"> <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span> <div class="Text">Disclaimer</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> </div> </div><table class="Table4" cellpadding="0" cellspacing="0"> <tbody><tr> <td> <div class="InnerTableContainer"> <table style="width:100%;"> <tbody><tr> <td> <div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);"> <div class="TableContentContainer"> <table border="1" cellpadding="4" cellspacing="1" class="TableContent" width="100%" style="border:1px solid #faf0d7;"> <tbody> <tr><td bgcolor="#D4C0A1"><table border="0" cellpadding="8"><tbody><tr><td> Alvoria disclaims all warranties for the up-to-dateness, correctness, completeness or quality of the information presented on this website. Alvoria is not liable for any lost profits or special, incidental or consequential damages arising out of the use or not-use of the presented information. Alvoria reserves the right to supplement, change or delete parts of the website or the whole website, or even to close the service temporarily or finally. </td></tr><tr><td> The following of our websites contain links to other pages on the internet: facebook.com, twitter.com, prnt.sc, otservlist.org as well as all connected subdomains. We would like to expressly emphasise the fact that Alvoria has no influence whatsoever on the design or the content of any of the websites to which these links refer. For this reason Alvoria cannot take responsibility for the up-to-dateness, correctness, completeness or general quality of the information supplied by these websites. Also, Alvoria expressly disassociates itself from any content presented on said websites. This declaration applies to any link to external websites to be found on one or more of Alvoria\'s websites, as well as to any kind of content these external websites may contain. </td></tr></tbody></table></td></tr></tbody></table> </div> </div> <div class="TableShadowContainer"> <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div> </div> </div> </td> </tr> </tbody></table> </div> </td></tr></tbody></table> </div><br><div class="TableContainer"> <div class="CaptionContainer"> <div class="CaptionInnerContainer"> <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span> <div class="Text">Support Team</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> </div> </div><table class="Table4" cellpadding="0" cellspacing="0"> <tbody><tr> <td> <div class="InnerTableContainer"> <table style="width:100%;"> <tbody><tr> <td> <div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);"> <div class="TableContentContainer">'; $bgcolor = (($i++ % 2 == 1) ? $config['site']['darkborder'] : $config['site']['lightborder']); $main_content .= '<table border="1" cellpadding="4" cellspacing="1" class="TableContent" width="100%" style="border:1px solid #faf0d7; <tbody> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100%"><b>Name</b></td><td><b>Function</b></td><td><b>Group</b></td><td>&nbsp;</td></tr>'; foreach($list as $i => $supporter) { if(!Player::isPlayerOnline($supporter['id'])) $player_list_status = '<font color="red">Offline</font>'; else $player_list_status = '<font color="green">Online</font>'; $bgcolor = (($i++ % 2 == 1) ? $config['site']['darkborder'] : $config['site']['lightborder']); $main_content .= '<tr bgcolor="'.$bgcolor.'"><td>'.htmlspecialchars($supporter['name']).'</td><td>' . $supporter['function'] . '</td><td><nobr>' . htmlspecialchars(Website::getGroupName($supporter['group_id'])) . '<nobr></td><td><a href="?subtopic=characters&name='.urlencode($supporter['name']).'"><img src="'.$layout_name.'/images/buttons/sbutton_view.gif" alt="'.htmlspecialchars($supporter['name']).'"></a></td></tr>'; } $main_content .= '</tbody></table>'; $main_content .= '</div> </div> <div class="TableShadowContainer"> <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div> </div> </div> </td> </tr> </tbody></table> </div> </td></tr></tbody></table> </div>'; team.php
  6. Pedro. postou uma resposta no tópico em Suporte Tibia OTServer
    Eu tenho, chegar em casa te mando. Se não me engano o gesior do qwizer tb tem
  7. Não sei se pelo titulo dá pra entender, é o seguinte. Aqui no trabalho a um sistema chamado MV, nele vem 1 outro programa que o medico faz as prescrições, sai aqui na farmácia e eu puxo e imprimo elas, só que eu faço isso de 07h da manhã até as 19h. Há alguma forma de programar, qual a melhor linguagem de se fazer isso, para que eu verifique se tem prescrições na tela e imprima? @edit pelo que um amigo ajudou, a melhor forma de fazer seria uma comunicação entre banco de dados, alguém pode me ajudar? :d @underewarr
  8. Primeiramente, aconselho você a seguir tutoriais, que possam te ajudar configurar um servidor. 2° Pode ser mil coisas, configuração do mysql, database, items, xml, várias, eu não sei como salvar os logs em windows só em linux.
  9. Pedro. postou uma resposta no tópico em Suporte Tibia OTServer
    só instalar corretamente as libs. https://static.otland.net/dl/tfs-sdk-3.2.zip boost 64x https://sourceforge.net/projects/boost/files/boost-binaries/1.62.0/boost_1_62_0-msvc-14.0-64.exe/download boost 86x https://sourceforge.net/projects/boost/files/boost-binaries/1.62.0/boost_1_62_0-msvc-14.0-32.exe/download
  10. Cara, eu não tenho conhecimento em lua, eu ajudo no que posso, retorna o valor do deathlostpercent na config lua e tenta esse script aqui. creaturescript/script levelprotection.lua function onDeath(cid, corpse, deathList) local config = { onlypremium = true, -- se precisa ser premium para não perder nada exp = true, -- se ao morrer o jogador irá perder exp skills = false, -- se ao morrer vai perder skills magic = false, -- se vai perder magic level loot = false, -- se ao morrer o jogador irá perder o loot level = 999 -- até que level irá proteger o player } if isPlayer(cid) and getPlayerLevel(cid) <= config.level then if config.onlypremium == true and not isPremium(cid) then return TRUE end if config.loot == false then doCreatureSetDropLoot(cid, false) end if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end return TRUE end return TRUE end <event type="death" name="ProtectLevel" event="script" value="levelprotection.lua"/> registerCreatureEvent(cid, "ProtectLevel")
  11. qual a versão do seu tfs? 1x? ou 0x?
  12. primeira coisa que se deve saber é se as portas estão desbloqueadas e acessiveis, vai no site meuip pega seu ip e manda pra alguém tentar acessar, caso não dê, libere as portas no seu modem/router. mesma coisa com o Tibia.
  13. Pedro. postou uma resposta no tópico em Suporte OTServer Derivados
    8.60 se não me engano
  14. https://github.com/jlcvp/GesiorMonteiro/tree/master/cache
  15. Muito dahora, espero que tu consiga formar um bom time animado e empenhado para tal, boa sorte.
  16. dentro do cache tem o arquivo DONT_EDIT_serverstatus.txt ? se tiver da chmod neles.
  17. Pedro. postou uma resposta no tópico em Suporte OTServer Derivados
    Eu trabalhei numa base, mas não terminei, se quiser usar algo.. https://www.4shared.com/rar/e9OYViFtca/Naruto-Legends.html?
  18. Pedro. postou uma resposta no tópico em Suporte Tibia OTServer
    essas passagens são liberadas por storage, ela faz uma verificação, vê a storage que tá no lua dela, de qual trono é e verifica se o trono ta funcionando e setando essa storage. tem que ve aonde ta teu chest ué, o meu fica em system por exemplo, todas as quests em um lua.
  19. perdão, editei la encima, é em events/player.lua
  20. Amigo, você tá usando uma source que não é desse servidor, vai dá incompatibilidade de vários Scripts, e sistemas por falta de funções, esse é todo erro que tá dando desse npc? não consegui fixar aqui qual tfs você tá usando? qual datapack? source de qm?
  21. se eu consigo pelo celular, acredito que com um pouco de esforço e atenção você também. https://imgur.com/PEUXAUY
  22. Pedro. postou uma resposta no tópico em Recursos e ferramentas de Design
    Primeira vez que brinco no paint, curti! vou tentar modificar um gesior desses todo.

Informação Importante

Confirmação de Termo