
-
-
-
-
(Resolvido)[TFS 1.3] [AJUDA] Sumonar NPC por tempo
local function removeNpc(creature) local target = Npc(npc) target:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:setStorageValue(storage, 0) target:remove() end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getStorageValue(storage) < os.time() then local playerPos = player:getPosition() local position = Position(playerPos.x, playerPos.y + 1, playerPos.z) local npcName = "Mad" local storage = 2252 local npc = Game.createNpc(npcName, position) if npc then npc:setMasterPos(position) position:sendMagicEffect(CONST_ME_POFF) player:say("can you help me?", TALKTYPE_MONSTER_SAY) player:setStorageValue(storage, os.time() + 1 * 60) addEvent(removeNpc, 1 * 60 * 1000, npcName) end else position:sendMagicEffect(CONST_ME_POFF) end return true end
-
(Resolvido)[TFS 1.3] [AJUDA] Sumonar NPC por tempo
local function removeNpc(creature) local target = Npc(npc) target:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:setStorageValue(storage, 0) target:remove() end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getStorageValue(storage) >= os.time() then local playerPos = player:getPosition() local position = Position(playerPos.x, playerPos.y + 1, playerPos.z) local npcName = "Mad" local storage = 2252 local npc = Game.createNpc(npcName, position) if npc then npc:setMasterPos(position) position:sendMagicEffect(CONST_ME_POFF) player:say("can you help me?", TALKTYPE_MONSTER_SAY) player:setStorageValue(storage, os.time() + 1 * 60) addEvent(removeNpc, 1 * 60 * 1000, npcName) end else position:sendMagicEffect(CONST_ME_POFF) end return true end
-
-
Marco Oliveira reagiu a uma resposta no tópico: 5 Sites Exclusivos para Tibia Otserv, Narutibia e Dragon Ball Z + Layouts e Landing Pages!
-
5 Sites Exclusivos para Tibia Otserv, Narutibia e Dragon Ball Z + Layouts e Landing Pages!
Marcomoa é meu antigo usuário!
-
Erro ao tentar compilar sources
Favor não me marcar em tópico que não participo, obg.
-
-
-
-
Criar botão no GesiorACC
em layout/layout.php procure por <div id="Menu"> e adicione o código a baixo: <div class="SmallMenuBox" style="top: 4px;" > <div id="LoginTop" style="background-image:url(<?php echo $layout_name; ?>/images/global/general/box-top.gif)" ></div> <div id="BorderLeft" class="LoginBorder" style="background-image:url(<?php echo $layout_name; ?>/images/global/general/chain.gif); height: 39px;" ></div> <div id="LoginButtonContainer" style="background-image:url(<?php echo $layout_name; ?>/images/global/loginbox/loginbox-textfield-background.gif)" > <div id="PlayNowContainer" ><form class="MediumButtonForm" action="?subtopic=downloadclient&step=downloadagreement" method="post" ><div class="MediumButtonBackground" style="background-image:url(<?php echo $layout_name; ?>/images/global/buttons/mediumbutton.gif)" onMouseOver="MouseOverMediumButton(this);" onMouseOut="MouseOutMediumButton(this);" ><div class="MediumButtonOver" style="background-image:url(<?php echo $layout_name; ?>/images/global/buttons/mediumbutton-over.gif)" onMouseOver="MouseOverMediumButton(this);" onMouseOut="MouseOutMediumButton(this);" ></div><input class="MediumButtonText" type="image" name="Download" alt="Download" src="<?php echo $layout_name; ?>/images/global/buttons/mediumbutton_download.png" /></div></form></div> </div> <div id="BorderRight" class="LoginBorder" style="background-image:url(<?php echo $layout_name; ?>/images/global/general/chain.gif); height: 39px;" ></div> <div id="LoginBottom" class="Loginstatus" style="background-image:url(<?php echo $layout_name; ?>/images/global/general/box-bottom.gif); top: 39px;" ></div> </div> Caso necessite adicionar a css basta pesquisar aqui https://github.com/omarcopires/gesior/blob/master/layouts/tibiacom/css/style.css por SmallMenuBox e adicionar ao seu arquivo
-
(Resolvido)Bloqueando movimentação de itens.
Em events/player.lua adicione o seguinte código nas funções Player:onTradeRequest(target, item) e Player:onMoveItem: if item:getActionId() == 8000 then self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) return false end Todos os itens que possuírem actionId igual a 8000 não serão movidos ou poderão receber trade dos jogadores. PS: Verifique se a função onTradeRequest está ativada em events.xml
-
-
Acesso full a Imbuing Shrine
Você pode liberar as storages de acesso ao jogador no npc The Oracle, basta procurar pela linha player:setTown(Town(town[cid])) e adicionar as seguintes linhas: -- Forgotten Knowledge player:setStorageValue(Storage.ForgottenKnowledge.Tomes, 1) player:setStorageValue(Storage.ForgottenKnowledge.LastLoreKilled, 1) player:setStorageValue(Storage.ForgottenKnowledge.TimeGuardianKilled, 1) player:setStorageValue(Storage.ForgottenKnowledge.HorrorKilled, 1) player:setStorageValue(Storage.ForgottenKnowledge.DragonkingKilled, 1) player:setStorageValue(Storage.ForgottenKnowledge.ThornKnightKilled, 1) player:setStorageValue(Storage.ForgottenKnowledge.LloydKilled, 1) player:setStorageValue(Storage.ForgottenKnowledge.LadyTenebrisKilled, 1) player:setStorageValue(Storage.ForgottenKnowledge.AccessMachine, 1) Outra forma de fazer isso é adicionando as storages quando o player faz login no servidor, para isso você deve adicionar em login.lua em creaturescripts. Minha recomendação é que seja feita pelo Oracle, uma vez que o jogador só irá ganhar as storages uma vez.
-
-
-
Sistema de Medalhões! Solicite aqui!
Aguardo minhas medalhas.
-
(Resolvido)Tile por level
function onStepIn(cid, item, position, fromPosition) local min = 150 local max = 200 local lvl = getPlayerLevel(cid) if lvl >= min and lvl <= max then return true else doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) doPlayerSendCancel(cid,"Somente level maior que " .. min .. " e menor que ".. max .." podem passar aqui.") end return true end <movevent type="StepIn" actionid="23001" event="script" value="checkLevelOnTile.lua"/>
-
-
Marco Oliveira alterou sua foto pessoal
-
-
[PEDIDO] Regem de stamina Training online
marque como melhor resposta
-
[PEDIDO] Regem de stamina Training online
Substitua sua função por: function Creature:onTargetCombat(target) if not self then return true end if not __picif[target.uid] then if target:isMonster() then target:registerEvent("RewardSystemSlogan") __picif[target.uid] = {} end end if target:isPlayer() then if self:isMonster() then local protectionStorage = target:getStorageValue(Storage.combatProtectionStorage) if target:getIp() == 0 then -- If player is disconnected, monster shall ignore to attack the player if target:isPzLocked() then end if protectionStorage <= 0 then addEvent(removeCombatProtection, 30 * 1000, target.uid) target:setStorageValue(Storage.combatProtectionStorage, 1) elseif protectionStorage == 1 then self:searchTarget() return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end return true end if protectionStorage >= os.time() then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end if ((target:isMonster() and self:isPlayer() and target:getType():isPet() and target:getMaster() == self) or (self:isMonster() and target:isPlayer() and self:getType():isPet() and self:getMaster() == target)) then return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE end if PARTY_PROTECTION ~= 0 then if self:isPlayer() and target:isPlayer() then local party = self:getParty() if party then local targetParty = target:getParty() if targetParty and targetParty == party then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end end if ADVANCED_SECURE_MODE ~= 0 then if self:isPlayer() and target:isPlayer() then if self:hasSecureMode() then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end if self:isPlayer() then if target and target:getName() == staminaBonus.target then local name = self:getName() if not staminaBonus.events[name] then staminaBonus.events[name] = addEvent(addStamina, staminaBonus.period, name) end end end return true end
-
Pedido login.php compativel 12.20 com o gesior
na pasta raiz do seu site crie um arquivo chamado login.php e dentro dele adicione o seguinte código: <?php $_GET['subtopic'] = 'login'; $_REQUEST['subtopic'] = 'login'; include('index.php'); na pasta pages crie outro arquivo chamado login.php e adicione o seguinte código: <?php header('Content-Type: application/json'); if(!defined('INITIALIZED')) exit; function sendError($msg){ $ret = []; $ret["errorCode"] = 3; $ret["errorMessage"] = $msg; die(json_encode($ret)); } $request = file_get_contents('php://input'); $result = json_decode($request); $action = isset($result->type) ? $result->type : ''; switch ($action) { case 'cacheinfo': die(json_encode([ 'playersonline' => $status['players'], 'twitchstreams' => 0, 'twitchviewer' => 0, 'gamingyoutubestreams' => 0, 'gamingyoutubeviewer' => 0 ])); break; case 'eventschedule': die(json_encode([ 'eventlist' => [] ])); break; case 'boostedcreature': die(json_encode([ 'boostedcreature' => false, ])); break; case 'login': $port = Website::getServerConfig()->getValue('gameProtocolPort'); $world = [ 'id' => 0, 'name' => Website::getServerConfig()->getValue('serverName'), 'externaladdressprotected' => Website::getServerConfig()->getValue('ip'), 'externalportprotected' => $port, 'externaladdressunprotected' => Website::getServerConfig()->getValue('ip'), 'externalportunprotected' => $port, 'previewstate' => 0, 'location' => 'BRA', 'anticheatprotection' => false, 'pvptype' => array_search(Website::getServerConfig()->getValue('worldType'), ['pvp', 'no-pvp', 'pvp-enforced']), 'istournamentworld' => false, 'restrictedstore' => false, 'currenttournamentphase' => 2 ]; $characters = []; $account = null; $columns = 'name, level, sex, vocation, looktype, lookhead, lookbody, looklegs, lookfeet, lookaddons, deleted, lastlogin'; $account = new Account(); $account->loadByName($result->accountname); $current_password = Website::encryptPassword($result->password); if (!$account->isLoaded() || !$account->isValidPassword($result->password)) { sendError('Account name or password is not correct.'); } $players = $SQL->query("select {$columns} from players where account_id = " . $account->getId() . " order by name asc")->fetchAll(); foreach ($players as $player) { $characters[] = create_char($player); } $worlds = [$world]; $playdata = compact('worlds', 'characters'); $session = [ 'sessionkey' => "$result->accountname\n$result->password", 'lastlogintime' => (!$account) ? 0 : $account->getLastLogin(), 'ispremium' => (!$account) ? true : $account->isPremium(), 'premiumuntil' => (!$account) ? 0 : (time() + ($account->getPremDays() * 86400)), 'status' => 'active', 'returnernotification' => false, 'showrewardnews' => true, 'isreturner' => true, 'fpstracking' => false, 'optiontracking' => false, 'tournamentticketpurchasestate' => 0, 'emailcoderequest' => false ]; die(json_encode(compact('session', 'playdata'))); break; default: sendError("Unrecognized event {$action}."); break; } function create_char($player) { return [ 'worldid' => 0, 'name' => $player['name'], 'ismale' => intval($player['sex']) === 1, 'tutorial' => false, 'level' => intval($player['level']), 'vocation' => Website::getVocationName($player['vocation']), 'outfitid' => intval($player['looktype']), 'headcolor' => intval($player['lookhead']), 'torsocolor' => intval($player['lookbody']), 'legscolor' => intval($player['looklegs']), 'detailcolor' => intval($player['lookfeet']), 'addonsflags' => intval($player['lookaddons']), 'ishidden' => intval($player['deletion']) === 1, 'istournamentparticipant' => false, 'remainingdailytournamentplaytime' => 0 ]; }
-
[PEDIDO] Tirar um código de uma script
function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Attack the Monk and you will win 1 of stamina every 2 minutes training here.') return true end
-
[PEDIDO] Regem de stamina Training online
Em data/events/scripts/creature.lua procure por function Creature:onTargetCombat(target), a cima adicione o seguinte codigo: -- Increase Stamina when Attacking Trainer local staminaBonus = { target = 'Training Monk', period = 120000, -- time on miliseconds bonus = 1, -- gain stamina events = {} } local function addStamina(name) local player = Player(name) if not player then staminaBonus.events[name] = nil else local target = player:getTarget() if not target or target:getName() ~= staminaBonus.target then staminaBonus.events[name] = nil else player:setStamina(player:getStamina() + staminaBonus.bonus) staminaBonus.events[name] = addEvent(addStamina, staminaBonus.period, name) end end end No mesmo arquivo procure por function Creature:onTargetCombat(target) e adicione o seguinte codigo a cima de return true if self:isPlayer() then if target and target:getName() == staminaBonus.target then local name = self:getName() if not staminaBonus.events[name] then staminaBonus.events[name] = addEvent(addStamina, staminaBonus.period, name) end end end
-
Frase House, HELP!
A mensagem está localizada em houses.cpp dentro de void House::updateDoorDescription() const