Jump to content

leoloko12

Member
  • Content Count

    147
  • Joined

  • Last visited

7 Followers

About leoloko12

  • Rank
    LeozeraRox
  • Birthday 02/01/1996

Profile Information

  • Gender
    Masculino
  • I am
    Tibiano

Recent Profile Visitors

4705 profile views
  1. @Vodkart Com base nesse script que você fez, conseguiria adaptar este abaixo para aceitar no máximo 2 players por sqm? No momento ele aceita so 1. local position = {x = 172, y = 222, z = 7} -- posicao da primeira pos (linha 1 coluna 1) local config = { distX= 4, -- distancia em X entre cada sala (de uma mesma linha) distY= 8, -- distancia em Y entre cada sala (de uma mesma coluna) rX= 14, -- numero de colunas rY= 4 -- numero de linhas } local storage = 184819 -- storage que salva a ultima vez que o player entrou (pra evitar spams) local function isWalkable(pos, creature, proj, pz)-- by Nord -- só adicione se vc já não tiver ela if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end local function check_disponivel(npos) if isWalkable(npos, true, true) then return true end return false end local function countdown(pos, Arraypos) if not check_disponivel(pos) then for lugares = 1, #Arraypos do creature = getTopCreature(Arraypos[lugares]).uid if not isCreature(creature)then doSendAnimatedText(Arraypos[lugares], "GO!!", TEXTCOLOR_ORANGE) doSendMagicEffect(Arraypos[lugares], 10) end end end end local function fazQualquerCoisa(cid, pos, i, j) -- isso é o coração do nosso script, nao mexa nisso j = j or 0 p = i or 0 if p >= config.rX then p = 0 j = j < config.rY -1 and j + 1 or false end if j then posi = {x = pos.x + ( p * config.distX), y = pos.y + (j * config.distY), z = pos.z} if check_disponivel(posi) then doTeleportThing(cid, posi) doSendMagicEffect(posi, 10) countdown(posi, {{x = posi.x - 1, y = posi.y + 1, z = posi.z}, {x = posi.x + 1 , y = posi.y + 1, z = posi.z}}) else fazQualquerCoisa(cid, pos, p + 1, j) end else newnPosiion = {x=194, y=231, z=6} doTeleportThing(cid,newnPosiion) doSendMagicEffect(newnPosiion,10) end end function onStepIn(cid, item, pos, lastPos, fromPos, toPos, actor) if getPlayerStorageValue(cid, storage) - os.time() <= 0 then fazQualquerCoisa(cid, position) else doTeleportThing(cid, fromPos) doPlayerSendCancel(cid, "You gotta wait a 10 seconds before you can enter trainning room again") end return true end
  2. Boa tarde! Preciso de um script que conte quantos players estão no sqm. Se for 0 ou 1, solte a mensagem: "Bem vindo" Se for 2, solte a mensagem: "Ocupado" Obrigado desde já.
  3. @maleskinho Poderia arrumar para mim? não consigo. Talkaction.h //////////////////////////////////////////////////////////////////////// // OpenTibia - an opensource roleplaying game //////////////////////////////////////////////////////////////////////// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. //////////////////////////////////////////////////////////////////////// #ifndef __TALKACTION__ #define __TALKACTION__ #include "otsystem.h" #include "enums.h" #include "player.h" #include "tools.h" #include "luascript.h" #include "baseevents.h" enum TalkActionFilter { TALKFILTER_QUOTATION, TALKFILTER_WORD, TALKFILTER_WORD_SPACED, TALKFILTER_LAST }; class TalkAction; typedef std::map<std::string, TalkAction*> TalkActionsMap; class TalkActions : public BaseEvents { public: TalkActions(); virtual ~TalkActions(); bool onPlayerSay(Creature* creature, uint16_t channelId, const std::string& words, bool ignoreAccess); inline TalkActionsMap::const_iterator getFirstTalk() const {return talksMap.begin();} inline TalkActionsMap::const_iterator getLastTalk() const {return talksMap.end();} protected: TalkAction* defaultTalkAction; TalkActionsMap talksMap; virtual std::string getScriptBaseName() const {return "talkactions";} virtual void clear(); virtual Event* getEvent(const std::string& nodeName); virtual bool registerEvent(Event* event, xmlNodePtr p, bool override); virtual LuaInterface& getInterface() {return m_interface;} LuaInterface m_interface; }; typedef bool (TalkFunction)(Creature* creature, const std::string& words, const std::string& param); class TalkAction : public Event { public: TalkAction(const TalkAction* copy); TalkAction(LuaInterface* _interface); virtual ~TalkAction() {} virtual bool configureEvent(xmlNodePtr p); virtual bool loadFunction(const std::string& functionName); int32_t executeSay(Creature* creature, const std::string& words, std::string param, uint16_t channel); std::string getFunctionName() const {return m_functionName;} std::string getWords() const {return m_words;} void setWords(const std::string& words) {m_words = words;} TalkActionFilter getFilter() const {return m_filter;} uint32_t getAccess() const {return m_access;} int32_t getChannel() const {return m_channel;} StringVec getExceptions() {return m_exceptions;} TalkFunction* getFunction() {return m_function;} bool isLogged() const {return m_logged;} bool isHidden() const {return m_hidden;} bool isSensitive() const {return m_sensitive;} bool hasGroups() const {return !m_groups.empty();} bool hasGroup(int32_t value) const {return std::find(m_groups.begin(), m_groups.end(), value) != m_groups.end();} IntegerVec::const_iterator getGroupsBegin() const {return m_groups.begin();} IntegerVec::const_iterator getGroupsEnd() const {return m_groups.end();} protected: virtual std::string getScriptEventName() const {return "onSay";} virtual std::string getScriptEventParams() const {return "cid, words, param, channel";} static TalkFunction houseBuy; static TalkFunction houseSell; static TalkFunction houseKick; static TalkFunction houseDoorList; static TalkFunction houseGuestList; static TalkFunction houseSubOwnerList; static TalkFunction guildJoin; static TalkFunction guildCreate; static TalkFunction thingProporties; static TalkFunction banishmentInfo; static TalkFunction diagnostics; static TalkFunction ghost; static TalkFunction software; std::string m_words, m_functionName; TalkFunction* m_function; TalkActionFilter m_filter; uint32_t m_access; int32_t m_channel; bool m_logged, m_hidden, m_sensitive; StringVec m_exceptions; IntegerVec m_groups; }; #endif luascript.cpp https://pastebin.com/KVKitnRV
  4. @FlavioHulk Spells tipo utani hur? time ring? boots of haste? Ou algo mais específico?
  5. @FlavioHulk Pelo erro, poderia me falar a natureza desse script? para que eu possa encontra-lo e remove-lo?
  6. @FlavioHulk Mudei de acordo com o Dragon Ball Hiper, ja que minha source é OTX 2. Continua insegura?
  7. @Dragon Ball Hiper Fiz a mudança, vamos ver. Obrigado mesmo assim. REP
  8. @Dragon Ball Hiper Obrigado, mas queria saber o que faz causar isso... Porque aconteceu do nada. Eu precisava testar para ver se arrumou.
  9. @Dragon Ball Hiper O que isso vai fazer? OTX 2
  10. @Dragon Ball Hiper https://hastebin.com/xaquyonexa.php
  11. @FlavioHulk Pode me explicar porque o server caiu e o que você mudou?
  12. Olá amigos. Estou com um problema. Do nada o server deu esse erro. "Segmentation Fault" Então gerei o log do gdb: 0x00000000004e8465 in Game::changeSpeed (this=<optimized out>, creature=creature@entry=0x227ca00, varSpeed=<optimized out>) at game.cpp:4577 4577 spectator->getPlayer()->sendChangeSpeed(creature, creature->getStepSpeed()); (gdb) bt #0 0x00000000004e8465 in Game::changeSpeed (this=<optimized out>, creature=creature@entry=0x227ca00, varSpeed=<optimized out>) at game.cpp:4577 #1 0x000000000051ce2c in ConditionSpeed::endCondition (this=0x14f598a0, creature=0x227ca00, reason=<optimized out>) at condition.cpp:1451 #2 0x000000000059ca4a in removeConditions (reason=CONDITIONEND_CLEANUP, onlyPersistent=false, this=0x227ca00) at creature.cpp:1568 #3 Creature::~Creature (this=0x227ca00, __vtt_parm=<optimized out>, __in_chrg=<optimized out>) at creature.cpp:93 #4 0x00000000005c1954 in Player::~Player (this=this@entry=0x227ca00, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at player.cpp:137 #5 0x00000000005c1999 in Player::~Player (this=0x227ca00, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at player.cpp:161 #6 0x000000000042a1d7 in unRef (this=<optimized out>) at thing.h:110 #7 Monster::onCreatureLeave (this=0x10626d80, creature=0x227ca00) at monster.cpp:373 #8 0x000000000042d107 in Monster::onCreatureMove (this=0x10626d80, creature=0x227ca00, newTile=<optimized out>, newPos=..., oldTile=<optimized out>, oldPos=..., teleport=false) at monster.cpp:202 #9 0x00000000004d6eb1 in Tile::moveCreature (this=0x2c09e5c0, actor=actor@entry=0x0, creature=creature@entry=0x227ca00, toCylinder=toCylinder@entry=0x2c0a5720, forceTeleport=forceTeleport@entry=false) at tile.cpp:487 #10 0x00000000004e7f8f in Game::internalMoveCreature (this=0x88bb40 <g_game>, actor=actor@entry=0x0, creature=0x227ca00, fromCylinder=fromCylinder@entry=0x2c09e5c0, toCylinder=toCylinder@entry=0x2c0a5720, flags=flags@entry=1, forceTeleport=forceTeleport@entry=false) at game.cpp:1331 #11 0x000000000057e7e5 in LuaInterface::luaDoRelocate (L=0x228b700) at luascript.cpp:4275 #12 0x00007ffff7bb8f78 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #13 0x00007ffff7bc36af in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #14 0x00007ffff7bb93cd in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #15 0x00007ffff7bb86eb in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #16 0x00007ffff7bb955a in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #17 0x00007ffff7bb534d in lua_pcall () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #18 0x000000000055b0b6 in LuaInterface::callFunction (this=0x13f4690, params=params@entry=7) at luascript.cpp:980 #19 0x000000000048149a in MoveEvent::executeStep (this=0xd7c6370, actor=0x0, creature=0x1c7de00, item=<optimized out>, pos=..., fromPos=..., toPos=...) at movement.cpp:1235 #20 0x0000000000483f60 in MoveEvents::onCreatureMove (this=0x13f4680, actor=actor@entry=0x0, creature=creature@entry=0x1c7de00, fromTile=fromTile@entry=0x2c09e5c0, toTile=<optimized out>, isStepping=isStepping@entry=false) at movement.cpp:607 #21 0x00000000004d5dc5 in Tile::postRemoveNotification (this=0x2c09e5c0, actor=0x0, thing=0x1c7e7d8, newParent=0x2c0a5720, index=2, isCompleteRemoval=<optimized out>) at tile.cpp:1566 #22 0x00000000004d6f00 in Tile::moveCreature (this=0x2c09e5c0, actor=actor@entry=0x0, creature=creature@entry=0x1c7de00, toCylinder=toCylinder@entry=0x2c0a5720, forceTeleport=forceTeleport@entry=false) at tile.cpp:489 #23 0x00000000004e7f8f in Game::internalMoveCreature (this=this@entry=0x88bb40 <g_game>, actor=actor@entry=0x0, creature=creature@entry=0x1c7de00, fromCylinder=fromCylinder@entry=0x2c09e5c0, toCylinder=0x2c0a5720, flags=flags@entry=32, forceTeleport=forceTeleport@entry=false) at game.cpp:1331 #24 0x00000000004e814d in Game::internalMoveCreature (this=0x88bb40 <g_game>, creature=creature@entry=0x1c7de00, direction=<optimized out>, flags=32) at game.cpp:1309 #25 0x000000000059e254 in Creature::onWalk (this=0x1c7de00) at creature.cpp:265 #26 0x00000000004e6bf2 in Game::checkCreatureWalk (this=0x88bb40 <g_game>, creatureId=<optimized out>) at game.cpp:4478 #27 0x000000000059dfa8 in Creature::addEventWalk (this=this@entry=0x1c7de00, firstStep=<optimized out>) at creature.cpp:350 Python Exception <class 'IndexError'> list index out of range: #28 0x000000000059e2b6 in Creature::startAutoWalk (this=this@entry=0x1c7de00, listDir=std::list) at creature.cpp:335 #29 0x00000000004e13e6 in Game::playerMove (this=<optimized out>, playerId=<optimized out>, dir=EAST) at game.cpp:2314 #30 0x000000000048b740 in operator() (this=0x330955e0) at /usr/include/boost/function/function_template.hpp:767 #31 operator() (this=0x330955d0) at dispatcher.h:34 #32 Dispatcher::dispatcherThread (this=0x889780 <Dispatcher::getInstance()::dispatcher>) at dispatcher.cpp:64 #33 0x00007ffff79a2a4a in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0 #34 0x00007ffff597a184 in start_thread (arg=0x7ffff2d74700) at pthread_create.c:312 #35 0x00007ffff56a703d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Me ajudem. Dou REP +. Desde já obrigado.
  13. Olá gostaria de saber onde configurar ou de algum script para permitir que o player mande pm só depois do level 50. obrigado

Open Tibia Server

Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia começando do zero.

Redes Sociais

Anuncie no Tibia King

Precisa de mais visibilidade em seus projetos? Quer fazer um plano publicitário para o seu servidor? Anuncie no Tibia King e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução!

×
×
  • Create New...