[Admin] tierrilopes Posted March 14, 2016 at 04:05 PM Share Posted March 14, 2016 at 04:05 PM Serve para bloquear a entrada em mapas através do nível da personagem. Ir até ao ficheiro game/src/char.cpp Procurar por: bool CAN_ENTER_ZONE(const LPCHARACTER& ch, int map_index) { switch (map_index) { case 351: case 352: if (ch->GetLevel() < 100) return false; break; case 301: case 302: case 303: case 304: if (ch->GetLevel() < 90) return false; Adicionar mais mapas e níveis consoante desejado. Exemplo: bool CAN_ENTER_ZONE(const LPCHARACTER& ch, int map_index) { switch (map_index) { case 351: case 352: if (ch->GetLevel() < 100) return false; break; case 301: case 302: case 303: case 304: if (ch->GetLevel() < 90) return false; break; case 208: case 216: if (ch->GetLevel() < 75) return false; break; case 217: if (ch->GetLevel() < 50) return false; break; case 66: if (ch->GetLevel() < 40) return false; break; } return true; } 1 Link to comment
Magician Posted August 24, 2016 at 12:43 PM Share Posted August 24, 2016 at 12:43 PM Também podias ensinar a Por mapas apenas para gm Que Ficaria assim : bool CAN_ENTER_ZONE(const LPCHARACTER& ch, int map_index) { switch (map_index) { case indexmap: if(ch->IsGM()) return true; break; Link to comment
Karbust Posted August 24, 2016 at 01:06 PM Share Posted August 24, 2016 at 01:06 PM Também podias ensinar a Por mapas apenas para gm Que Ficaria assim : bool CAN_ENTER_ZONE(const LPCHARACTER& ch, int map_index) { switch (map_index) { case indexmap: if(ch->IsGM()) return true; break; Ou bool CAN_ENTER_ZONE(const LPCHARACTER& ch, int map_index) { switch (map_index) { case indexmap: if(!ch->IsGM()) return false; break; Link to comment
Magician Posted August 24, 2016 at 01:13 PM Share Posted August 24, 2016 at 01:13 PM Ou bool CAN_ENTER_ZONE(const LPCHARACTER& ch, int map_index) { switch (map_index) { case indexmap: if(!ch->IsGM()) return false; break; Tambem usa o return false Na Minha opinião assim ficaria melhor bool CAN_ENTER_ZONE(const LPCHARACTER& ch, int map_index) { switch (map_index) { case indexmap: if(false == ch->IsGM()) return false; break; Link to comment
Karbust Posted August 24, 2016 at 01:15 PM Share Posted August 24, 2016 at 01:15 PM O ! significa diferente, se for diferente de gm dá return false... Link to comment
Magician Posted August 24, 2016 at 01:21 PM Share Posted August 24, 2016 at 01:21 PM O ! significa diferente, se for diferente de gm dá return false... ya eu sei mas if ( false == ch->IsGM()) return false; break; tambem da o return false xd Link to comment
Karbust Posted August 24, 2016 at 01:23 PM Share Posted August 24, 2016 at 01:23 PM Para que complicar quando se pode meter um simples ponto de exclamação (!) ... Link to comment
Magician Posted August 24, 2016 at 01:26 PM Share Posted August 24, 2016 at 01:26 PM Para que complicar quando se pode meter um simples ponto de exclamação (!) ... kkkkk, não é assim tão complicado, mas tens razão Link to comment
Nemya Posted January 31, 2017 at 09:44 AM Share Posted January 31, 2017 at 09:44 AM Hello, thank's for the tutorial. I have a question, is possible to do it with a mysql table? thank's Link to comment
Dynamic Things Posted January 31, 2017 at 11:43 AM Share Posted January 31, 2017 at 11:43 AM Hello, thank's for the tutorial. I have a question, is possible to do it with a mysql table? thank's I did not understand your question, could you explain it better, please? Link to comment
Nemya Posted January 31, 2017 at 01:53 PM Share Posted January 31, 2017 at 01:53 PM I did not understand your question, could you explain it better, please? Ok. For the moment you need build the source to add a new map, in this system. I ask, is possible to do this system but with a table (navicat) , to add map and level, like this, you don't need build source. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now