-
Total de itens
584 -
Registro em
-
Última visita
-
Dias Ganhos
10
Tudo que DarkWore postou
-
[Encerrado] [Encerrado] Help! criação de cliente 8.0
tópico respondeu ao Foster Arcus de DarkWore em Tópicos Sem Resposta
O Vapus não entra mais, porem tem outros como o: http://chaitosoft.com/customclient Você também pode editar o ip de qualquer cliente pelo Notepad++ -
[SPELL] BUFF DE HP E DEF PARA PT
tópico respondeu ao Session Start de DarkWore em Globalevents e Spells
Obrigado por Compartilhar o Código vai ajudar bastante gente. Abraço. -
[Encerrado] [Encerrado] Ajuda Sources PDA
tópico respondeu ao PxN de DarkWore em Tópicos Sem Resposta
Na Source ta faltando, na source do dxp oficial deve ter mais nessa ae pra rodar no PDA Não foi adicionada pelo autor dela. -
[Encerrado] [Encerrado] Ajuda Sources PDA
tópico respondeu ao PxN de DarkWore em Tópicos Sem Resposta
Acha foi nada de mais -
[Encerrado] [Encerrado] Ajuda Sources PDA
tópico respondeu ao PxN de DarkWore em Tópicos Sem Resposta
Antes era doCreatureSetNick agora é getCreatureSetNick e getDirectionToWalk meu tempo é bem curto então não tenho muito tempo eu dei suporte pois pensei que o resto já tinha na source se eu for ficar adicionando vai comer muito meu tempo eu vou ajudando aos poucos mais tente arrumar você mesmo. -
[Encerrado] [Encerrado] Configuração IP
tópico respondeu ao perfollgustavo de DarkWore em Tópicos Sem Resposta
Utilize o DuckDNS ou NO-IP para criar um IP Estático. -
[Encerrado] [Encerrado] Ajuda Sources PDA
tópico respondeu ao PxN de DarkWore em Tópicos Sem Resposta
Função Adicionada, Download: Source - doCreatureSetNick.rar Só compilar e usar, abraço. Source - doCreatureSetNick.rar -
[Encerrado] [Encerrado] Sources compativel PDA
tópico respondeu ao PxN de DarkWore em Tópicos Sem Resposta
Tenta usar á source ae compila ela (tem tutoriais aqui caso você não sabe compilar) e se der erro em função cria um tópico na arêa de suporte e me marca. -
[Encerrado] [Encerrado] Sources compativel PDA
tópico respondeu ao PxN de DarkWore em Tópicos Sem Resposta
Creio que não mais se precisar de ajuda pode postar aqui no fórum que eu te dou suporte. Abraço -
[Encerrado] [Encerrado] Sources compativel PDA
tópico respondeu ao PxN de DarkWore em Tópicos Sem Resposta
Tem á Source do KyoGron, mais se pretende usar ela em um PDA creio que você terá que adicionar algumas funções necessárias principalmente á doCreatureSetNick pois ela é extremamente necessária no goback do pda. -
@Bennyyw Tudo que você faz fica bom deve ser muita dedicação
-
Nunca fui um jogador de Tibia Fanático mais acho que leva á uma sala de boss vai saber kkk
-
Obrigado, Abração.
-
Noix ^^
-
kkkk eu vou fazer essa sessão transbordar até o @Frenvius pedir pra parar, huehuehuehue, abraço benny.
-
Para dar uma força na sessão de programação vo lotar de código isso aqui, bom la vamos nós hoje é um fly system para tfs 1.2, sem gambiarras. Vá no arquivo creaturevent.cpp procure por: } else if (tmpStr == "extendedopcode") { type = CREATURE_EVENT_EXTENDED_OPCODE; Coloque isso abaixo: } else if (tmpStr == "move") { type = CREATURE_EVENT_MOVE; Depois procure por: case CREATURE_EVENT_EXTENDED_OPCODE: return "onExtendedOpcode"; Coloque isso abaixo: case CREATURE_EVENT_MOVE: return "onMove"; Depois procure por: void CreatureEvent::executeExtendedOpcode(Player* player, uint8_t opcode, const std::string& buffer) No Final dessa função coloque isso abaixo: bool CreatureEvent::executeOnMove(Player* player, const Position& fromPosition, const Position& toPosition) { //onMove(player, frompos, topos) if (!scriptInterface->reserveScriptEnv()) { std::cout << "[Error - CreatureEvent::executeOnMove] Call stack overflow" << std::endl; return false; } ScriptEnvironment* env = scriptInterface->getScriptEnv(); env->setScriptId(scriptId, scriptInterface); lua_State* L = scriptInterface->getLuaState(); scriptInterface->pushFunction(scriptId); LuaScriptInterface::pushUserdata(L, player); LuaScriptInterface::setMetatable(L, -1, "Player"); LuaScriptInterface::pushPosition(L, fromPosition); LuaScriptInterface::pushPosition(L, toPosition); return scriptInterface->callFunction(3); } Vá no arquivo creatureevent.h procure por: CREATURE_EVENT_EXTENDED_OPCODE, // otclient additional network opcodes Coloque isso abaixo: CREATURE_EVENT_MOVE, Ainda no arquivo creatureevent.h procure por: void executeExtendedOpcode(Player* player, uint8_t opcode, const std::string& buffer); Coloque isso abaixo: bool executeOnMove(Player* player, const Position& fromPosition, const Position& toPosition); Vá no arquivo events.cpp procure por: playerOnGainSkillTries = -1; Coloque isso abaixo: playerOnToggleMount = -1; Ainda no arquivo events.cpp procure por: } else if (methodName == "onGainSkillTries") { playerOnGainSkillTries = event; Coloque isso abaixo: } else if (methodName == "onToggleMount") { playerOnToggleMount = event; Ainda no arquivo events.cpp procure por: void Events::eventPlayerOnGainSkillTries(Player* player, skills_t skill, uint64_t& tries) No Final dessa função coloque isso abaixo: bool Events::eventPlayerOnToggleMount(Player* player, uint8_t mountid, bool mounting) { // Player:onToggleMount(mountid, mounting) if (playerOnToggleMount == -1) { return true; } if (!scriptInterface.reserveScriptEnv()) { std::cout << "[Error - Events::eventPlayerOnToggleMount] Call stack overflow" << std::endl; return false; } ScriptEnvironment* env = scriptInterface.getScriptEnv(); env->setScriptId(playerOnToggleMount, &scriptInterface); lua_State* L = scriptInterface.getLuaState(); scriptInterface.pushFunction(playerOnToggleMount); LuaScriptInterface::pushUserdata<Player>(L, player); LuaScriptInterface::setMetatable(L, -1, "Player"); lua_pushnumber(L, mountid); LuaScriptInterface::pushBoolean(L, mounting); return scriptInterface.callFunction(3); } Vá no arquivo events.h procure por: void eventPlayerOnGainSkillTries(Player* player, skills_t skill, uint64_t& tries); Coloque isso abaixo: bool eventPlayerOnToggleMount(Player* player, uint8_t mountid, bool mounting); Ainda no arquivo events.h procure por: int32_t playerOnGainSkillTries; Coloque isso abaixo: int32_t playerOnToggleMount; Vá no arquivo game.cpp procure por: player->resetIdleTime(); Embaixo de uma quebra de linha e coloque isso abaixo: const Position& currentPos = player->getPosition(); Position destPos = getNextPosition(direction, currentPos); const CreatureEventList& moveEvents = player->getCreatureEvents(CREATURE_EVENT_MOVE); for (CreatureEvent* moveEvent : moveEvents) { if (!moveEvent->executeOnMove(player, currentPos, destPos)) { player->sendCancelWalk(); return; } } Vá no arquivo player.cpp procure por: bool Player::toggleMount(bool mount) return false; } Coloque isso abaixo: if (!g_events->eventPlayerOnToggleMount(this, currentMountId, mount)) { return false; } Ainda no arquivo player.cpp procure por: bool Player::toggleMount(bool mount) return false; } Coloque isso abaixo: uint8_t currentMountId = getCurrentMount(); if (!g_events->eventPlayerOnToggleMount(this, currentMountId, mount)) { return false; } Bom aqui acabamos o sistema na source vamos para á parte de programação lua no datapack. Instale essa Lib no seu servidor: FlyingMounts = {65} -- Mounts in this table are going to force fly when mounting/dismounting. PvpRestrictions = "high" -- You can set 3 different types of pvp restrictions -- None: ---- Nothing will be done, the players can attack each other anytime while flying. -- Medium: -- The players can attack each other while flying, but they cant start flying if they already have pz and they will have a huge interval (configurable) to go up and down. The interval is only applied to the people with PZ locked. -- High: ---- Players can't attack each other while flying at all and they cant start flying as in medium. This could be abused to escape from pks as you can't be attacked by them while flying. ChangeFloorInterval = 2 -- seconds ChangeFloorIntervalPZ = 10 -- seconds, only in medium restriction. function Position:createFlyFloor() local toTile = Tile(self) if not toTile or not toTile:getItems() or not toTile:getGround() then doAreaCombatHealth(0, 0, self, 0, 0, 0, CONST_ME_NONE) Game.createItem(460, 1, self) end end function Tile:hasValidGround() local ground = self:getGround() local nilitem = self:getItemById(460) if ground and not nilitem then return true end return false end function Player:activateFly() self:setStorageValue(16400, 1) self:registerEvent("FlyEvent") return true end function Player:deactivateFly() local can, floor = self:canDeactivateFly() local pos = self:getPosition() if can then local curtile = Tile(pos) local itemfloor = curtile:getItemById(460) if itemfloor then itemfloor:remove() end self:setStorageValue(16400, -1) self:unregisterEvent("FlyEvent") if pos.z ~= floor then pos.z = floor self:teleportTo(pos) pos:sendMagicEffect(CONST_ME_TELEPORT) end end return can end function Player:isFlying() return self:getStorageValue(16400) == 1 end function Player:canDeactivateFly() local pos = self:getPosition() for z = pos.z, 15 do local tmp = Tile(pos.x, pos.y, z) if tmp and tmp:hasValidGround() then if self:canFlyDown(z) then return true, z else return false end end end return false end function Player:canFlyUp() local pos = self:getPosition() local tmp = Tile(pos.x, pos.y, pos.z-1) if tmp and tmp:hasValidGround() then return false end return true end function Player:canFlyDown(floor) local pos = self:getPosition() local tmp = Tile(pos) if floor and floor == pos.z then return true end if tmp:hasValidGround() then return false end tmp = Tile(pos.x, pos.y, floor or pos.z+1) if tmp and (tmp:getHouse() or tmp:hasFlag(TILESTATE_PROTECTIONZONE) or tmp:hasFlag(TILESTATE_FLOORCHANGE) or tmp:hasFlag(TILESTATE_BLOCKSOLID)) then return false end return true end function Player:flyUp() if self:isFlying() then if self:canFlyUp() then local pos = self:getPosition() local tile = Tile(pos) local itemfloor = tile:getItemById(460) if itemfloor then itemfloor:remove() end pos.z = pos.z-1 pos:createFlyFloor() self:teleportTo(pos) pos:sendMagicEffect(CONST_ME_TELEPORT) return true end return false else self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You are not flying.") end end function Player:flyDown() if self:isFlying() then if self:canFlyDown() then local pos = self:getPosition() local tile = Tile(pos) local itemfloor = tile:getItemById(460) if itemfloor then itemfloor:remove() end pos.z = pos.z+1 pos:createFlyFloor() self:teleportTo(pos) pos:sendMagicEffect(CONST_ME_TELEPORT) return true end return false else self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You are not flying.") end end Agora em creaturescripts instale: -- <event type="move" name="FlyEvent" script="flyevent.lua" /> function onMove(player, fromPosition, toPosition) if PvpRestrictions:lower() == "high" and player:isPzLocked() then return true end if player:isFlying() then local fromTile = Tile(fromPosition) local fromItem = fromTile:getItemById(460) if fromItem then fromItem:remove() end toPosition:createFlyFloor() end return true end Agora em talkactions instale: -- <talkaction words="!down" script="fly.lua" /> -- <talkaction words="!up" script="fly.lua" /> local exhauststorage = 16500 function onSay(player, words) if not player:isFlying() then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You are not flying.") return false end if player:isPzLocked() and PvpRestrictions:lower() == "high" then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You cannot use this command in fight.") return false end local last = player:getStorageValue(exhauststorage) local interval = ChangeFloorInterval if PvpRestrictions:lower() == "medium" and player:isPzLocked() then interval = ChangeFloorIntervalPZ end if last+interval > os.time() then player:sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED) return false end if words == "!up" then local ret = player:flyUp() if ret == false then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You cannot fly up.") else player:setStorageValue(exhauststorage, os.time()) end elseif words == "!down" then local ret = player:flyDown() if ret == false then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You cannot fly down.") else player:setStorageValue(exhauststorage, os.time()) end end return false end Agora em data/events/events.xml troque: <event class="Creature" method="onTargetCombat" enabled="0" /> Por: <event class="Player" method="onToggleMount" enabled="1" /> Agora em events/scripts/creature.lua troque á função onTargetCombat por: function Creature:onTargetCombat(target) if self and target then if PvpRestrictions:lower() == "high" then if self:isPlayer() and self:isFlying() then local pos = self:getPosition() local tile = Tile(pos) if tile:getItemById(460) then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end if target:isPlayer() and target:isFlying() then local pos = target:getPosition() local tile = Tile(pos) if tile:getItemById(460) then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end end return true end Agora em events/scripts/player.lua adicione á função: function Player:onToggleMount(mountid, mount) if mount then if isInArray(FlyingMounts, mountid) then if isInArray({"high", "medium"}, PvpRestrictions:lower()) and self:isPzLocked() then self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You cannot start flying now.") return false end self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You are now flying.") self:activateFly() end elseif self:isFlying() then local ret = self:deactivateFly() if ret then self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You are no longer flying.") else self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You can't deactivate fly now.") end return ret end return true end Agora coloque em logout.lua encima da função onLogout(player) : if player:isFlying() then player:sendCancelMessage("You cannot logout while flying.") return false end Pronto só Compilar á source e utilizar o sistema. Créditos DarkWore (5% Por trazer ao Xtibia) Mkalo (95% Por Desenvolver)
-
Bom Saiba que o REP+ não é porque não quero então por mim teria eternamente, xd Abraço do Padrinho ^^
-
Nossa @Bennyyw vai ser foda em outro lugar muito obrigado cara só me diz ae porque não consigo dar REP+ nem receber?
-
Já que o @Bennyyw pediu pra dar um UP Nessa sessão la vamos noix queria fazer um pedido de assinatura e foto de perfil personalizada Nome: DarkWore Tema: Cenário do céu á noite com Lua. Tipografia: DarkWore, Embaixo Escrito Programador C++ e Lua. Tamanho de Assinatura e Foto Padrão do Fórum PREFERENCIAS: @Bennyyw, @Tony ou @VelhoBarreiro Agradeço se puder fazer e mesmo se não tiver como não tem problema, grande abraço.
-
Que isso Benny eu tinha falado com o @Frenvius que ia dar uma força na sessão de programação do fórum. Abraço do Padrinho ^^
-
Entre em Contato via PM. (estou fazendo freelancer, xd)
-
Então é Dois Tony, @VelhoBarreiro tem como fazer pra mim e o Tony? se possível eu gostaria de ter uma Assinatura com uma imagem sua Nome: DarkWore Tema: Cenário do céu á noite com Lua. Tipografia: DarkWore, Embaixo Escrito Programador C++ e Lua. Agradeço se puder fazer e mesmo se não tiver como não tem problema, grande abraço.
-
Hoje venho postar o Race System para TFS 1.2 que desenvolvi um tempo atrás para um amigo e hoje venho postar ele aqui talvez possa ajudar os que estão começando. Vá no arquivo const.h procure por: enum TextColor_t : uint8_t { Logo abaixo procure por: TEXTCOLOR_FAIRY = 190, Coloque isso abaixo: TEXTCOLOR_WATER = 11, TEXTCOLOR_NORMAL = 128, TEXTCOLOR_FIRE2 = 180, TEXTCOLOR_FIGHTING = 114, TEXTCOLOR_FLYING = 131, TEXTCOLOR_GRASS = 66, TEXTCOLOR_POISON = 147, TEXTCOLOR_ELECTRIC = 210, TEXTCOLOR_GROUND = 126, TEXTCOLOR_PSYCHIC = 149, TEXTCOLOR_ROCK = 120, TEXTCOLOR_STEEL = 120, TEXTCOLOR_ICE = 35, TEXTCOLOR_BUG = 18, TEXTCOLOR_DRAGON = 220, TEXTCOLOR_GHOST = 219, TEXTCOLOR_DARK = 219, Agora vá no arquivo enums.h procure por: enum RaceType_t : uint8_t { Logo abaixo procure por: RACE_ENERGY, Coloque isso abaixo: RACE_WATER = 6, RACE_NORMAL = 7, RACE_FIRE2 = 8, RACE_FIGHTING = 9, RACE_FLYING = 10, RACE_GRASS = 11, RACE_POISON = 12, RACE_ELECTRIC = 13, RACE_GROUND = 14, RACE_PSYCHIC = 15, RACE_ROCK = 16, RACE_ICE = 17, RACE_BUG = 18, RACE_DRAGON = 19, RACE_GHOST = 20, RACE_STEEL = 21, RACE_FAIRY = 22, RACE_DARK = 23, Agora em monsters.cpp procure por: if ((attr = monsterNode.attribute("race"))) { stdstring tmpStrValue = asLowerCaseString(attr.as_string()); uint16_t tmpInt = pugicast<uint16_t>(attr.value()); Logo abaixo procure por: } else if (tmpStrValue == "energy" || tmpInt == 5) { mType->info.race = RACE_ENERGY; Coloque isso abaixo: } else if (tmpStrValue == "water" || tmpInt == 6) { mType->info.race = RACE_WATER; } else if (tmpStrValue == "normal" || tmpInt == 7) { mType->info.race = RACE_NORMAL; } else if (tmpStrValue == "fire2" || tmpInt == 8) { mType->info.race = RACE_FIRE2; } else if (tmpStrValue == "fighting" || tmpInt == 9) { mType->info.race = RACE_FIGHTING; } else if (tmpStrValue == "flying" || tmpInt == 10) { mType->info.race = RACE_FLYING; } else if (tmpStrValue == "grass" || tmpInt == 11) { mType->info.race = RACE_GRASS; } else if (tmpStrValue == "poison" || tmpInt == 12) { mType->info.race = RACE_POISON; } else if (tmpStrValue == "electric" || tmpInt == 13) { mType->info.race = RACE_ELECTRIC; } else if (tmpStrValue == "ground" || tmpInt == 14) { mType->info.race = RACE_GROUND; } else if (tmpStrValue == "psychic" || tmpInt == 15) { mType->info.race = RACE_PSYCHIC; } else if (tmpStrValue == "rock" || tmpInt == 16) { mType->info.race = RACE_ROCK; } else if (tmpStrValue == "ice" || tmpInt == 17) { mType->info.race = RACE_ICE; } else if (tmpStrValue == "bug" || tmpInt == 18) { mType->info.race = RACE_BUG; } else if (tmpStrValue == "dragon" || tmpInt == 19) { mType->info.race = RACE_DRAGON; } else if (tmpStrValue == "ghost" || tmpInt == 20) { mType->info.race = RACE_GHOST; } else if (tmpStrValue == "fairy" || tmpInt == 21) { mType->info.race = RACE_FAIRY; } else if (tmpStrValue == "steel" || tmpInt == 22) { mType->info.race = RACE_STEEL; } else if (tmpStrValue == "dark" || tmpInt == 23) { mType->info.race = RACE_DARK; Por Fim vá em game.cpp procure por: void GamecombatGetTypeInfo(CombatType_t combatType, Creature* target, TextColor_t& color, uint8_t& effect){ switch (combatType) { case COMBAT_PHYSICALDAMAGE: { Item* splash = nullptr; switch (target->getRace()) { Logo abaixo procure por: case RACE_ENERGY: color = TEXTCOLOR_PURPLE; effect = CONST_ME_ENERGYHIT; break; Coloque isso abaixo: case RACE_WATER: color = TEXTCOLOR_WATER; effect = CONST_ME_DRAWBLOOD; break; case RACE_NORMAL: color = TEXTCOLOR_NORMAL; effect = CONST_ME_DRAWBLOOD; break; case RACE_FIRE2: color = TEXTCOLOR_FIRE2; effect = CONST_ME_DRAWBLOOD; break; case RACE_FIGHTING: color = TEXTCOLOR_FIGHTING; effect = CONST_ME_DRAWBLOOD; break; case RACE_FLYING: color = TEXTCOLOR_FLYING; effect = CONST_ME_DRAWBLOOD; break; case RACE_GRASS: color = TEXTCOLOR_GRASS; effect = CONST_ME_DRAWBLOOD; break; case RACE_POISON: color = TEXTCOLOR_POISON; effect = CONST_ME_DRAWBLOOD; break; case RACE_ELECTRIC: color = TEXTCOLOR_ELECTRIC; effect = CONST_ME_DRAWBLOOD; break; case RACE_GROUND: color = TEXTCOLOR_GROUND; effect = CONST_ME_DRAWBLOOD; break; case RACE_PSYCHIC: color = TEXTCOLOR_PSYCHIC; effect = CONST_ME_DRAWBLOOD; break; case RACE_ROCK: color = TEXTCOLOR_ROCK; effect = CONST_ME_DRAWBLOOD; break; case RACE_ICE: color = TEXTCOLOR_ICE; effect = CONST_ME_DRAWBLOOD; break; case RACE_BUG: color = TEXTCOLOR_BUG; effect = CONST_ME_DRAWBLOOD; break; case RACE_DRAGON: color = TEXTCOLOR_DRAGON; effect = CONST_ME_DRAWBLOOD; break; case RACE_GHOST: color = TEXTCOLOR_GHOST; effect = CONST_ME_DRAWBLOOD; break; case RACE_DARK: color = TEXTCOLOR_DARK; effect = CONST_ME_DRAWBLOOD; break; case RACE_FAIRY: color = TEXTCOLOR_FAIRY; effect = CONST_ME_DRAWBLOOD; break; case RACE_STEEL: color = TEXTCOLOR_STEEL; effect = CONST_ME_DRAWBLOOD; break; Pronto agora só compilar com Visual Studio e Pronto. PS: Não Autorizo postar em outro fórum, conteúdo exclusivo do xtibia se postar pedirei para o Administrador do fórum remover.
-
Tem Muitos furos nesse seu pedido, incluindo o mais importante, versão do servidor.
-
[PXG]Mudar outfit automaticamente + npc
tópico respondeu ao Drk Shadow de DarkWore em CreatureScripts e Movements
Estou meio sem tempo para postar conteúdo por estar fazendo meu servidor de pokémon do zero e todos os sistemas zerados em um Console Zerado então fica meio difícil assim que possível trago conteúdo á sessão de programação c++. Abraço do Padrinho ^^
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.