Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 07/07/15 em todas áreas
-
2 pontos
-
Global Full [CLIENTS COMPATÍVEIS] 10 e 11.5. [BUGS E DOWNLOAD] BAIXEM E REPORTEM EM: OTXGlobal Full [FEATURES] NEW DEPOT, NEW SPAWN, NEW CAST SYSTEM, NEW NPC SYSTEM VIA BANK BALANCE, NEW CRITICAL BOOST SYSTEM, NEW POTIONS, REWARD SYSTEM, PREY ... [MAPA] FULL GLOBAL MAP WITH FEYRIST TODAS CIDADES E NOVAS AREAS TODAS QUESTS FUNCIONANDO! [EVENTS] WAR-ANTIENTROSA [CONTATO] SKYPE: onjogos WHATSAPP: (66) 998427-4493 [Créditos]Tfs 1.2 Developers -Zbizu - Pitis91 - MatheusMkalo - Gesior - Lundrial - M4G0 - Fish04k - Printer - Djarek - Ninjalulz - Slavidodo - Thexamx - Socket2810 - Ciroc -Absolute - Gordonbay - Mitsuig - Alissonfgp - Gunz - Bruno Minervino - Comedinha -Hirako - Maya - Mattyx14 – Darkjav - Viking Tibia1 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
-
Distros compilados [TFS 1.0 e 1.2]-[10.78] x86 - x64 + DLLs
underewarr reagiu a Administrador por um tópico no fórum
Distros [TFS 1.0 e 1.2]-[10.78] x86 e x64 1º- TFS 1.2 - 10.78 x86 ------------------- DOWNLOAD - SCAN - Novos OutFits & Mounts 2º- TFS 1.2 - 10.78 x64 ------------------- DOWNLOAD - SCAN - Novos OutFits & Mounts 3º- TFS 1.2 - 10.78 x64 Ubuntu 14.04 - DOWNLOAD - SCAN - Novos OutFits & Mounts 4º- TFS 1.0 - 10.78 x86 ------------------- DOWNLOAD - SCAN - V13 5º- TFS 1.0 - 10.78 x64 ------------------- DOWNLOAD - SCAN - V13 6º- TFS 1.0 - 10.78 x64 Ubuntu 14.04 - DOWNLOAD - SCAN - V13 Sources : Source TFS 1.0 - V13 Source TFS 1.2 - 10.78 Novos Outfits & Mounts Créditos : Bruno Minervino Mitsuig Tiroleivi Fireelement1 ponto -
Óla Pessoal,nesse tópico vou postar sprites referente a pokemon.[não tenho muito experiencia com sprites] Remakes antes -- depois v2 shiny Torkoal ---> [em breve v2] Oddish ---> Grimer ---> Camerupt --->1 ponto
-
[PDA] New Ditto System[PXG]
steelpzeza reagiu a gabrielbsales por um tópico no fórum
Bom, esse ditto system: -Copia o pokemon e o balanceia sem necessidade de puxa-lo. -Copias Habilidades... Primeiramente, vá no some functions.lua - Localizado na pasta lib. E adicione isto no final(depois do ultimo end): Bom, essas são as funções de transformar e destransformar. Agora, vá no order.lua - Localizado no actions/scripts. E procure por: -------- TRANSFORM ---------- Apague tudo aqui dentro, até o: -------- LIGHT -------------- Ali dentro, bote: Pronto, ditto ja está tranformando, agora falta o !revert, para isso vá em talkactions/scripts e crie um arquivo(.lua) com nome de dittorevert, e dentro coloque: Agora, no talkactions.xml adicione esta linha: <talkaction words = "!revert;/revert" hide="yes" event = "script" value = "dittorevert.lua"/> Se fizer tudo corretamente, funcionará normalmente. Gif: Créditos: Gabrielbsales(sou op faço tudo solo)1 ponto -
Tipos de DAMAGE
Mysterious Subwat reagiu a RigBy por uma questão
Vai na sua lib em constant.lua, que la amostra. COMBAT_PHYSICALDAMAGE = 1 COMBAT_ENERGYDAMAGE = 2 COMBAT_EARTHDAMAGE = 4 COMBAT_POISONDAMAGE = 4 COMBAT_FIREDAMAGE = 8 COMBAT_UNDEFINEDDAMAGE = 16 COMBAT_LIFEDRAIN = 32 COMBAT_MANADRAIN = 64 COMBAT_HEALING = 128 COMBAT_DROWNDAMAGE = 256 COMBAT_ICEDAMAGE = 512 COMBAT_HOLYDAMAGE = 1024 COMBAT_DEATHDAMAGE = 20481 ponto -
VERSÃO 8.6 Ta cansado dos OT de war porco de hoje? Esse é o OT de war estilo das antigas War estilo Retro, mapa do Mega-War/ Shadowar editado Danos e Spells de 7.6 > diversos mapas (rook, venore, shadowar, edron, etc) > formulas, magias antigas (mort hur, mas pox, etc) > items com atributos antigos > knight de UH, mage de burst arrow Download: http://www.speedysha...ldTibiaWar.html Scan: https://www.virustot...sis/1411073909/ Script Change Map http://www.speedysha... lugar das city1 ponto
-
Eu fiz este mesmo procedimento só que aonde tinha "Ditto" troquei por shiny ditto dps faço um tópico para ajudar a vcs Pronto Criei o tópico e o tutorial segue ai: http://www.xtibia.com/forum/topic/235361-ditto-e-shiny-ditto-system-igual-pxg-100/?p=16593311 ponto
-
[Show Off] Beto
Administrador reagiu a beto06 por um tópico no fórum
Mercado Negro (Em progresso...) http://3.1m.yt/dQl5_iaAy.png1 ponto -
Teleport Room
AdilsonHacker reagiu a Quorra por um tópico no fórum
Olá XTibianos! Sou novo em mapping mas venho trazer uma Teleport Room, feita inteiramente por mim, mais voltada para servers Baiak, ou que tenham teleports =P Fiz de um modelo um tanto quanto diferente, deixando mais dificil e mais emocionante para quem gosta. Aqui estão alguns detalhes que podem ajudar você a melhorar o desempenho dela: - Configurar os teleports para irem para o nivel inferior e superior, dando a escolha do player ir para um PVP Enforced, ou voltar para os teleports. - Configurar as portas por levels, de forma crescente, fazendo com que maior o nivel e habilidade, mais difícil os monstros vão ficando. - Logo após entrar na porta e descer a escada, terá um tile de PZ, e logo o próximo, será Non-PZ, assim antes de entrar no teleport, terá que enfrentar o tipo de monstro, ou chefe que poderá encontrar lá. Dessa forma o player saberá se esta pronto para aquela areá ou quem sabe deva treinar mais, porque não adiantar ter nível e não ter habilidade :3 (isso vai de cada um) - No final terá uma parte de teleports no sub-solo, onde no meu caso, usaria apenas para os VIPs, ou para o melhores Bosses do servidor. - Em baixo dos teleports tem uma area Non-PZ, onde poderam ficar ali, passar um tempo, ou simplesmente batalhar com seus inimigos! (Aconselhável utilizar essa area para PVP-Enforced, já que tem algumas armadilhas.) PS: Meu intuito na verdade é poder dar a base de uma nova TP Room, vocês poderam configurar do jeito que quiserem :3 OBS: Os monstros colocados são apenas para exemplificar como será a areá do teleport ^^ Bom, chega de conversa e vamos as SS´s: Se gostarem poderei disponibilizar para download. Criticas e elogios são bem vindo, mais que tenham sentido. Se gostaram REP+ Abraços.1 ponto -
1 ponto
-
Do modo que foi feito nao da, ele nao salva quem esta na party, somente o numero A unica hora que ele salva um creatureId em storage é quando está enviando convite Linha 66: setPlayerStorageValue(pid, 9155, getCreatureName(cid) Um modo de salvar sem ocupar muito espaço seria por meio de string, e salvando o guid. function removePartner(name) local listPartner = getOfflinePlayerStorageValue(name, listPartnerStorage) if listPartner == -1 then return false end local guid = getPlayerGUIDByName(name) listPartner = listPartner:gsub(string.format("%d|", guid), "") setOfflinePlayerStorageValue(name, listPartnerStorage, listPartner) return true end function addPartner(name) local listPartner = getOfflinePlayerStorageValue(name, listPartnerStorage) if listPartner == -1 then listPartner = "" end local guid = getPlayerGUIDByName(name) if not (listPartner:match(string.format("%d|", guid))) then listPartner = listPartner .. string.format("%d|", guid) setOfflinePlayerStorageValue(name, listPartnerStorage, listPartner) return true end return false end function getPartners(name) local players = {} local listPartner = getOfflinePlayerStorageValue(name, listPartnerStorage) if listPartner == -1 then return players end for guid in listPartner:gmatch("(%d+)|") do table.insert(players, guid) end return players end Dai tu implementa isso no code1 ponto
-
[WONDERLAND] Sword Art Online RPG
bielstocco reagiu a Fearlet155 por um tópico no fórum
- Introdução Do Jogo - Toda a história do game se passará no mundo de Aincrad, onde o jogador poderá explorar mais de 70 cidades e interagir com os personagens dessas cidades. Ao longo da aventura o player poderá conhecer e adicionar novos membros ao seu grupo, assim como também poderá aprofundar relacionamentos com seus parceiros. - Propostas e infomações e sistemas ja existentes no servidor você encontra no video abaixo - Estamos dando créditos ao antigo servidor do thalia que pegamos ele de base para continuar o projeto quem quiser ver o que ja tem no projeto passado só da uma olha neste link http://www.xtibia.com/forum/topic/223216-slayer-art-online-sao/1 ponto