xurumelous 0 #1 Posted December 1, 2006 Olá!! Fiz meu primeiro code de OTServ!!!! (felicidade =P) Testado no Evolutions 0.6.3! Quando você der look em alguém com access 3 ou maior, sairá a frase: "You see a Gamemaster." Funfo 100% aqui!! Sei que é simples, mas pow, meu primeiro code né rsrsrs Vamos lá: Em game.cpp Procure por: ss << "You see " << thing->getDescription(lookDistance); if(player->access >= g_config.getNumber(ConfigManager::ACCESS_LOOK)){ if(Creature* lookCreature = thing->getCreature()){ ss << " (Hp: " << lookCreature->health << "/" << lookCreature->healthmax << ")"; if(Player* lookPlayer = lookCreature->getPlayer()){ ss << " (Mp: " << lookPlayer->mana << "/" << lookPlayer->manamax << ")"; } } else if(Item* item = thing->getItem()){ ss << " ID: " << item->getID() << "."; if(item->getActionId()) ss << " ActionID: " << item->getActionId() << "."; if(item->getUniqueId()) ss << " UniqueID: " << item->getUniqueId() << "."; } ss << " Position(X: " << thing->getPosition().x << " Y: " << thing->getPosition().y << " Z: " << thing->getPosition().z << ")"; } Substitua por: bool xuru = false; if(Creature* lookCreature = thing->getCreature()){ if(Player* lookPlayer = lookCreature->getPlayer()){ if(lookPlayer->access >= 3) { ss << "You See a Gamemaster."; xuru = true; } else { ss << "You see " << thing->getDescription(lookDistance); } } } else { ss << "You see " << thing->getDescription(lookDistance); } if(xuru == false) { if(player->access >= g_config.getNumber(ConfigManager::ACCESS_LOOK)){ if(Creature* lookCreature = thing->getCreature()){ ss << " (Hp: " << lookCreature->health << "/" << lookCreature->healthmax << ")"; if(Player* lookPlayer = lookCreature->getPlayer()){ ss << " (Mp: " << lookPlayer->mana << "/" << lookPlayer->manamax << ")"; } } else if(Item* item = thing->getItem()){ ss << " ID: " << item->getID() << "."; if(item->getActionId()) ss << " ActionID: " << item->getActionId() << "."; if(item->getUniqueId()) ss << " UniqueID: " << item->getUniqueId() << "."; } ss << " Position(X: " << thing->getPosition().x << " Y: " << thing->getPosition().y << " Z: " << thing->getPosition().z << ")"; } } Só isso! facinho facinho =P Bye~ Share this post Link to post
Ablankzin 0 #2 Posted December 1, 2006 Está bem legal...tem um aqui no forum que é bem parecido com este...mas para primeiro code está bem legal =) Share this post Link to post
Jordan 0 #4 Posted December 3, 2006 Parabéns xurumelous.aqui funfo certin ^^ Share this post Link to post
Guest Rappa Carnaúba #5 Posted December 3, 2006 Xurumelous, credito ao nosso amigo Pedro B. não? http://forum.otserv.com.br/style_emoticons/<#EMO_DIR#>/biggrin.gif Share this post Link to post
Faelzinhow 0 #6 Posted December 3, 2006 Se for seu, está de parabens!agora gogo aulas de c++, e fazer um Code fu***** mesmo :] Share this post Link to post
xurumelous 0 #7 Posted December 3, 2006 @Rappa Carnaúba Isso foi uma acusação?@allThx =] Share this post Link to post
Guest Staype #8 Posted December 3, 2006 Pow, ta rox! : Dtestado e aprovado xP Share this post Link to post
Oxy Nitrous 0 #9 Posted December 4, 2006 Pedro B.? nem eh do otfans...foi postado ali ewmbaixo n sei por kem tbm soh q o code eh de GOd Share this post Link to post
Guest Rappa Carnaúba #10 Posted December 4, 2006 @Xurumelous....não né http://forum.otserv.com.br/style_emoticons/<#EMO_DIR#>/tongue.gif mais você ta usando o codigo do pedro b que se encontrava no evolutions e vc fez uma pequena modificacão http://otfans.net/showthread.php?t=42973&h...highlight=pedro @Oxy nitrous Quem é você pra dizer que o pedro b não é da OTFans? ele é um oficial developer da CVS uma coisa que você nunca sera não é? Olhe no link ai seu nub XD Share this post Link to post
xurumelous 0 #11 Posted December 5, 2006 @Rappa CarnaúbaBom, até quando fiz ele era 100% meu =SNão copiei de nenhum lugar...Estou aprendendo C++ mas não me baseei em outro ;] Share this post Link to post
Pedro Vincenzo 0 #12 Posted December 8, 2006 Cara, nada haver com o code do Pedro. B, porra Rapha, se nem olha o código pra dizer de quem ele é. Porisso que o Honux te pwna todo dia.. p***a.. k me*** heim.Parabéns Xurmelous, continue assim;// Pedro Vincenzo Share this post Link to post
rivcdrigo 0 #13 Posted December 15, 2006 mt bom msm! agr us gm podem botar moral xD hail all! Share this post Link to post
rivcdrigo 0 #14 Posted December 15, 2006 mt bom msm! agr us gm podem botar moral xD hail all! Share this post Link to post
Guest Victor Hugo #15 Posted January 3, 2007 Ow cara no meu game.cpp nao tem ss << "You see " << thing->getDescription(lookDistance); if(player->access >= g_config.getNumber(ConfigManager::ACCESS_LOOK)){ if(Creature* lookCreature = thing->getCreature()){ ss << " (Hp: " << lookCreature->health << "/" << lookCreature->healthmax << ")"; if(Player* lookPlayer = lookCreature->getPlayer()){ ss << " (Mp: " << lookPlayer->mana << "/" << lookPlayer->manamax << ")"; } } else if(Item* item = thing->getItem()){ ss << " ID: " << item->getID() << "."; if(item->getActionId()) ss << " ActionID: " << item->getActionId() << "."; if(item->getUniqueId()) ss << " UniqueID: " << item->getUniqueId() << "."; } ss << " Position(X: " << thing->getPosition().x << " Y: " << thing->getPosition().y << " Z: " << thing->getPosition().z << ")"; } se eu procurar por : ss << "You see " << thing->getDescription(lookDistance); eu vo axar isso: ss << "You see " << thing->getDescription(lookDistance); player->sendTextMessage(MSG_INFO_DESCR, ss.str()); return true; } bool Game::playerSetAttackedCreature(Player* player, unsigned long creatureId) { OTSYS_THREAD_LOCK_CLASS lockClass(gameLock, "Game::playerSetAttackedCreature()"); if(player->isRemoved()) return false; etc... nao axei o que vc tava pedindo =( Share this post Link to post
Guest HoKaGeSs #17 Posted January 21, 2007 Comigo aconteceu quase a msma coisa q o Victor... tpw, soh q n existe nem uma parte parecida... y.y... flws Share this post Link to post
xXSinistrOXx 0 #20 Posted February 10, 2007 bem loko continue assim, postando mais C++ pra nois :] Share this post Link to post