Tudo que MarceLoko postou
-
ajuda com função "moveTo"
Bom dia! Preciso de uma função que faça a creature ir andando até a position do parâmetro Eu a fiz: int32_t LuaScriptInterface::luaMoveTo(lua_State* L) { //creature:moveTo(pos) Creature* creature = getUserdata<Creature>(L, 1); if (!creature) { lua_pushnil(L); return 1; } const Position& position = getPosition(L, 2); FindPathParams fpp; fpp.minTargetDist = getNumber<int32_t>(L, 3, 0); fpp.maxTargetDist = getNumber<int32_t>(L, 4, 1); fpp.fullPathSearch = getBoolean(L, 5, fpp.fullPathSearch); fpp.clearSight = getBoolean(L, 6, fpp.clearSight); fpp.maxSearchDist = getNumber<int32_t>(L, 7, 150); std::forward_list<Direction> dirList; if (creature->getPathTo(position, dirList, fpp)) { creature->hasFollowPath = true; creature->startAutoWalk(dirList); pushBoolean(L, true); } else { pushBoolean(L, false); } return 1; } Todos os players e NPCs se movem diretamente para a position inserida, exceto os monstros (que são o motivo do trabalho -.-) Dentro de um pequeno range, o monstro obedece e vai. Mais que isso, ele ignora a ordem e apenas dá um passo aleatório. Obrigado.
-
PVP DEDINHO, Foxworld, with crosshair
tira o botão "use on target" mas você precisa criar um mecanismo que apenas o seu cliente proprio possa se conectar ao server, além de que deve ser uma modificação no C++ e não no lua, pois lua qualquer um pode editar
-
[OTC] MOD que deixa o OTC exclusivo para seu servidor.
Em .lua não me parece util, interessante é o que fiz, um validor desse embutido no C++, pois assim você pode desligar os bots escritos em .lua (candybot e novos que sairam) Melhor ainda se tiver uma criptografia xD
-
PVP DEDINHO, Foxworld, with crosshair
exatamente
-
Servidor Online busca criador de conteúdo
Bom dia! Possuo um servidor online há alguns meses que já conta com uma base de players. Entretanto muitos deles são inativos, pois não há mais conteúdo e não posso criar. Busco alguém interessado em editar e criar conteúdo a partir da base do servidor: http://www.tibiaking.com/forum/topic/32469-evolutions-server/ O interessado deve ter noção de mapping e scripting, ao menos para poder configurar quests, avalancas etc O conteúdo não precisa ser próprio, poderá ser partes do global e de mapas disponíveis para download. O interessado terá que revisar todo o conteúdo presente e avaliar a progressão do jogo (itens disponíveis em quests) para criar um servidor diferente que desfrute de toda possibilidade do Tibia O interessado não possuirá nenhum compromisso com custeio do servidor e receberá cargo administrativo no jogo. Me comprometo em criar sistemas adicionais como Castle War Battle, dungeons como em WoW, Forsaken etc apenas preciso do conteúdo. Abraço!
-
PVP DEDINHO, Foxworld, with crosshair
Pra isso só criando um OTClient, o servidor não identifica se vc uso por crosshair ou direto no target: bool isHotkey = (pos.x == 0xFFFF && pos.y == 0 && pos.z == 0); isso significa que o servidor só sabe que usou a partir de uma hotkey.
-
PVP DEDINHO, Foxworld, with crosshair
function onCastSpell(cid, var) if isPlayer(getCreatureTarget(cid)) == TRUE and getCreatureTarget(cid) ~= getTopCreature(variantToPosition(var)).uid then doPlayerSendCancel(cid, "You can not shoot this directly on players.") return FALSE end return doCombat(cid, combat, var) end me parece ser o mais adequado... de qualquer forma, vc nunca poderá atirar a sd pela tela se o player estiver marcado como seu target desculpa nao testar, pois nem ao menos tenho servidor que nao seja 1.x aqui o ideal é realmente mexer na source, e é bem melhor e simples
-
PVP DEDINHO, Foxworld, with crosshair
Sistema bem incompleto, pois só poderá usar a runa caso você não estiver com o target no player. Caso seja um TFS 1.x, você pode apenas mudar no config.lua: hotkeyAimbotEnabled = false porém você não tem a liberdade de escolhe apenas a SD por exemplo para tal, uma pequena modificação no game.cpp é suficiente
-
O atual cenário OTserv
Não jogaria, duvido que eu tenha alguma experiência nova jogando um otserv normal, mesmo que mude o mapa.
-
Monstros Passivos
Boa noite! Requerido TFS 1.x http://www.tibiaking.com/forum/topic/60768-monster-onselecttargetself-target/ Segue dois códigos de monstro passivo: Monstro que ataca ao ser atacado: function onSelectTarget(self, target) if target:getTarget() == self then return true end return false end Monstro que só atacam jogadores fortes: function onSelectTarget(self, target) if target:getLevel() >= 100 then return true end return false end Coloque um desses códigos em um arquivo lua em data/monster/scripts Abra o xml do monstro e insira após manacost: script="arquivo.lua" Abraço!
-
[TFS 1.2] Monster onSelectTarget(self, target)
Testado em TFS 1.2 Pequeno exemplo de utilização: function onSelectTarget(self, target) -- monstros da race VENOM não atacam jogadores abaixo do level 100 if self:getRace() == RACE_VENOM and target:getLevel() >= 100 then return true end return false end Dica: você pode utilizar o método :getTargetList() para saber quem mais é um alvo possível do monstro.
-
[TFS 1.2] Monster onSelectTarget(self, target)
Boa noite! Este código torna possível incluir algum script quando o monstro escolhe um alvo. Testado em TFS 1.2 monster.cpp ache: bool Monster::selectTarget(Creature* creature) substitua: bool Monster::selectTarget(Creature* creature) { if (!isTarget(creature)) { return false; } auto it = std::find(targetList.begin(), targetList.end(), creature); if (it == targetList.end()) { //Target not found in our target list. return false; } if (isHostile() || isSummon()) { if (executeOnSelectTarget(creature) == 1){ if (setAttackedCreature(creature) && !isSummon()) { g_dispatcher.addTask(createTask(std::bind(&Game::checkCreatureAttack, &g_game, getID()))); } } else return false; } return setFollowCreature(creature); } bool Monster::executeOnSelectTarget(Creature* creature){ // onSelectTarget(self, target) if (mType->targetEvent != -1) { LuaScriptInterface* scriptInterface = mType->scriptInterface; if (!scriptInterface->reserveScriptEnv()) { std::cout << "[Error - Monster::onSelectTarget] Call stack overflow" << std::endl; return true; } ScriptEnvironment* env = scriptInterface->getScriptEnv(); env->setScriptId(mType->targetEvent, scriptInterface); lua_State* L = scriptInterface->getLuaState(); scriptInterface->pushFunction(mType->targetEvent); LuaScriptInterface::pushUserdata<Monster>(L, this); LuaScriptInterface::setMetatable(L, -1, "Monster"); LuaScriptInterface::pushUserdata(L, creature); LuaScriptInterface::setCreatureMetatable(L, -1, creature); return (scriptInterface->callFunction(2)); } return true; } monster.hache: bool selectTarget(Creature* creature); inclua: bool executeOnSelectTarget(Creature* creature); monsters.cpp: ache: scriptInterface = nullptr; creatureAppearEvent = -1; creatureDisappearEvent = -1; creatureMoveEvent = -1; creatureSayEvent = -1; thinkEvent = -1; inclua:targetEvent = -1; ache: mType->thinkEvent = scriptInterface->getEvent("onThink"); inclua: mType->targetEvent = scriptInterface->getEvent("onSelectTarget"); Em breve: Player onSelectTarget
-
Player( guid )
// Player(id or name or userdata) Player* player; if (isNumber(L, 2)) { if (getNumber<uint32_t>(L, 2) > 268435455) player = g_game.getPlayerByID(getNumber<uint32_t>(L, 2)); else player = g_game.getPlayerByGUID(getNumber<uint32_t>(L, 2)); } else if (isString(L, 2)) { troquei uma iteração por uma comparação.. acho valido
-
Servidor já online procura MAPPER
Boa noite! Procuro pessoas que possam me ajudar a remodelar o mapa do meu servidor. Estou com a intenção de colocar algumas hunts do global no mapa, mas seria ótimo locais novos e exclusivos. É a chance de tirar seu mapa do HD e deixá-lo online. Abraço.
-
Versão TFS mais recomendada
TFS 1.x é show de bola! Muitos reclamam da falta de alguns poucos recursos, mas não comentam dos muitos recursos adicionais que possui. Abraço.
-
[10.90] Vanaheim Global Opensource - TFS 1.2
Está faltando uma alteração nas sources: definitions.h #define CLIENT_VERSION_MIN 1077
- Ideia League of Legends Tibia
-
(Resolvido)Monstros atacar outros monstros
nem mesmo existe um summon na minha história. @topico Eu realmente estou desconsiderando utilizar este sistema, caso tenham curiosidade de colocar em prática, notarão que há mais algumas falhas no funcionamento. Obrigado a todos!
-
(Resolvido)Monstros atacar outros monstros
Boa noite! O problema não é eles andarem, sim atacar os outros. Utilizando :setTarget ou :selectTarget o monstro anda até o alvo e não hita. Portanto doTargetCombatHealth talvez possa resolver o problema. Vou testar. Obrigado!
-
(Resolvido)Monstros atacar outros monstros
up
-
(Resolvido)Monstros atacar outros monstros
Já havia feito. Não obtive sucesso.
-
(Resolvido)Monstros atacar outros monstros
Boa noite! Através da interface de scripts dos monstros, tentei que atacasse outro monstro (selvagem) seguindo um critério. Porém não tive sucesso, o monstros fica no follow chase e não ataca. Isso é realmente possivel, veja: http://3.ii.gl/67I2OovGJ.gif Abraço!
-
O que você acha de um OT 100% traduzido?
Boa noite! O OTClient envia um opcode ao entrar no servidor, falando qual linguagem o cliente está utilizando. Ficaria bacana se o servidor verificasse a linguagem do player antes de enviar as mensagens. Abraço!
-
Evolutions Server
Lua Script Error: [MoveEvents Interface] data/movements/scripts/didarenalevel.lua:onStepIn data/movements/scripts/didarenalevel.lua:5: attempt to perform arithmetic on a boolean value stack traceback: [C]: in function '__mul' data/movements/scripts/didarenalevel.lua:5: in function <data/movements/scripts/didarenalevel.lua:1> Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff59aa700 (LWP 14692)] 0x0000000000000000 in ?? () (gdb) bt full #0 0x0000000000000000 in ?? () No symbol table info available. #1 0x00000000008d3a56 in LuaScriptInterface::setCreatureMetatable(lua_State*, int, Creature const*) () No symbol table info available. #2 0x0000000000927f9c in LuaScriptInterface::luaCreatureCreate(lua_State*) () No symbol table info available. #3 0x00007ffff767d61d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #4 0x00007ffff76889b4 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #5 0x00007ffff767d989 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #6 0x00007ffff767cfac in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #7 0x00007ffff767dbc1 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #8 0x00007ffff7679c9d in lua_pcallk () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #9 0x00000000008d1e90 in LuaScriptInterface::protectedCall(lua_State*, int, int) () No symbol table info available. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff59aa700 (LWP 22838)] 0x00000000008d3a4a in LuaScriptInterface::setCreatureMetatable(lua_State*, int, Creature const*) () (gdb) bt full #0 0x00000000008d3a4a in LuaScriptInterface::setCreatureMetatable(lua_State*, int, Creature const*) () No symbol table info available. #1 0x0000000000927f9c in LuaScriptInterface::luaCreatureCreate(lua_State*) () No symbol table info available. #2 0x00007ffff767d61d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #3 0x00007ffff76889b4 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #4 0x00007ffff767d989 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #5 0x00007ffff767cfac in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #6 0x00007ffff767dbc1 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #7 0x00007ffff7679c9d in lua_pcallk () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 No symbol table info available. #8 0x00000000008d1e90 in LuaScriptInterface::protectedCall(lua_State*, int, int) () No symbol table info available. #9 0x00000000008d2c65 in LuaScriptInterface::callFunction(int) () No symbol table info available. #10 0x000000000097678f in MoveEvent::executeStep(Creature*, Item*, Position const&, Position const&) () No symbol table info available. #11 0x0000000000976629 in MoveEvent::fireStepEvent(Creature*, Item*, Position const&, Position const&) () No symbol table info available. #12 0x000000000097457c in MoveEvents::onCreatureMove(Creature*, Tile const*, Position const&, MoveEvent_t) () No symbol table info available. #13 0x0000000000a39a1a in Tile::postAddNotification(Thing*, Cylinder const*, int, cylinderlink_t) () No symbol table info available. #14 0x000000000095172c in Map::moveCreature(Creature&, Tile&, bool) () No symbol table info available. #15 0x0000000000847734 in Game::internalMoveCreature(Creature&, Tile&, unsigned int) () No symbol table info available. #16 0x00000000008476a8 in Game::internalMoveCreature(Creature*, Direction, unsigned int) () No symbol table info available.
-
[10.90] Vanaheim Global Opensource - TFS 1.2
Aqui a função de equipar itens por hotkey não funciona. Funciona pra alguém?