Ir para conteúdo

Doidodepeda

Membro
  • Registro em

  • Última visita

Tudo que Doidodepeda postou

  1. então galera, o efeito esta indo ↑ eu gostaria que o efeito estivesse voltando ↓ ( do efeito da magia para o personagem ) alguém poderia da essa força pf. e dizer onde que mudar. -- SpellCreator generated. -- =============== COMBAT VARS =============== -- Areas/Combat for 0ms local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{2}, {0}, {0}, {1}})) function getDmg_Brush(cid, level, maglevel) return (10)*-1,(20)*-1 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_FIRE,0,3} -- =============== CORE FUNCTIONS =============== local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part if (isCreature(cid)) then doCombat(cid, c, var) if (dirList ~= nil) then -- Emit distance effects local i = 2; while (i < #dirList) do doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) i = i + 2 end end end end function onCastSpell(cid, var) local startPos = getCreaturePosition(cid) RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos) return true end
  2. Doidodepeda postou uma resposta no tópico em Suporte Tibia OTServer
    Então galera, e um evento bem simples que quero pedir a quem possa ajudar. um evento que nasce um tp 3 vezes ao dia. esses plays vao para a salinha de espera. depois de 5 minutos de espera eles são teleportados para sala onde vão se matar. Chegar la... pal rolando. O ultimo que ficar vivo ganha uma premiação. Será q alguém pode bolar esse ''simples'' script pf ? tfs: 0.4
  3. Doidodepeda postou uma resposta no tópico em Suporte Tibia OTServer
    FUNCIONOU MAN, MUITO OBRIGADO !!!!!!!
  4. Doidodepeda postou uma resposta no tópico em Suporte Tibia OTServer
    Alguém poderia disponibilizar um script (movements).Tile que so passa 1 mc ? O cara tem 10 char logado no server. Eu so queria que passasse 1 nesse tile. Ja o segundo ..3...4...5 não conseguiriam passar pela tile. Pq os que eu achei aqui eles tem q deslogar os mcs pra poderem deslogar. tfs 0.4
  5. Funcionou !
  6. //////////////////////////////////////////////////////////////////////// // 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/>. //////////////////////////////////////////////////////////////////////// #include "otpch.h" #include <libxml/xmlmemory.h> #include <libxml/parser.h> #include "spawn.h" #include "tools.h" #include "player.h" #include "npc.h" #include "configmanager.h" #include "game.h" extern ConfigManager g_config; extern Monsters g_monsters; extern Game g_game; #define MINSPAWN_INTERVAL 1000 #define DEFAULTSPAWN_INTERVAL 60000 Spawns::Spawns() { loaded = started = false; } Spawns::~Spawns() { if(started) clear(); } bool Spawns::loadFromXml(const std::string& _filename) { if(isLoaded()) return true; filename = _filename; xmlDocPtr doc = xmlParseFile(filename.c_str()); if(!doc) { std::clog << "[Warning - Spawns::loadFromXml] Cannot open spawns file." << std::endl; std::clog << getLastXMLError() << std::endl; return false; } xmlNodePtr spawnNode, root = xmlDocGetRootElement(doc); if(xmlStrcmp(root->name,(const xmlChar*)"spawns")) { std::clog << "[Error - Spawns::loadFromXml] Malformed spawns file." << std::endl; xmlFreeDoc(doc); return false; } for(spawnNode = root->children; spawnNode; spawnNode = spawnNode->next) parseSpawnNode(spawnNode, false); xmlFreeDoc(doc); loaded = true; return true; } bool Spawns::parseSpawnNode(xmlNodePtr p, bool checkDuplicate) { if(xmlStrcmp(p->name, (const xmlChar*)"spawn")) return false; int32_t intValue; std::string strValue; Position centerPos; if(!readXMLString(p, "centerpos", strValue)) { if(!readXMLInteger(p, "centerx", intValue)) return false; centerPos.x = intValue; if(!readXMLInteger(p, "centery", intValue)) return false; centerPos.y = intValue; if(!readXMLInteger(p, "centerz", intValue)) return false; centerPos.z = intValue; } else { IntegerVec posVec = vectorAtoi(explodeString(strValue, ",")); if(posVec.size() < 3) return false; centerPos = Position(posVec[0], posVec[1], posVec[2]); } if(!readXMLInteger(p, "radius", intValue)) return false; int32_t radius = intValue; Spawn* spawn = new Spawn(centerPos, radius); if(checkDuplicate) { for(SpawnList::iterator it = spawnList.begin(); it != spawnList.end(); ++it) { if((*it)->getPosition() == centerPos) delete *it; } } spawnList.push_back(spawn); for(xmlNodePtr tmpNode = p->children; tmpNode; tmpNode = tmpNode->next) { if(!xmlStrcmp(tmpNode->name, (const xmlChar*)"monster")) { if(!readXMLString(tmpNode, "name", strValue)) continue; std::string name = strValue; int32_t interval = MINSPAWN_INTERVAL / 1000; if(readXMLInteger(tmpNode, "spawntime", intValue) || readXMLInteger(tmpNode, "interval", intValue)) { if(intValue <= interval) { std::clog << "[Warning - Spawns::loadFromXml] " << name << " " << centerPos << " spawntime cannot" << " be less than " << interval << " seconds." << std::endl; continue; } interval = intValue; } interval *= 1000; Position placePos = centerPos; if(readXMLInteger(tmpNode, "x", intValue)) placePos.x += intValue; if(readXMLInteger(tmpNode, "y", intValue)) placePos.y += intValue; if(readXMLInteger(tmpNode, "z", intValue)) placePos.z /*+*/= intValue; Direction direction = NORTH; if(readXMLInteger(tmpNode, "direction", intValue) && direction >= EAST && direction <= WEST) direction = (Direction)intValue; spawn->addMonster(name, placePos, direction, interval); } else if(!xmlStrcmp(tmpNode->name, (const xmlChar*)"npc")) { if(!readXMLString(tmpNode, "name", strValue)) continue; std::string name = strValue; Position placePos = centerPos; if(readXMLInteger(tmpNode, "x", intValue)) placePos.x += intValue; if(readXMLInteger(tmpNode, "y", intValue)) placePos.y += intValue; if(readXMLInteger(tmpNode, "z", intValue)) placePos.z /*+*/= intValue; Direction direction = NORTH; if(readXMLInteger(tmpNode, "direction", intValue) && direction >= EAST && direction <= WEST) direction = (Direction)intValue; Npc* npc = Npc::createNpc(name); if(!npc) continue; npc->setMasterPosition(placePos, radius); npc->setDirection(direction); npcList.push_back(npc); } } return true; } void Spawns::startup() { if(!isLoaded() || isStarted()) return; for(NpcList::iterator it = npcList.begin(); it != npcList.end(); ++it) g_game.placeCreature((*it), (*it)->getMasterPosition(), false, true); npcList.clear(); for(SpawnList::iterator it = spawnList.begin(); it != spawnList.end(); ++it) (*it)->startup(); started = true; } void Spawns::clear() { started = false; for(SpawnList::iterator it = spawnList.begin(); it != spawnList.end(); ++it) delete (*it); spawnList.clear(); loaded = false; filename = std::string(); } bool Spawns::isInZone(const Position& centerPos, int32_t radius, const Position& pos) { if(radius == -1) return true; return ((pos.x >= centerPos.x - radius) && (pos.x <= centerPos.x + radius) && (pos.y >= centerPos.y - radius) && (pos.y <= centerPos.y + radius)); } void Spawn::startEvent() { if(!checkSpawnEvent) checkSpawnEvent = Scheduler::getInstance().addEvent(createSchedulerTask(getInterval(), boost::bind(&Spawn::checkSpawn, this))); } Spawn::Spawn(const Position& _pos, int32_t _radius) { centerPos = _pos; radius = _radius; interval = DEFAULTSPAWN_INTERVAL; checkSpawnEvent = 0; } Spawn::~Spawn() { stopEvent(); Monster* monster = NULL; for(SpawnedMap::iterator it = spawnedMap.begin(); it != spawnedMap.end(); ++it) { if(!(monster = it->second)) continue; monster->setSpawn(NULL); if(!monster->isRemoved()) g_game.freeThing(monster); } spawnedMap.clear(); spawnMap.clear(); } bool Spawn::findPlayer(const Position& pos) { SpectatorVec list; g_game.getSpectators(list, pos); Player* tmpPlayer = NULL; for(SpectatorVec::iterator it = list.begin(); it != list.end(); ++it) { if((tmpPlayer = (*it)->getPlayer()) && !tmpPlayer->hasFlag(PlayerFlag_IgnoredByMonsters)) return false; } return false; } bool Spawn::spawnMonster(uint32_t spawnId, MonsterType* mType, const Position& pos, Direction dir, bool startup /*= false*/) { Monster* monster = Monster::createMonster(mType); if(!monster) return false; if(startup) { //No need to send out events to the surrounding since there is no one out there to listen! if(!g_game.internalPlaceCreature(monster, pos, false, true)) { delete monster; return false; } } else if(!g_game.placeCreature(monster, pos, false, true)) { delete monster; return false; } monster->setSpawn(this); monster->setMasterPosition(pos, radius); monster->setDirection(dir); monster->addRef(); spawnedMap.insert(SpawnedPair(spawnId, monster)); spawnMap[spawnId].lastSpawn = OTSYS_TIME(); return true; } void Spawn::startup() { for(SpawnMap::iterator it = spawnMap.begin(); it != spawnMap.end(); ++it) { spawnBlock_t& sb = it->second; spawnMonster(it->first, sb.mType, sb.pos, sb.direction, true); } } void Spawn::checkSpawn() { #ifdef __DEBUG_SPAWN__ std::clog << "[Notice] Spawn::checkSpawn " << this << std::endl; #endif Monster* monster; uint32_t spawnId; checkSpawnEvent = 0; for(SpawnedMap::iterator it = spawnedMap.begin(); it != spawnedMap.end();) { spawnId = it->first; monster = it->second; if(monster->isRemoved()) { if(spawnId) spawnMap[spawnId].lastSpawn = OTSYS_TIME(); monster->unRef(); spawnedMap.erase(it++); } else { /*if(spawnId && !isInSpawnZone(monster->getPosition()) && monster->getIdleStatus()) g_game.internalTeleport(monster, monster->getMasterPosition(), true); */++it; } } uint32_t spawnCount = 0; for(SpawnMap::iterator it = spawnMap.begin(); it != spawnMap.end(); ++it) { spawnId = it->first; spawnBlock_t& sb = it->second; if(spawnedMap.count(spawnId)) continue; if(OTSYS_TIME() < sb.lastSpawn + sb.interval) continue; if(findPlayer(sb.pos)) { sb.lastSpawn = OTSYS_TIME(); continue; } spawnMonster(spawnId, sb.mType, sb.pos, sb.direction); ++spawnCount; if(spawnCount >= (uint32_t)g_config.getNumber(ConfigManager::RATE_SPAWN)) break; } if(spawnedMap.size() < spawnMap.size()) checkSpawnEvent = Scheduler::getInstance().addEvent(createSchedulerTask(getInterval(), boost::bind(&Spawn::checkSpawn, this))); #ifdef __DEBUG_SPAWN__ else std::clog << "[Notice] Spawn::checkSpawn stopped " << this << std::endl; #endif } bool Spawn::addMonster(const std::string& _name, const Position& _pos, Direction _dir, uint32_t _interval) { if(!g_game.getTile(_pos)) { std::clog << "[Spawn::addMonster] NULL tile at spawn position (" << _pos << ")" << std::endl; return false; } MonsterType* mType = g_monsters.getMonsterType(_name); if(!mType) { std::clog << "[Spawn::addMonster] Cannot find \"" << _name << "\"" << std::endl; return false; } if(_interval < interval) interval = _interval; spawnBlock_t sb; sb.mType = mType; sb.pos = _pos; sb.direction = _dir; sb.interval = _interval; sb.lastSpawn = 0; uint32_t spawnId = (int32_t)spawnMap.size() + 1; spawnMap[spawnId] = sb; return true; } void Spawn::removeMonster(Monster* monster) { for(SpawnedMap::iterator it = spawnedMap.begin(); it != spawnedMap.end(); ++it) { if(it->second != monster) continue; monster->unRef(); spawnedMap.erase(it); break; } } void Spawn::stopEvent() { if(!checkSpawnEvent) return; Scheduler::getInstance().stopEvent(checkSpawnEvent); checkSpawnEvent = 0; }
  7. Saquei!!! Mas o objetivo é fazer os bichos nascerem para baixo. Mas vllw ae man! Vou aguardar pra vê se alguém manja sobre o assunto
  8. Sim, Tlg !No RME tem a opção de qual para o sentindo o monstro vai nascer. Porem ele n fica na posição solicitada. Por isso eu acho que deve ser na SCR
  9. Galera, os bixos sempre nasce pra cima (como na foto). Acho q deve ser na src que deve mudar. Alguém sabe onde acho o lugar para muda ? (Quero colocar pra ele nascer virando para baixo)
  10. Pois e mano Mas ele ta derrubando a maquina, nem e a tfs. é a propria maquina da vps
  11. Iae galerinha. Fmz ? Bem... antes de eu abrir meu otzin. vir um otario chantageando um ADM de um ot com massa com +/- 100 players. ( Pediu full points para parar de nukar ) E hj eu dei azar do ''Fodao'' vim se parar no meu servidor ! '-' (Que nem 25 online tem) eu sei q windows n tem muita defesas e etc... Eu n sei como ele faz isso. Mas EXISTE alguma maneira de ''impedir'' isso que ele esta fazendo ? ele simplesmente esta derrubando a maquina (é da google cloud)
  12. Galera queria que so desse pra usar so uma vez, sem sumir o item como esta esta no script. Algume pode ajudar pf ! TFS: 04 function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "no" -- remover quando usar ("yes" or "no") } local days = 1 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13715) local timenow = os.time() if getPlayerStorageValue(cid, 13715) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foi Adicionado ".. days .." Dia de Vip Donate no Seu Character.") setPlayerStorageValue(cid, 13715, time) addEvent(doRemoveCreature, 2*1000, cid, true) local quantity = math.floor((getPlayerStorageValue(cid, 13715) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(30,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Tem ".. quantity .." Dia de Vip Donate Restante.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end return TRUE end
  13. Doidodepeda postou uma resposta no tópico em Suporte Tibia OTServer
    Nenhum ERROR, mas ao puxar a alavanca nao acontece nada !
  14. Doidodepeda postou uma resposta no tópico em Suporte Tibia OTServer
    Amigo, Fico muito grato por tentar ajudar . ( Nao deu nenhum erro ) Porem não esta puxando o player.
  15. Doidodepeda postou uma resposta no tópico em Suporte Tibia OTServer
    Alguem pode tirar a quantidade que tem q ter pra poder puxar alavanca pf tipo... esse script so teleporta se tiver a quantidade de playes em determinado lugar, que que pudesse para teleporta sem quantidade max. Alguem pode ajudar pf. Gostaria que pudesse puxar com 1 ou ''max'' de plays. local lvl = 500 local entrada = { {x = 154, y = 60, z = 7}, {x = 155, y = 60, z = 7}, {x = 156, y = 60, z = 7}, {x = 157, y = 60, z = 7}, {x = 158, y = 60, z = 7} } local saida = {x = 153, y = 62, z = 7} function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl) then doPlayerSendCancel(cid, 'esta faltando jogador ou alguem nao tem '..lvl..' ou mais.') return true end check[#check+1] = x end for _, pid in pairs(check) do doSendMagicEffect(getPlayerPosition(pid), CONST_ME_POFF) doTeleportThing(pid, saida) doSendMagicEffect(getPlayerPosition(pid), CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
  16. Doidodepeda postou uma resposta no tópico em Suporte Tibia OTServer
    Tfs 0.4 Então galera... queria um action q ao puxa a alavanca teleportasse 2 pessoas que estavam na localização aleatória... Exemplo, a action identificava os plays que estava na tile e ao puxar a alavanca sorteasse DOIS daqueles lugares que estivesse ocupados e puxasse para uma determinada área. Sera que alguém pode ajudar pf ? RESOLVIDO !
  17. Na vdd, eu n queria esses negocio de horarios de eventos, oq eu tava querendo dizer é.... é q eu queria um script parecido com esse que desse pra coloca frases GRANDES no chao como esse script faz. Entenderam ?
  18. Ola, Alguém tem um script parecido que sai msg GRANDE do chão, Nesse formato ai. Se puderem passar agradeço
  19. Mano tem 3, e pra mudar nos 3 ?
  20. Galera achei esse script em um ot. queria usar ele so pra deixar a msg grande no chao, Teria como alguem reformular pra deixar ele como msg normal ? Agradeço desde de ja local EventsListalist = { {time = "01:00", name = "Snowball Event"}, {time = "02:00", name = "DesertWar Event"}, {time = "03:00", name = "Capture The Flag"}, {time = "04:00", name = "FireStorm Event"}, {time = "09:00", name = "Defend The Tower"}, {time = "10:00", name = "Snowball Event"}, {time = "11:00", name = "DesertWar Event"}, {time = "12:00", name = "Capture The Flag"}, {time = "13:00", name = "FireStorm Event"}, {time = "15:00", name = "Battlefield Event"}, {time = "16:00", name = "Defend The Tower"}, {time = "17:00", name = "Snowball Event"}, {time = "18:00", name = "DesertWar Event",}, {time = "19:00", name = "Capture The Flag",}, {time = "20:00", name = "FireStorm Event"}, {time = "21:00", name = "Real Castle"}, {time = "22:00", name = "Battlefield Event"}, {time = "23:00", name = "Defend The Tower"} } local position = {x = 129, y = 58, z = 7} function onThink(interval, lastExecution) local people = getPlayersOnline() if #people == 0 then return true end local Count = 0 for _, t in ipairs(EventsListalist) do local eventTime = hourToNumber(t.time) local realTime = hourToNumber(os.date("%H:%M:%S")) if eventTime >= realTime then doPlayerSay(people[1], "Próximo evento às {"..t.time.."h} "..t.name..", faltam "..timeString(eventTime - realTime)..".", TALKTYPE_MONSTER_SAY, false, 0, position) return true end Count = Count + 1 end return true end events.lua
  21. Vlw
  22. Galera, uso esse script de P points em meu ot. Porem se o cara logar 10 accs ele ganha os points nas 10 accs. Teria como alguém implementar alguma coisa que só ganhe em uma acc por IP --[[ P Points System. Version : v1.0 ]]-- local config = { p_time = 3600, -- Tempo em segundos para receber os pontos( 3600 = 1hora ) p_points = 1 -- Quantidade de pontos recebida a cada "p_time" } local function givePoints(cid, quant) if os.time() - getCreatureStorage(cid, 1219) >= config.p_time then doPlayerSendTextMessage(cid, 19, "Congratulations, you recieved ".. config.p_points .." p points. Now you have ".. config.p_points + getPoints(cid) .." p points in your account. Your timer was reseted.") doPlayerAddPoints(cid, quant) doCreatureSetStorage(cid, 1219, 0) doCreatureSetStorage(cid, 1219, os.time()) end return true end function onThink(interval) for i, v in pairs(getPlayersOnline()) do givePoints(v, config.p_points) end return true end
  23. Galera pra funfar o castle 48 hrs tem q adicionar alguma query no mysql ou sqlite ? Me informa ae pf ! se sim... alguem poderia dispoibilizar !?
  24. alguém pode disponibilizar um globalevents que sai frase ''ALONGADA'' do chão ''frase GRANDE'' 0.4

Informação Importante

Confirmação de Termo