Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 09/27/15 em todas áreas
-
Peça aqui seu logotipo!
Kenny dxp e um outro reagiu a LuckinhaSan por uma questão
Não sei se é a área correta, mas estarei fazendo uma boa ação. Vocês podem fazer aqui seu pedido de logotipos para servidores! Peça como nesse exemplo abaixo - Tipografia (o que quer que eu escreva): Cores (se tiver preferência): Tamanho (se tiver preferência): Exemplo (se tiver algum): Como quer (faça uma definição de como quer sua logo): O prazo de entrega é 7 dias, mas provavelmente farei bem antes do que isso.2 pontos -
Designers, avante!
JonatasLucasf e um outro reagiu a LuckinhaSan por um tópico no fórum
Olá, eu sou o novo estagiário e ficarei encarregado pela Design Zone. Como vocês já perceberam, a atual design zone do fórum não é a mesma de antes. Ela está literalmente morta e entediante, sem participantes até mesmo para os eventos de ADS. Tentarei trazer conteúdos para essa área como PSDs para estudos, tutoriais, etc. Conto com a ajuda de todos para tentarmos reviver essa área, pois a design do fórum não pode morrer! (A DESIGN ZONE NÃO PODE MORRER)2 pontos -
Peça aqui seu logotipo!
RigBy e um outro reagiu a LuckinhaSan por uma questão
http://i.imgur.com/kHAZz5S.png2 pontos -
Bom Dia, Boa Tarde ou Boa Noite, tudo depende da hora que ver o tópico Bom Hoje vim Postar meu servidor Pokemon Anonymous, estava em mente com um projeto de Poketibia Base Lendaria sem ser as tradicionais PokeZot e PokePro. Vamos Ao Que Interessa: Informações: Base Editada Poke Dash Pokemon 1 a 3 Geração. Lendarios 1 a 5 Geração - Respectivamente suas versões Shinys. Mega Stone. Hydra Stone. Boost Stone2. Pergaminho 400% e 500%. Master Ball 100%. Red Megas. Shadow Megas. Vip System "Contendo aria vip com direito a ir final de algumas quest's como por exemplo b21 e b22, e contendo quest's especiais somente nela como exemplo: Sb1 a Sb3 e Especial Box. (Para adquirir Vip é com o comando !buyvip, as scarab coins que eles pedem o npc Mark Vende Por 50TD cada, é necessário 100 Scarab Coins para comprar 7 dias vip). " Quest's B1 a B22 e SB1 a SB3 e Especial Boxs, e mais de 50 Quest's espalhadas pelo Mapa. Arias Up Free e Vip. Held System 100%, contendo X-Experience que aumenta 50% da EXP, X-Cooldown Que abaixa tempo dos golpes, ETC. Sistema Torneio que ocorre as 10:45. Servidor contém muitos sistemas e informações. Prints Download Scan Peço Desculpas por qualquer erro primeira postagem minha, Se gostar não custa nada curti . Creditos: Pokemon By Bolz. Lucas Kuchiki - Editor do Servidor " EU ". PxG Por algumas Sprits.1 ponto
-
Eae galeerrra xtibiana. Venho disponibilizar o famoso sistema de televisão poketibiano completo o sistema foi feito para ambos os clients tibianos. O sistema permite você assistir outro players jogando assim você fica sem usar itens,falar(so pm), se movimentar e etc... Vamos la: Vá em luascript.cpp e procure: int32_t LuaScriptInterface::luaGetTopCreature(lua_State* L) { //getTopCreature(pos) PositionEx pos; popPosition(L, pos); ScriptEnviroment* env = getEnv(); Tile* tile = g_game.getTile(pos); if(!tile) { pushThing(L, NULL, 0); return 1; } Thing* thing = tile->getTopCreature(); if(!thing || !thing->getCreature()) { pushThing(L, NULL, 0); return 1; } pushThing(L, thing, env->addThing(thing)); return 1; } E coloque embaixo: int32_t LuaScriptInterface::luaGetAllsTvs(lua_State* L) { //getAllsTvs(cid) ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Tvlist::iterator it; it = player->tv.begin(); lua_newtable(L); uint32_t tableplayers = 1; for(uint32_t i = 1; it != player->tv.end(); ++it, ++i) { Player* players = env->getPlayerByUID(*it); if (players) { lua_pushnumber(L, tableplayers); lua_pushnumber(L, env->addThing(players)); pushTable(L); tableplayers = tableplayers+1; } } return 1; } int32_t LuaScriptInterface::luaSetPlayerTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player_tv = env->getPlayerByUID(popNumber(L)); Creature* creature = env->getCreatureByUID(popNumber(L)); if (!creature) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } Player* player = creature->getPlayer(); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } if (!player_tv) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } player_tv->tv.push_back(player->getID()); SpectatorVec::iterator it; SpectatorVec list = g_game.getSpectators(player->getPosition()); Player* tmpPlayer = NULL; Condition* condition = NULL; if((condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_GAMEMASTER, -1, 0, false, GAMEMASTER_INVISIBLE))) { creature->setHideName(false); player->addCondition(condition); g_game.internalCreatureChangeVisible(creature, VISIBLE_GHOST_DISAPPEAR); for(it = list.begin(); it != list.end(); ++it) { if((tmpPlayer = (*it)->getPlayer()) && !tmpPlayer->canSeeCreature(player)) tmpPlayer->sendMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); } for(AutoList<Player>::iterator pit = Player::autoList.begin(); pit != Player::autoList.end(); ++pit) { if(!pit->second->canSeeCreature(player)) pit->second->notifyLogOut(player); } IOLoginData::getInstance()->updateOnlineStatus(player->getGUID(), false); if(player->isTrading()) g_game.internalCloseTrade(player); player->clearPartyInvitations(); if(player->getParty()) player->getParty()->leave(player); g_game.internalTeleport(player, player_tv->getPosition(), true); } lua_pushboolean(L, true); } int32_t LuaScriptInterface::luaDoSendChannelsTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } player->sendChannelsDialog(true); lua_pushboolean(L, true); return 1; } int32_t LuaScriptInterface::luaDoRemovePlayerTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); Player* creature = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } for(std::list<uint32_t>::iterator it = player->tv.begin(); it != player->tv.end(); ++it) { if ((*it) == creature->getID()) { Tvlist tv = player->tv; if (!creature) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Player* player_tv = creature->getPlayer(); if (!player) { return 1; } SpectatorVec::iterator its; SpectatorVec list = g_game.getSpectators(player_tv->getPosition()); Player* tmpPlayer = NULL; Condition* condition = NULL; creature->setHideName(false); if((condition = player_tv->getCondition(CONDITION_GAMEMASTER, CONDITIONID_DEFAULT, GAMEMASTER_INVISIBLE))) { IOLoginData::getInstance()->updateOnlineStatus(player_tv->getGUID(), true); for(AutoList<Player>::iterator pit = Player::autoList.begin(); pit != Player::autoList.end(); ++pit) { if(!pit->second->canSeeCreature(player_tv)) pit->second->notifyLogIn(player_tv); } for(its = list.begin(); its != list.end(); ++its) { if((tmpPlayer = (*its)->getPlayer()) && !tmpPlayer->canSeeCreature(player_tv)) tmpPlayer->sendMagicEffect(player_tv->getPosition(), MAGIC_EFFECT_TELEPORT); } player_tv->removeCondition(condition); g_game.internalCreatureChangeVisible(creature, VISIBLE_GHOST_APPEAR); *it = NULL; } } } lua_pushboolean(L, true); } Continuando em luascript.cpp procure: //doCreatureSay(uid, text[, type = SPEAK_SAY[, ghost = false[, cid = 0[, pos]]]]) lua_register(m_luaState, "doCreatureSay", LuaScriptInterface::luaDoCreatureSay); Coloque embaixo: //doRemovePlayerTv(cid, id) lua_register(m_luaState, "removePlayerTv", LuaScriptInterface::luaDoRemovePlayerTv); //getAllsTv() lua_register(m_luaState, "getTvs", LuaScriptInterface::luaGetAllsTvs); //setPlayerTv(cid, player) lua_register(m_luaState, "setPlayerTv", LuaScriptInterface::luaSetPlayerTv); //doSendChannelstTv(cid) lua_register(m_luaState, "doSendChannelsTv", LuaScriptInterface::luaDoSendChannelsTv); Em luascript.h procure: static int32_t luaGetPlayerParty(lua_State* L); Coloque embaixo: static int32_t luaGetAllsTvs(lua_State* L); static int32_t luaSetPlayerTv(lua_State* L); static int32_t luaDoSendChannelsTv(lua_State* L); static int32_t luaDoRemovePlayerTv(lua_State* L); Vamos agora em game.cpp: Procure: bool Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string& receiver, const std::string& text) E substitua função por esta nova função: bool Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string& receiver, const std::string& text) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; std::string str; if (player->getStorage(34421, str) && str == "true") { if (type == SPEAK_SAY) { player->getStorage(292924, str); player->sendTextMessage(MSG_STATUS_SMALL, str.c_str()); return false; } switch(type) { case SPEAK_WHISPER: return playerWhisper(player, text); case SPEAK_YELL: return playerYell(player, text); case SPEAK_PRIVATE: case SPEAK_PRIVATE_RED: case SPEAK_RVR_ANSWER: return playerSpeakTo(player, type, receiver, text); case SPEAK_CHANNEL_O: case SPEAK_CHANNEL_Y: case SPEAK_CHANNEL_RN: case SPEAK_CHANNEL_RA: case SPEAK_CHANNEL_W: { if(playerTalkToChannel(player, type, text, channelId)) return true; return playerSay(playerId, 0, SPEAK_SAY, receiver, text); } case SPEAK_BROADCAST: return playerBroadcastMessage(player, SPEAK_BROADCAST, text); case SPEAK_RVR_CHANNEL: return playerReportRuleViolation(player, text); case SPEAK_RVR_CONTINUE: return playerContinueReport(player, text); default: break; } internalCreatureSay(player, SPEAK_SAY, text, false); return false; } uint32_t muteTime = 0; bool muted = player->isMuted(channelId, type, muteTime); if(muted) { char buffer[75]; sprintf(buffer, "You are still muted for %d seconds.", muteTime); player->sendTextMessage(MSG_STATUS_SMALL, buffer); return false; } if(player->isAccountManager()) { player->removeMessageBuffer(); return internalCreatureSay(player, SPEAK_SAY, text, false); } if(g_talkActions->onPlayerSay(player, type == SPEAK_SAY ? CHANNEL_DEFAULT : channelId, text, false)) return true; if(!muted) { ReturnValue ret = RET_NOERROR; if(!muteTime) { ret = g_spells->onPlayerSay(player, text); if(ret == RET_NOERROR || (ret == RET_NEEDEXCHANGE && !g_config.getBool(ConfigManager::BUFFER_SPELL_FAILURE))) return true; } player->removeMessageBuffer(); if(ret == RET_NEEDEXCHANGE) return true; } switch(type) { case SPEAK_SAY: return internalCreatureSay(player, SPEAK_SAY, text, false); case SPEAK_WHISPER: return playerWhisper(player, text); case SPEAK_YELL: return playerYell(player, text); case SPEAK_PRIVATE: case SPEAK_PRIVATE_RED: case SPEAK_RVR_ANSWER: return playerSpeakTo(player, type, receiver, text); case SPEAK_CHANNEL_O: case SPEAK_CHANNEL_Y: case SPEAK_CHANNEL_RN: case SPEAK_CHANNEL_RA: case SPEAK_CHANNEL_W: { if(playerTalkToChannel(player, type, text, channelId)) return true; return playerSay(playerId, 0, SPEAK_SAY, receiver, text); } case SPEAK_PRIVATE_PN: return playerSpeakToNpc(player, text); case SPEAK_BROADCAST: return playerBroadcastMessage(player, SPEAK_BROADCAST, text); case SPEAK_RVR_CHANNEL: return playerReportRuleViolation(player, text); case SPEAK_RVR_CONTINUE: return playerContinueReport(player, text); default: break; } return false; } Continuando em game.cpp procure a função: ReturnValue Game::internalMoveCreature(Creature* creature, Direction direction, uint32_t flags/* = 0*/) E substitua por esta função: ReturnValue Game::internalMoveCreature(Creature* creature, Direction direction, uint32_t flags/* = 0*/) { const Position& currentPos = creature->getPosition(); Cylinder* fromTile = creature->getTile(); Cylinder* toTile = NULL; Position destPos = getNextPosition(direction, currentPos); if(direction < SOUTHWEST && creature->getPlayer()) { Tile* tmpTile = NULL; if(currentPos.z != 8 && creature->getTile()->hasHeight(3)) //try go up { if((!(tmpTile = map->getTile(Position(currentPos.x, currentPos.y, currentPos.z - 1))) || (!tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID))) && (tmpTile = map->getTile(Position(destPos.x, destPos.y, destPos.z - 1))) && tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID)) { flags = flags | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE; destPos.z--; } } else if(currentPos.z != 7 && (!(tmpTile = map->getTile(destPos)) || (!tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID))) && (tmpTile = map->getTile(Position( destPos.x, destPos.y, destPos.z + 1))) && tmpTile->hasHeight(3)) //try go down { flags = flags | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE; destPos.z++; } } ReturnValue ret = RET_NOTPOSSIBLE; if((toTile = map->getTile(destPos))) ret = internalMoveCreature(NULL, creature, fromTile, toTile, flags); if(ret != RET_NOERROR) { if(Player* player = creature->getPlayer()) { player->sendCancelMessage(ret); player->sendCancelWalk(); } } Player* player = creature->getPlayer(); if (player) { Tvlist::iterator it; it = player->tv.begin(); for(uint32_t i = 1; it != player->tv.end(); ++it, ++i) { Player* players = getPlayerByID(*it); if (players) { internalTeleport(players, player->getPosition(), true, 0); } } } return ret; } Procure a função: bool Game::playerRequestChannels(uint32_t playerId) Substitua a função por: bool Game::playerRequestChannels(uint32_t playerId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; player->sendChannelsDialog(false); return true; } Agora vamos a protocolgame.cpp e procure a função; void ProtocolGame::sendChannelsDialog(bool tv) E substitua por esta função: void ProtocolGame::sendChannelsDialog(bool tv) { NetworkMessage_ptr msg = getOutputBuffer(); std::string str; if(msg) { if (tv) { uint16_t bytes = 0; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { it->second->getStorage(22120, str); if (str == "true") { bytes = bytes+1; } } if (bytes < 1) { player->sendCancel("Não há nenhuma tv online"); return; } TRACK_MESSAGE(msg); msg->AddByte(0xAB); msg->AddByte(bytes); uint16_t id = 200; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { it->second->getStorage(22120, str); if (str == "true") { id = id+1; it->second->getStorage(12121, str); msg->AddU16(id); msg->AddString(str); } } return; } TRACK_MESSAGE(msg); msg->AddByte(0xAB); ChannelList list = g_chat.getChannelList(player); msg->AddByte(list.size()); for(ChannelList::iterator it = list.begin(); it != list.end(); ++it) { if(ChatChannel* channel = (*it)) { msg->AddU16(channel->getId()); msg->AddString(channel->getName()); } } } } Procure em protocolgame.h a seguinta declaração: void sendChannelsDialog(); Substitua por: void sendChannelsDialog(bool tv); Agora vamos em player.h e procure: void sendChannelsDialog() {if(client) client->sendChannelsDialog();} E substitua por: void sendChannelsDialog(bool tv) {if(client) client->sendChannelsDialog(tv);} Procure denovo em player.h: typedef std::list<Party*> PartyList; E adicione embaixo: typedef std::list<uint32_t> Tvlist; Continuando em player.h procure: AttackedSet attackedSet; Coloque embaixo: Tvlist tv; Vamos denovo a protocolgame.cpp e procure: if(player->isAccountManager()) { switch(recvbyte) { case 0x14: parseLogout(msg); break; case 0x96: parseSay(msg); break; default: sendCancelWalk(); break; } } Coloque embaixo: std::string str; if (player->getStorage(34421, str) && str == "true") { player->getStorage(292924, str); switch(recvbyte) { case 0x14: parseLogout(msg); break; case 0x96: parseSay(msg); break; case 0x97: // request channels parseGetChannels(msg); break; case 0x98: // open channel parseOpenChannel(msg); break; case 0x99: // close channel parseCloseChannel(msg); break; case 0x9A: // open priv parseOpenPriv(msg); break; case 0x1E: // keep alive / ping response parseReceivePing(msg); break; default: player->sendTextMessage(MSG_INFO_DESCR, str); break; } Seguidamente vá em creatureevent.cpp e procure: else if(tmpStr == "preparedeath") m_type = CREATURE_EVENT_PREPAREDEATH; Coloque embaixo: else if(tmpStr == "selecttv") m_type = CREATURE_EVENT_SELECTTV; Procure depois: case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath"; Coloque embaixo: case CREATURE_EVENT_SELECTTV: return "onSelectTv"; Procure: case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList"; Coloque embaixo: case CREATURE_EVENT_SELECTTV: return "cid, id"; Procure: uint32_t CreatureEvent::executeChannelJoin(Player* player, uint16_t channelId, UsersMap usersMap) { //onJoinChannel(cid, channel, users) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { std::stringstream scriptstream; scriptstream << "local cid = " << env->addThing(player) << std::endl; scriptstream << "local channel = " << channelId << std::endl; scriptstream << "local users = {}" << std::endl; for(UsersMap::iterator it = usersMap.begin(); it != usersMap.end(); ++it) scriptstream << "users:insert(" << env->addThing(it->second) << ")" << std::endl; scriptstream << m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ char desc[35]; sprintf(desc, "%s", player->getName().c_str()); env->setEventDesc(desc); #endif env->setScriptId(m_scriptId, m_interface); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); lua_pushnumber(L, channelId); UsersMap::iterator it = usersMap.begin(); lua_newtable(L); for(int32_t i = 1; it != usersMap.end(); ++it, ++i) { lua_pushnumber(L, i); lua_pushnumber(L, env->addThing(it->second)); lua_settable(L, -3); } bool result = m_interface->callFunction(3); m_interface->releaseEnv(); return result; } } else { std::cout << "[Error - CreatureEvent::executeChannelJoin] Call stack overflow." << std::endl; return 0; } } Coloque embaixo: uint32_t CreatureEvent::executeSelectTv(Player* player, uint16_t id) { //onSelectTv(cid, id) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { std::stringstream scriptstream; scriptstream << "local cid = " << env->addThing(player) << std::endl; scriptstream << "local id = " << id << std::endl; scriptstream << m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ char desc[35]; sprintf(desc, "%s", player->getName().c_str()); env->setEventDesc(desc); #endif env->setScriptId(m_scriptId, m_interface); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); lua_pushnumber(L, id); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::cout << "[Error - CreatureEvent::executeChannelJoin] Call stack overflow." << std::endl; return 0; } } Vá em creatureevent.h e procure: CREATURE_EVENT_ATTACK, Coloque embaixo: CREATURE_EVENT_SELECTTV Procure continuando em creatureevent.h: uint32_t executeCombat(Creature* creature, Creature* target); Coloque embaixo: uint32_t executeSelectTv(Player* player, uint16_t id); Vá agora em game.cpp denovo e procure a função: bool Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) Substitua a função por: bool Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; if (channelId >= 200) { CreatureEventList tvEvents = player->getCreatureEvents(CREATURE_EVENT_SELECTTV); for(CreatureEventList::iterator it = tvEvents.begin(); it != tvEvents.end(); ++it) (*it)->executeSelectTv(player, channelId); return true; } ChatChannel* channel = g_chat.addUserToChannel(player, channelId); if(!channel) { #ifdef __DEBUG_CHAT__ std::cout << "Game::playerOpenChannel - failed adding user to channel." << std::endl; #endif return false; } if(channel->getId() != CHANNEL_RVR) player->sendChannel(channel->getId(), channel->getName()); else player->sendRuleViolationsChannel(channel->getId()); return true; } Vá em data/lib e crie um novo arquivo lua chamado tv system: names = {} storage_hastv = 22120 storage_watchtv = 34421 storage_nametv = 12121 storage_idwatchtv = 21213 storage_msgwatch = 292924 storage_namewatchtv = 21923 storage_save_group_id = 63732 smallerros = false ERROR_ID_NOT_FOUND = "ERROR\nPLAYER NOT FOUND\nSet Storage FALSE ON LOGIN" MSG_TV_SYSTEM = "Esta ação não e possivel você esta assistindo" MSG_CREATE_TV = "Parabéns, você criou sua TV " MSG_LOGOUT_TV = "Você saiu da tv " MSG_LOGOUT_TV_TOWN = "Você retornou a sua cidade " ID_ITEM_TV = 1949 ---- IMPORTANTE ID DA SUA CAM(CAMERA) MSG_WATCH_TV = "Você esta assitindo a uma tv" MSG_HAS_TV = "Você ja tem tv" MSG_NO_HAS_TV = "Você não tem tv" MSG_ENTER_PLAYER = "Um novo player entrou - " MININUM_STRING_CARACTER = 4 HAS_TV = "Você ja tem uma tv" MSG_DELETE_TV = "Você deletou sua channel com sucesso" MSG_WATCH_TV_ENTER_TV = "Você entrou na channel " NAME_WRONG = "Nome incorreto" MSG_HAS_NAME_TV = "Desculpe, ja existe uma tv com este nome escolha outro por favor" function setBooleanStorage(cid, storage, bool) if not bool then setPlayerStorageValue(cid, storage, -1) return true end setPlayerStorageValue(cid, storage, "true") return true end function checkFindStrings(str, array) for i=1, #array do if string.find(str, array[i]) then return true end end return false end function playerHasTv(cid) return getPlayerStorageValue(cid, storage_hastv) == "true" and true end function playerWatchTv(cid) return getPlayerStorageValue(cid, storage_watchtv) == "true" and true end function getTvOnlines() local t = {} local online = getPlayersOnline() for i=1, #online do if playerHasTv(online[i]) then table.insert(t, online[i]) end end return t end function getNamesTv(sep) local tvs = getTvOnlines() str = "" for i=1, #tvs do str = str..sep..getTvName(tvs[i]) end return str end function getIdByTvName(name) local tvs = getTvOnlines() for i=1, #tvs do if tvs[i] == name then return name end end return false end function stopWatchAllsPlayerTv(id) local onlines = getTvs(id) for i=1, #onlines do playerStopWatchTv(onlines[i]) end return true end function getNameTv(id) if not isPlayer(id) then print(ERROR_ID_NOT_FOUND) return false end local storage = getPlayerStorageValue(id, storage_nametv) if storage ~= -1 then return storage end return "" end function createNewTv(cid, name) if #name < MININUM_STRING_CARACTER or checkFindStrings(name, names) then doPlayerSendCancel(cid, NAME_WRONG) return false end local tvs = getTvOnlines() for i=1, #tvs do if getNameTv(tvs[i]) == name then doPlayerSendCancel(cid, MSG_HAS_NAME_TV) return false end end if playerHasTv(cid) then doPlayerSendCancel(cid, MSG_HAS_TV) return false end if playerWatchTv(cid) then doPlayerSendCancel(cid, MSG_WATCH_TV) return false end setBooleanStorage(cid, storage_hastv, true) setPlayerStorageValue(cid, storage_nametv, name) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_CREATE_TV..name) return true end function getTvNameById(id) if not isPlayer(id) then print(ERROR_ID_NOT_FOUND) return false end return getPlayerStorageValue(id, storage_nametv) end function playerWatchTv(cid, id) if not isPlayer(id) then if smallerros then print(ERROR_ID_NOT_FOUND) end return false end if playerHasTv(cid) then doPlayerSendCancel(cid, MSG_HAS_TV) return false end if playerWatchTv(cid) then doPlayerSendCancel(cid, MSG_WATCH_TV) return false end local name = getTvNameById(id) setBooleanStorage(cid, storage_watchtv, true) setPlayerStorageValue(cid, storage_msgwatch, MSG_TV_SYSTEM) setPlayerStorageValue(cid, storage_idwatchtv, id) setPlayerStorageValue(cid, storage_namewatchtv, name) setPlayerStorageValue(cid, storage_save_group_id, getPlayerGroupId(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_WATCH_TV_ENTER_TV) doPlayerSendTextMessage(id, MESSAGE_STATUS_CONSOLE_BLUE, MSG_ENTER_PLAYER..getCreatureName(cid)) setPlayerTv(cid, id) return true end function playerStopWatchTv(cid) local id = getPlayerStorageValue(cid, storage_idwatchtv) local name = getPlayerStorageValue(cid, storage_namewatchtv) local town = getPlayerTown(cid) local namet = getTownName(town) local post = getTownTemplePosition(town) if getPlayerStorageValue(cid, storage_watchtv) ~= "true" then return true end removePlayerTv(cid, id) setBooleanStorage(cid, storage_watchtv, false) setPlayerStorageValue(cid, storage_idwatchtv, -1) setPlayerStorageValue(cid, storage_namewatchtv, -1) setPlayerGroupId(cid, getPlayerStorageValue(cid, storage_save_group_id)) doTeleportThing(cid, post) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_LOGOUT_TV..name) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_LOGOUT_TV_TOWN..namet) return true end function deleteTv(cid) if getPlayerStorageValue(cid, 22120) ~= "true" then return false end stopWatchAllsPlayerTv(cid) setBooleanStorage(cid, storage_hastv) setPlayerStorageValue(cid, storage_nametv, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_DELETE_TV) return true end Agora vamos em actions e crie um arquivo lua chamado tv e coloque: function onUse(cid, item, fromPosition, itemEx, toPosition) doSendChannelsTv(cid) end Vá em actions.xml e coloque a seguinte configurando com o id da sua tv: Agora vamos em talkactions e crie um novo arquivo lua chamado delete e coloque isto: function onSay(cid, words, param, channel) deleteTv(cid) return true end Agora vamos em talkactions.xml e coloque a seguinte tag: <talkaction words="/delete" event="script" value="delete.lua"/> Agora vamos a creaturescripts e crie um arquivo lua chamado createTv e coloque: function onTextEdit(cid, it:em, newText) if item.itemid == ID_ITEM_TV then createNewTv(cid, newText) return true end return true end Crie outro chamado de tv e coloque: function onSelectTv(cid, id) local tv = getTvOnlines() local idstarter = 200 for i=1, #tv do local tv = tv[i] local sub_id = i+idstarter if sub_id == id then playerWatchTv(cid, tv) end end return true end Crie outro chamado de tvlogout : function onLogout(cid) if isPlayer(cid) then deleteTv(cid) playerStopWatchTv(cid) end return true end Vá em creaturescripts.xml e coloque as seguintes as tags: <event type="textedit" name="newTv" event="script" value="createTv.lua"/> <event type="selecttv" name="selecttv" event="script" value="tv.lua"/> <event type="logout" name="tvlogout" event="script" value="tvlogout.lua"/> Vá em data/xml/group.xml e abra o arquivo e coloque o novo group: <group id="8" name="Tv" flags="3845069447162" customFlags="2097151" access="1" violationReasons="4" nameViolationFlags="2"/> Video do sistema em execução: E recomendavel NUNCA modificar as storages porques estão ligados aos codigos. Para mudar o id da camera e so mudar a variavel ID_ITEM_TV Para deletar uma tv diga o comand /delete1 ponto
-
Show Off :~ Dicas? Sugestões?1 ponto
-
Masterizando Spells
Rumplestiltiskin reagiu a Omnia por um tópico no fórum
Como funciona: *Ao usar uma spell certo número de vezes, esta avançará de nível, aumentando o dano e caso queiram, mudando seu efeito. Adicionando no servidor: 1º - Crie um arquivo .lua com o nome de rockthrow em Data / Spells / Scripts com o seguinte conteúdo: 2º- Adicione esta tag no arquivo spells.xml (Data / Spells): Modificando o arquivo rockthrow.lua: *TODAS AS LETRAS EM DESTAQUE DEVEM SER SUBSTITUÍDAS DA SEGUINTE MANEIRA: x = Distance Effect da spell nível 1; y = Distance Effect da spell nível 2; z = Distance Effect da spell nível 3; w = Efeito que surgirá no player quando avançar a spell de nível; a = Número de vezes que a spell deve ser usada para upar ao nível 2; b = Número de vezes que a spell deve ser usada para upar ao nível 3. Bom uso. Att, Omnia.1 ponto -
[Anti-DDoS] Apache
Beeki reagiu a LuckinhaSan por um tópico no fórum
Hoje ensinarei vocês a diminuirem os ataques DDoS ao usar servidores via Apache. Configuração - 1. Baixe esse arquivo dosevasive.rar 2. Coloque os arquivos (mod_dosevasive22.dll-mod_dosevasive22.c), na pasta: \xampp\apache\modules\ Não se esqueça de fechar o seu Apache antes de fazer isso! 3. Abra o seu httpd.conf com o bloco de notas \xampp\apache\Conf\httpd.conf 4. Procure por: LoadModule autoindex_color_module modules/mod_autoindex_color.so E adicione: LoadModule dosevasive22_module modules/mod_dosevasive22.dll Em baixo de: <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> Adicione: <IfModule dosevasive22_module> DOSHashTableSize 3097 DOSPageCount 20 DOSSiteCount 50 DOSPageInterval 1 DOSSiteInterval 1 DOSBlockingPeriod 300 </IfModule> Créditos - ragal Informações: DOSHashTableSize 1024 = define o tamanho da tabela DOSPageCount 10 = definir o número de solicitações para a mesma página DOSSiteCount 150 = Definir o número de pedidos de qualquer objeto pelo mesmo cliente, se o intervalo tenha sido ultrapassado o endereço IP do cliente é adicionado à lista de bloqueio. DOSBlockingPeriod 600 = 10 minutos de bloqueio, se alguém tentar atacar. Recomendo usar assim: <IfModule dosevasive22_module> DOSHashTableSize 3097 DOSPageCount 20 DOSSiteCount 50 DOSPageInterval 1 DOSSiteInterval 1 DOSBlockingPeriod 300 </IfModule>1 ponto -
Tutorial para iniciantes ao Poketibia - GAMEPLAY
kaleudd reagiu a RafaelDimitry por um tópico no fórum
Fala galera, venho aqui por meio deste, mostrar o começo de uma série de POKETIBIA, a qual ao longo do jogo irá ensinando a vocês o necessário para ser o melhor Mestre Pokémon! O primeiro vídeo da série foi lançado hoje, com o básico iniciante. Quem quiser acompanhar a serie, basta se inscrever no canal, ou acompanhar aqui pelo XTIBIA. Vlw galera!1 ponto -
[Show-Off] Minha 4° Remake Pokémon .
RigBy reagiu a carlos fabian por um tópico no fórum
Eaw galera ... Estou tentando aperfeiçoar a minha sabedoria com a Art Pixel , então estou fazendo remakes de pokemons que é oque mais me interessa no momento em relação ha sprite . Bom ... Ai esta minha 4°Remake . *Emboar . *Shiny Emboar . *Obs : Gostaria que todos dessem sua opnião de como estou indo com as remakes .1 ponto -
Mudanças no Visual
Avuenja reagiu a Administrador por um tópico no fórum
Novidades pessoal! Já devem ter notado o novo BG e os novos ícons do fórum. Deixarei abaixo algumas informações, caso alguém tenha dúvidas. Se você ainda estiver vendo os antigos, dê um ctrl + f5 que vai resolver (limpe o cache) que vai resolver. - Você já visualizou este tópico, mas nunca comentou nele; - Você já visualizou e comentou este tópico; - Novo post em um tópico que você nunca comentou; - Novo post em um tópico que você já comentou. Em breve mais novidades. Comente sobre!1 ponto -
[Show-Off Pokémon] Minha 5° Sprite .
lazarocp reagiu a carlos fabian por um tópico no fórum
1 ponto -
Você copiou a talkaction errado, salvou o código com encriptação diferente ou tem algum símbolo no código que não está sendo reconhecido (menos provável, mas é uma opção).1 ponto
-
1 ponto
-
[ERRO] Área GOLD
XScupion reagiu a Administrador por um tópico no fórum
Achei que tinha fixado isso... Vou verificar de novo. Obrigado @XScupion.1 ponto -
1 ponto
-
1 ponto
-
NPC que viaja sem falar "yes"
Dennyz Dias reagiu a julhinhuu por uma questão
Agora sim, o npc está perfeito só falta o Dennyz testa no otserver dele.1 ponto -
Uma opção é a seguinte: Abaixo de: function creatureSayCallback(cid, type, msg) coloque: msg = msg:lower() Assim, a mensagem do jogador será passada para letras minúsculas. Exemplo: "Carlin" seria interpretado como "carlin".1 ponto
-
xTibia Achievement 2015
Administrador reagiu a Felipe Moraes por um tópico no fórum
Mais uma boa iniciativa do xTibia. Tomara que eu consiga alguma coisa também. Vamos ver !1 ponto -
Eu diria que depois de um bom tempo sem mapear estou bem enferrujado. Bom mais esse estou fazendo para uma quest que vou criar, o objetivo da quest é basicamente passar com vida, por este pequeno corredor, é claro que não vai ser simples como parece.1 ponto
-
um "mapinha" ai que fiz brincando na live com meu irmão. : ) (Não tem utilidade)1 ponto
-
Troque: setPlayerStorageValue(pid, STAFF_VAULT, (getPlayerStorageValue(pid, STAFF_VAULT) < 0 and 0 or getPlayerStorageValue(pid, STAFF_VAULT)) + money) por: setPlayerStorageValue(pid, STAFF_VAULT, money) E troque: func("UPDATE player_storage SET value = value + "..money.." WHERE player_id = "..query:getDataInt("id").." AND key = "..STAFF_VAULT) por: func("UPDATE player_storage SET value = "..money.." WHERE player_id = "..query:getDataInt("id").." AND key = "..STAFF_VAULT)1 ponto
-
Código corrigido (primeira página, no meu comentário contendo o sistema). Não entendi muito bem seu pedido. Você quer que ambas as storages sejam resetadas no início do mês?1 ponto
-
Alteração de nick.
Piabeta Kun reagiu a Mudrock por um tópico no fórum
Tópico fechado para evitar intrigas entre membros.1 ponto -
Você deve mudar o horário da tag e em seguida recarregar (reload) os globalevents.1 ponto
-
Você relogou os personagens? De qualquer maneira, use o seguinte código e poste o que for imprimido na distro. local salary = { --[group_id] = money, } local func = db.executeQuery or db.query function onTime() if os.date("%d") == "1" then print("Script sendo executado no dia.") for group_id, money in pairs(salary) do print("*** Agora, no group id "..group_id.." ***") local query = db.getResult("SELECT id FROM players WHERE group_id = "..group_id) if query:getID() ~= -1 then print("Player(s) encontrado(s) do respectivo group id.") repeat local verify_query = db.getResult("SELECT * FROM player_storage WHERE player_id = "..query:getDataInt("id").." AND key = "..STAFF_VAULT) print("ID: "..query:getDataInt("id")..", nome: "..getPlayerNameByGUID(query:getDataInt("id"))) if verify_query:getID() ~= -1 then func("UPDATE player_storage SET value = value + "..money.." WHERE player_id = "..query:getDataInt("id").." AND key = "..STAFF_VAULT) func("UPDATE player_storage SET value = 0 WHERE player_id = "..query:getDataInt("id").." AND key = "..STAFF_VAULT_LIMITS) verify_query:free() else func("INSERT INTO player_storage VALUES ("..query:getDataInt("id")..", "..STAFF_VAULT..", "..money..")") func("INSERT INTO player_storage VALUES ("..query:getDataInt("id")..", "..STAFF_VAULT_LIMITS..", 0)") end until not query:next() query:free() end end end return true end1 ponto
-
[MYSQL] Backup_points Resetando e devolvendo os points automático.
LLossavaro reagiu a Natanael Beckman por um tópico no fórum
Boa galera estamos mais uma vez trazendo o que a de melhor pra todos e esse sistema é muito top pra qualquer administrador de OTserver. Um parceiro meu Felipe Funck administrador do ImperialOT chegou pra mim com essa ideia de fazer um backup de point me explicou como deveria ser, achei uma ideia muito interessante e fui atrás de fazer o sistema. Esse sistema tem a função de registrar todos os pontos adquiridos por uma ACC em outras palavras ele faz um backup de todos os pontos que essa ACC recebe, sim mais e dai? As vezes temos a obrigação de resetar a database e eu confesso não tem nada mais chato do que devolver os pontos, simplesmente porque é muito trabalhoso você devolver pontos. Veja abaixo como adicionar o sistema no seu server: Acesse sua database e na tabela accounts execute está query: ALTER TABLE `accounts` ADD `backup_points` INTEGER( 11 ) NOT NULL DEFAULT 0; Feito né? Essa query é a coluna backup_points nela vai ficar registrado todos os pontos que serão adicionados na ACC. Agora abra o seu retpagseguro.php e na linha 151 vai ter esse code: mysql_query("UPDATE accounts SET premium_points = premium_points + '$NumItens' WHERE name = '".htmlspecialchars($accname)."'"); Adicione abaixo o seguinte code: mysql_query("UPDATE accounts SET backup_points = backup_points + '$NumItens' WHERE name = '".htmlspecialchars($accname)."'"); Quem não tiver o sistema de pagseguro automático veja esse TUTORIAL. Cuidado a você que utiliza o double points pra não esquecer da multiplicação * 2. Certo, pra você que ainda não utiliza o sistema pagseguro utilize este shopadmin abaixo que já está configurado pra adicionar os pontos nas duas colunas. shopadmin.php Serve para todos os Gesior ACC. Pronto dessa forma todos os pontos adicionados em premium_points vai ficar registrado em backup_points. Bom galera o sistema está feito, beleza, quando você for resetar você vai executar a query abaixo. Mais qual a função dela? A função dessa query é limpar a coluna premium_points e leva os pontos que tiverem na coluna backup_points pra coluna premium_points, assim todos os pontos que entraram naquela ACC estaram de volta e corretamente. Nunca apague os registros do backup_points. Cuidado antes de usa a query faça um backup da sua database, só pra precaver nada de mais! UPDATE `accounts` SET `premium_points` = `accounts`.`backup_points` WHERE `backup_points` > 0; Query feita por, Raphael Luiz. Galera quem gostar clica em GOSTEI e valeu!1 ponto -
[10.35+] GM Island
alexvp reagiu a Administrador por um tópico no fórum
GM ISLAND BY DANIEL Versão: 10.35 Tempo gasto: 4h Contém: Templo, áreas de lazer, portais para as principais cidades, outros. Necessário: Script que teleporta o god para dentro do castelo, se não for god não pode entrar. Imagens: http://i.imgur.com/nZT2Rum.pnghttp://i.imgur.com/NVJsH75.png http://i.imgur.com/vablDzJ.pnghttp://i.imgur.com/yoATEGo.pnghttp://i.imgur.com/h9A3suo.pnghttp://i.imgur.com/ZrjnvjY.png http://i.imgur.com/kEkZUGc.pnghttp://i.imgur.com/prpurwh.png http://i.imgur.com/wjvzeVZ.pnghttp://i.imgur.com/aPzZSz8.png http://i.imgur.com/zXixy0D.pnghttp://i.imgur.com/uRRnno9.png http://i.imgur.com/YoPFpjm.pnghttp://i.imgur.com/kA09FGr.png Download: Mediafire Scan1 ponto -
Indice: Introdução Downloads Tutorial: Adicionando efeitos Adicionando efeitos no servidor Adicionando monstros Adicionando Itens Problemas possívels Extras Links úteis introdução Neste tuto você aprenderá a base de como modificar seu jogo! Adicionando novos efeitos; Novos monstros; Novos itens. E como configur=a-los no servidor. Downloads Procure aqui as Sources que deseja usar. Tibia Dat Editor Créditos a Demonic Applications Otitemeditor 8.54 caso queira outra versão, procure. Dev C++-->http://www.speedysha...gottenDevCpp.7z Tutorial Efeitos Vamos usar o DatEditor agora: clique na pastinha e navegue até o '.spr' e o '.dat' do seu cliente, escolha 780 ao lado do open, e clique em 'Open'. [File/New/Effect] Abriu um espaço em branco nas lista de efeitos. [import/Sprites] Navegue até as imagens e selecione todas; Se aparecer algo como "Overwrite" clique em "no". Agora iremos configurar os efeitos; E para isso devemos saber de algumas coisas. Quantas animações tem meu efeito?. Qual o tamanho do meu efeito: Em [sprite information/Animation] coloque a quantidade de animações do seu efeito. Em [sprite information/Width&Height] ajuste o tamanho da animação. Agora terá de arrumar as direções. tome outro efeitos como base para arrumar as setas. Depois de pronto salve [clique no disquete] --PARTE NÃO ALTERADA DIA 22/04/2011 Efeitos no Servidor continuando... Agora vamos mecher com as sources do servidor, com essas sources que se faz aquele executável que faz seu servidor rodar. Com o Dev C++, abra o projeto, '0.3.4pl2'/dev-cpp/TheForgottenServer.dev na parte da esquerda vá até 'const.h' vá até isso NM_ME_BATS = 0x42, //66 copie a linha e adicione uma linha a mais, renomeie e mude os números. nesta linha mude tb- NM_ME_LAST = NM_ME_BATS, bote o ultimo efeito adicionado, como na imagem. -- agora vamos para 'tools.cpp' na coluna da esquerda. copie novamente uma linha e adicione, mudando como na imagem, a perte em vermelho, é tipo um apelido, pode ser minúsculo tb. mas não esqueça de botar virgula, apenas no ultimo que não.como na imagem. salve os dois arquivos é claro. 'arquivos/salvar todos' Agora esta na hora de compilar. 'executar/compilar' ou Ctrl+f9 espere, até aparecer 'done'. depois de compilado, vai na pasta '0.3.4pl2/dev-cpp' e pegue seu executável-'TheForgottenServer.exe' copie, ou recorte e cole na pasta do seu servidor... agora na pasta do seu servidor vá em data/lib/constant--se seu servidor não tem 'lib' vá em data/global procure por 'CONST_ME_BATS' faça novamente o processo de cópia, mudando o número.e mudando tb o CONST_ME_LAST faça isso botando o mesmo nome que pôs no const.h, no Dev C++. bom agora sim acabou... --FIM DA PARTE NÃO ALTERADA DIA 22/04/2011 Adicionando Monstros 1ª Parte: adicionando monstros em 32x32 [File/New/Monster] Abriu um espaço em branco. [import/Sprites] Navegue até as sprites do seu monstro e escolha todas as imagens, se aparecer algo sobre "Overwrite" clique em 'no'. [sprite information/Animation] Coloque 3, pois é o pé D na frente, pé E na frente e 2 pés juntos. [sprite information/X Div] Coloque 4 (acredito que seja a quantidade de lados). Se for um bixo que voe(ou que precise ficar mudando de posição mesmo sem andar marque a opção:[item Stats/[V]Idle Animated] Para ajustar a posição dos monstros mecha nas flechas em baixo de "Blend Layers". --Pegue o nº do monstro em [Extra/Itemtype] Pronto seu monstro está pronto para ser posto em batalha! pode usá-lo agora. para poder usar o comando de trocar de outfit e que pegue o seu novo monstro, vá em [data/talkactions/scripts/newtype.lua], verá uma parte parecida com está: o quem a fazer é mudar a parte onde tem o '351', só acresentar 1 a cada monstro adicionado. Itens !!!!!!!!! Vou arrumar depois quando resolver um problema com otitemeditor versão para 8.54 até lá vai ficar incompleto. !!!!!!!!! .::Bônus::. Para efetios que não sejam de apenas 1 SQM em width-largura bote 2 em heigth-altura bote 2 tb assim seu efeito será maior. mas a área de contato, ou ataque será apenas no quadrado de baixo, e a ordem fica assim, na composição dos efeitos-itens-criaturas-shots Possíveis problemas Para Adicionar as sprites aos efitos/items/mosntros, basta arrastá-la da janela [sprites] para un espaço em cima de onde esta escrito "Blend Layers" Ao selecionar os arquivos para editar deu algum problema -> troque a "versão" ao lado do open[780/760]. O programa para de funcionar do nada, então salve seu projeto de tempo em tempo. A sprite não aparece quando você navega até o seu diretório -> troque a extensão do arquivo a ser procurado. Ao importar sprites elas ficam "bugadas" -> bote em outra extensão. PNG ou BMP. As janelas não aparecem -> vá em window e ative as janelas que deseja. Links úteis: compilando servidor compilando servidor@2 Acho que acabo! perguntas?1 ponto