
-
-
-
-
Erro ao tentar rodar global na vps linux
Só vc pesquisa na youtube. e resolve você.
-
-
Error no script
local potions = { [6542] = {needLevel = 100, rate = 2.0, duration = 1800}, [6543] = {needLevel = 100, rate = 3.0, duration = 1800}, [6544] = {needLevel = 100, rate = 4.0, duration = 1800}, [6545] = {needLevel = 100, rate = 5.0, duration = 1800}, [2328] = {needLevel = 100, rate = 6.0, duration = 1800} } if not expPotions then expPotions = {playerData = {}} end function getTimeString(duration) local seconds = duration % 60 local minutes = math.floor((duration / 60) % 60) local hours = math.floor((duration / 3600) % 24) local days = math.floor(duration / 86400) local timeString = "" if days > 0 then timeString = timeString .. days .. " dia(s) " end if hours > 0 then timeString = timeString .. hours .. " hora(s) " end if minutes > 0 then timeString = timeString .. minutes .. " minuto(s) " end timeString = timeString .. seconds .. " segundo(s)" return timeString end function expPotions:onUse(cid, item, fromPosition, itemEx, toPosition) local itemId = item.itemid local potion = potions[itemId] if not potion then return false end if getPlayerLevel(cid) < potion.needLevel then doPlayerSendCancel(cid, ('Você precisa ser level %d+ para usar este Egg.'):format(potion.needLevel)) return true end local guid = getPlayerGUID(cid) self.playerData[guid] = self.playerData[guid] or {} local expData = self.playerData[guid][itemId] if not expData then self.playerData[guid][itemId] = {rate = 0, duration = 0} expData = self.playerData[guid][itemId] end local now = os.time() if expData.duration > now then doCreatureSay(cid, 'Aguarde o bônus atual acabar para usar novamente.', TALKTYPE_ORANGE_1, false, cid) return true end expData.rate = potion.rate expData.duration = potion.duration + now doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ('[Egg Exp (Combo)] Agora você tem +%d%% de experiência por %s.'):format( potion.rate * 100, getTimeString(potion.duration) )) doPlayerSetRate(cid, SKILL__LEVEL, expData.rate) -- Aplica o bônus de experiência doRemoveItem(item.uid, 1) return true end function expPotions:onLogin(cid) local guid = getPlayerGUID(cid) self.playerData[guid] = self.playerData[guid] or {} for itemId in pairs(potions) do self.playerData[guid][itemId] = self.playerData[guid][itemId] or {rate = 0, duration = 0} end return true end function expPotions:onLogout(cid) local guid = getPlayerGUID(cid) local playerData = self.playerData[guid] if playerData then for itemId, expData in pairs(playerData) do doPlayerSetRate(cid, SKILL__LEVEL, 1) -- o bônus de experiência para 1 end end return true end function expPotions:getCombo(cid) local playerData = self.playerData[getPlayerGUID(cid)] local potionsCombo = 1 if playerData then for itemId, expData in pairs(playerData) do potionsCombo = potionsCombo + expData.rate end end return potionsCombo end function expPotions:onSay(cid, words, param) local str = 'Combos de Eggs de Experiência:\n' local playerData = self.playerData[getPlayerGUID(cid)] if playerData then for itemId, expData in pairs(playerData) do local itemName = getItemNameById(itemId) str = str .. ('\n%s - %d%%'):format(itemName, expData.rate * 100) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str) return true end Resolvido 😛
-
Error no script
local potions = { [6542] = {needLevel = 1500, rate = 1.2, duration = 1800}, [6543] = {needLevel = 2000, rate = 1.4, duration = 1800}, [6544] = {needLevel = 2500, rate = 1.6, duration = 1800}, [6545] = {needLevel = 3000, rate = 1.8, duration = 1800}, [2328] = {needLevel = 4500, rate = 2.4, duration = 1800}, } if not expPotions then expPotions = {playerData = {}} end function getTimeString(duration) local seconds = duration % 60 local minutes = math.floor((duration / 60) % 60) local hours = math.floor((duration / 3600) % 24) local days = math.floor(duration / 86400) local timeString = "" if days > 0 then timeString = timeString .. days .. " dia(s) " end if hours > 0 then timeString = timeString .. hours .. " hora(s) " end if minutes > 0 then timeString = timeString .. minutes .. " minuto(s) " end timeString = timeString .. seconds .. " segundo(s)" return timeString end function expPotions:onUse(cid, item, fromPosition, itemEx, toPosition) local itemId = item.itemid local potion = potions[itemId] if not potion then return false end if getPlayerLevel(cid) < potion.needLevel then doPlayerSendCancel(cid, ('Você precisa ser level %d+ para usar este Egg.'):format(potion.needLevel)) return true end local guid = getPlayerGUID(cid) self.playerData[guid] = self.playerData[guid] or {} local expData = self.playerData[guid][itemId] if not expData then self.playerData[guid][itemId] = {rate = 0, duration = 0} expData = self.playerData[guid][itemId] end local now = os.time() if expData.duration > now then doCreatureSay(cid, 'Aguarde o bônus atual acabar para usar novamente.', TALKTYPE_ORANGE_1, false, cid) return true end expData.rate = expData.rate + potion.rate expData.duration = potion.duration + now doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ('Agora você tem +%d%% de experiência por %s.'):format( potion.rate * 100, getTimeString(potion.duration) )) doRemoveItem(item.uid, 1) return true end function expPotions:onLogin(cid) local guid = getPlayerGUID(cid) self.playerData[guid] = self.playerData[guid] or {} for itemId in pairs(potions) do self.playerData[guid][itemId] = self.playerData[guid][itemId] or {rate = 0, duration = 0} end return true end function expPotions:getCombo(cid) local playerData = self.playerData[getPlayerGUID(cid)] local potionsCombo = 1 if playerData then for itemId, expData in pairs(playerData) do potionsCombo = potionsCombo + expData.rate end end return potionsCombo end function expPotions:onSay(cid, words, param) local str = 'Experience Eggs Combos:\n' local playerData = self.playerData[getPlayerGUID(cid)] if playerData then for itemId, expData in pairs(playerData) do str = str .. ('\n%s - %d%%'):format(getItemInfo(itemId).name, expData.rate * 100) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str) return true end
-
Error no script
local potions = { [6542] = {needLevel = 1500, rate = 1.2, duration = 1800}, [6543] = {needLevel = 2000, rate = 1.4, duration = 1800}, [6544] = {needLevel = 2500, rate = 1.6, duration = 1800}, [6545] = {needLevel = 3000, rate = 1.8, duration = 1800}, [2328] = {needLevel = 4500, rate = 2.4, duration = 1800}, } if not expPotions then expPotions = {playerData = {}} end function expPotions:onUse(cid, item, fromPosition, itemEx, toPosition) local itemId = item.itemid local potion = potions[itemId] if not potion then return false end if getPlayerLevel(cid) < potion.needLevel then doPlayerSendCancel(cid, ('Você precisa ser level %d+ para usar este Egg.'):format(potion.needLevel)) return true end local guid = getPlayerGUID(cid) self.playerData[guid] = self.playerData[guid] or {} -- Verifica se já existe uma tabela para esse jogador local expData = self.playerData[guid][itemId] if not expData then self.playerData[guid][itemId] = {rate = 0, duration = 0} -- Inicializa os dados da poção para o jogador expData = self.playerData[guid][itemId] -- Atualiza a referência para os dados da poção end local now = os.time() if expData.duration > now then doCreatureSay(cid, 'Aguarde o bônus atual acabar para usar novamente.', TALKTYPE_ORANGE_1, false, cid) return true end expData.rate = expData.rate + potion.rate expData.duration = potion.duration + now doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ('Agora você tem +%d%% de experiência por %s.'):format( potion.rate * 100, string.diff(potion.duration, true) )) doRemoveItem(item.uid, 1) return true end function expPotions:onLogin(cid) local guid = getPlayerGUID(cid) self.playerData[guid] = self.playerData[guid] or {} -- Verifica se já existe uma tabela para esse jogador for itemId in pairs(potions) do self.playerData[guid][itemId] = self.playerData[guid][itemId] or {rate = 0, duration = 0} -- Inicializa os dados das poções para o jogador end return true end function expPotions:getCombo(cid) local playerData = self.playerData[getPlayerGUID(cid)] local potionsCombo = 1 if playerData then for itemId, expData in pairs(playerData) do potionsCombo = potionsCombo + expData.rate end end return potionsCombo end function expPotions:onSay(cid, words, param) local str = 'Experience Eggs Combos:\n' local playerData = self.playerData[getPlayerGUID(cid)] if playerData then for itemId, expData in pairs(playerData) do str = str .. ('\n%s - %d%%'):format(getItemInfo(itemId).name, expData.rate * 100) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str) return true end
-
NPC que registra um serial no item
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local itemId = 2160 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 onCreatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) -- Obter o objeto Player if msgcontains(msg, "serial") then selfSay("Eu coloco um identificador em seu item. Cobro pelo serviço um valor de 1 crystal coin. Deseja colocar em algum item?", cid) talkState[cid] = 0 elseif talkState[cid] == 0 and msgcontains(msg, 'yes') then selfSay("Qual item você está interessado em colocar o serial? Lembrando que isso não garante que o item pertence a você para sempre, se você perder o item a responsabilidade será sua e não da Equipe.", cid) talkState[cid] = 1 elseif talkState[cid] == 1 then local item = player:getItemById(itemId, true) -- Procurar pelo item no inventário do jogador if item and item:isItem() then if player:removeItem(2160, 1) then -- Remover 1 Crystal Coin do jogador local description = "Este item foi registrado pelo jogador " .. player:getName() .. " no dia " .. os.date("%d/%m/%Y - %X") .. " Serial: " .. player:getGuid() .. "." local itemText = item:getAttribute(TEXT_DESCRIPTION) if itemText and itemText ~= "" then itemText = itemText .. "\n" .. description else itemText = description end item:setAttribute(TEXT_DESCRIPTION, itemText) selfSay("Aqui está o seu item. Deseja registrar outro?", cid) else selfSay("Você não tem a quantidade necessária para registrar esse item.", cid) end else selfSay("Você não possui este item.", cid) end talkState[cid] = 0 else selfSay("Pena que você não quer. Volte aqui quando estiver interessado.", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, onCreatureSayCallback) npcHandler:addModule(FocusModule:new()) pode teste dnv
-
NPC que registra um serial no item
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local itemId = 2160 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 onCreatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) -- Obter o objeto Player if msgcontains(msg, "serial") then selfSay("Eu coloco um identificador em seu item. Cobro pelo serviço um valor de 1 crystal coin. Deseja colocar em algum item?", cid) talkState[cid] = 0 elseif talkState[cid] == 0 and msgcontains(msg, 'yes') then selfSay("Qual item você está interessado em colocar o serial? Lembrando que isso não garante que o item pertence a você para sempre, se você perder o item a responsabilidade será sua e não da Equipe.", cid) talkState[cid] = 1 elseif talkState[cid] == 1 then local item = player:getItemById(itemId, true) -- Procurar pelo item no inventário do jogador if item and item:isItem() then if player:removeItem(2160, 1) then -- Remover 1 Crystal Coin do jogador item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Este item foi registrado pelo jogador " .. player:getName() .. " no dia " .. os.date("%d/%m/%Y - %X") .. " Serial: " .. player:getGuid() .. ".") selfSay("Aqui está o seu item. Deseja registrar outro?", cid) else selfSay("Você não tem a quantidade necessária para registrar esse item.", cid) end else selfSay("Você não possui este item.", cid) end talkState[cid] = 0 else selfSay("Pena que você não quer. Volte aqui quando estiver interessado.", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, onCreatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Player morre, e volta para level 8 e perde tudo Tfs 1.2
vc tem discord ai ?
-
Player morre, e volta para level 8 e perde tudo Tfs 1.2
executar Sql no seu phpmyadmin ALTER TABLE `znote_players` ADD `onlinetinetoday` int(11) NOT NULL default 0;
-
ERROR NA HORA DE COMPIALAR LINUX
Certifique-se de ter a versão correta do boost instalada. Link: https://otland.net/threads/linux-debian-leny.108835/
-
Maniaco reagiu a uma resposta no tópico: Programação Magic e Shoot Effects TFS E OTX 1.3 [Versão 8.60]
-
-
-
Erro ao morrer
Vá em phpmyadmin Tabela players_skills or player_skills Se o char não está salvando as skills é porque provavelmente não existem os registros em player_skills, então vamos adicionar. 1º) Vamos achar o ID do player: Em seu banco de dados vá até a tabela players e clique em pesquisar, localizado na parte superior da pagina (IMAGEM DE UMA LUPA). No bloco "name" digite o nome do player bugado e aperte enter pra executar. Agora basta pegar o ID que é oque precisamos.. 2º) Executando query: Clique em seu banco de dados novamente para voltar a todas as tabelas em seguida iremos em SQL localizado na parte superior da tela. Substitua onde tem ID pelo id do player que acabamos de buscar e execute a query. INSERT INTO `player_skills` (`player_id`, `skillid`, `value`, `count`) VALUES (0, 0, 0, 0), (0, 1, 0, 0), (0, 2, 0, 0), (0, 3, 0, 0), (0, 4, 0, 0), (0, 5, 0, 0), (0, 6, 0, 0), Assim Exemplo ID PLAYER COMO Sample, Skills, Value 0 padrão, count 0 Padrão. INSERT INTO `player_skills` (`player_id`, `skillid`, `value`, `count`) VALUES (1, 0, 0, 0), (1, 1, 0, 0), (1, 2, 0, 0), (1, 3, 0, 0), (1, 4, 0, 0), (1, 5, 0, 0), (1, 6, 0, 0);
-
luanluciano93 reagiu a uma resposta no tópico: Programação Magic e Shoot Effects TFS E OTX 1.3 [Versão 8.60]
-
Programação Magic e Shoot Effects TFS E OTX 1.3 [Versão 8.60]
Obrigado luan, eu nao vi que eu n tive faz o tempo kkk
-
Aumentar limit de effect TFS 1.3
Boa tarde @elielder Vamos começar primeiramente com os Magic Effects Em const.h procure por: enum MagicEffectClasses : uint8_t { mude: enum MagicEffectClasses : uint16_t { procure por: CONST_ME_DRAGONHEAD = 70 abaixo adiciona: CONST_ME_DRAGONHEAD = 70, CONST_ME_SEMFIM = 0xFFFE //65534 Em tools.cpp Procure por: MagicEffectNames magicEffectNames = { Ache por último: {"dragonhead", CONST_ME_DRAGONHEAD}, Abaixo adiciona: {"dragonhead", CONST_ME_DRAGONHEAD}, {"semfim", CONST_ME_SEMFIM}, Em Protocolgame.cpp Procure por: void ProtocolGame::sendMagicEffect(const Position& pos, uint8_t type) { if (!canSee(pos)) { return; } NetworkMessage msg; msg.addByte(0x83); msg.addPosition(pos); msg.addByte(type); writeToOutputBuffer(msg); } Mude por: void ProtocolGame::sendMagicEffect(const Position& pos, uint16_t type) { if (!canSee(pos)) { return; } NetworkMessage msg; msg.addByte(0x83); msg.addPosition(pos); msg.add<uint16_t>(type); writeToOutputBuffer(msg); } Em Protcolgame.h Procure por: void sendMagicEffect(const Position& pos, uint8_t type); Mude por: void sendMagicEffect(const Position& pos, uint16_t type); Em Game.cpp Procure por: void Game::addMagicEffect(const Position& pos, uint8_t effect) { SpectatorVec spectators; map.getSpectators(spectators, pos, true, true); addMagicEffect(spectators, pos, effect); } Mude por: void Game::addMagicEffect(const Position& pos, uint16_t effect) { SpectatorVec spectators; map.getSpectators(spectators, pos, true, true); addMagicEffect(spectators, pos, effect); } Procure por: void Game::addMagicEffect(const SpectatorVec& spectators, const Position& pos, uint8_t effect) { for (Creature* spectator : spectators) { if (Player* tmpPlayer = spectator->getPlayer()) { tmpPlayer->sendMagicEffect(pos, effect); } } } Mude Por: void Game::addMagicEffect(const SpectatorVec& spectators, const Position& pos, uint16_t effect) { for (Creature* spectator : spectators) { if (Player* tmpPlayer = spectator->getPlayer()) { tmpPlayer->sendMagicEffect(pos, effect); } } } Em game.h Procure por: void addMagicEffect(const Position& pos, uint8_t effect); Mude por: void addMagicEffect(const Position& pos, uint16_t effect); Procure por: static void addMagicEffect(const SpectatorVec& spectators, const Position& pos, uint8_t effect); Mude por: static void addMagicEffect(const SpectatorVec& spectators, const Position& pos, uint16_t effect); Em player.h Procure por: void sendMagicEffect(const Position& pos, uint8_t type) const { if (client) { client->sendMagicEffect(pos, type); } } Mude por: void sendMagicEffect(const Position& pos, uint16_t type) const { if (client) { client->sendMagicEffect(pos, type); } } Programa Baixar: http://www.handshake.de/user/chmaas/delphi/download/xvi32_254.zip CTRL + F Hex Editor Procure por: A7 95 0E 00 0F B6 C0 Mude: 47 97 0E 00 0F B7 C0 Salve Tibia.exe Recompilar a sua source tfs 1.3 e fixar magic effect. Aguardo em DistanceShoot (Missile) Eu aposto a codigo tudo fixar em testamos TFS 1.3 e 1.4. Work in Magic Effects
-
Town Id no Look
vá em caminho pasta config/config.php edite (x = id / número da cidade) aqui: $config['site']['newchar_towns'][0] = array(x,x,x,x); id / números da cidade: Exemplo: $towns_list[0] = array(0 => 'Venore', 1 => 'Edron', 2 => 'Thais', 3 => 'Carlin'); // list of towns, id => 'name', $towns_list[0] - for world id 0
-
Town Id no Look
Qual é o sua base em website ou sqlite? Obs: Modern acc, Gesior acc, Znote acc & Myacc / Versão client
-
[Ajuda] Dominio Hostinger
Tem lá tutorial na hostinger link: https://www.hostinger.com.br/tutoriais/como-apontar-o-nome-de-dominio-para-hostinger Good Lucky