Premium FlorinMarian 122 Posted December 31, 2016 Premium Share Posted December 31, 2016 Hello guys ! I was looking for these before but nobody gave me a solution for this. How to block horse, pet and mount calling in map 110 & 111 ? Thank you ! Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
Premium EnKor 42 Posted December 31, 2016 Premium Share Posted December 31, 2016 in quest summon_horse.quest and ride.quest After: # when xxxxxx.use begin # paste if pc.get_map_index() >= 110000 and pc.get_map_index() <= 110500 then return end if pc.get_map_index() >= 111000 and pc.get_map_index() <= 111500 then return end if pc.get_sex() == true and npc.get_sex() == false then npc.purge() end Link to comment Share on other sites More sharing options...
Premium FlorinMarian 122 Posted December 31, 2016 Author Premium Share Posted December 31, 2016 3 hours ago, EnKor said: in quest summon_horse.quest and ride.quest After: # when xxxxxx.use begin # paste if pc.get_map_index() >= 101000 and pc.get_map_index() <= 110500 then return end if pc.get_map_index() >= 111000 and pc.get_map_index() <= 111500 then return end Thank you for this idea but it will not work, you tried to help me but with my noob level i can see some mistakes Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
Premium EnKor 42 Posted December 31, 2016 Premium Share Posted December 31, 2016 2 minutes ago, FlorinMarian said: Thank you for this idea but it will not work, you tried to help me but with my noob level i can see some mistakes i did not test that, but i belive it will work u only need to know the right map index and change it with my. if pc.get_sex() == true and npc.get_sex() == false then npc.purge() end Link to comment Share on other sites More sharing options...
Silver Sonitex 1438 Posted December 31, 2016 Silver Share Posted December 31, 2016 Why wouldn't that work if I may ask? Link to comment Share on other sites More sharing options...
Premium FlorinMarian 122 Posted December 31, 2016 Author Premium Share Posted December 31, 2016 6 hours ago, EnKor said: in quest summon_horse.quest and ride.quest After: # when xxxxxx.use begin # paste if pc.get_map_index() >= 110000 and pc.get_map_index() <= 110500 then return end if pc.get_map_index() >= 111000 and pc.get_map_index() <= 111500 then return end so: - pc.get_map_index need to be exactly map_index (110 and 111 in my case) eg: pc.get_map_index == 110 or pc.get_map_index == 111 - between pc.get_map_index() need to be "or" not "and" beccause if you say "and" will never happen. A player cannot be in two maps same time. Happ new year ! Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted December 31, 2016 Premium Share Posted December 31, 2016 3 minutes ago, FlorinMarian said: so: - pc.get_map_index need to be exactly map_index (110 and 111 in my case) eg: pc.get_map_index == 110 or pc.get_map_index == 111 - between pc.get_map_index() need to be "or" not "and" beccause if you say "and" will never happen. A player cannot be in two maps same time. Happ new year ! If you know, why you come here to ask then? Just do it. Link to comment Share on other sites More sharing options...
Premium FlorinMarian 122 Posted December 31, 2016 Author Premium Share Posted December 31, 2016 3 minutes ago, tierrilopes said: If you know, why you come here to ask then? Just do it. As my topic title say, i wanna do it via source. Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
Braxy 619 Posted December 31, 2016 Share Posted December 31, 2016 18 minutes ago, FlorinMarian said: so: - pc.get_map_index need to be exactly map_index (110 and 111 in my case) eg: pc.get_map_index == 110 or pc.get_map_index == 111 - between pc.get_map_index() need to be "or" not "and" beccause if you say "and" will never happen. A player cannot be in two maps same time. Happ new year ! The and means kind of between these 2 index you can't summon the horse xD . Like if the player is between these numbers ( 25000 / 27000 ) the horse summon isn't available xD If u write ''or'' will get just the map index's you write, on this example just 25000 and 27000 As long as I'll be a threat for you , i will always be your target :3 Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted December 31, 2016 Premium Share Posted December 31, 2016 if (ch->GetMapIndex() == 110) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cant use this here.")); return -1; } Is this what you want? You can use the vnum of the item you want to block, or just add it to the function, for example mount one for the horse. Link to comment Share on other sites More sharing options...
Premium EnKor 42 Posted December 31, 2016 Premium Share Posted December 31, 2016 1 hour ago, FlorinMarian said: so: - pc.get_map_index need to be exactly map_index (110 and 111 in my case) eg: pc.get_map_index == 110 or pc.get_map_index == 111 - between pc.get_map_index() need to be "or" not "and" beccause if you say "and" will never happen. A player cannot be in two maps same time. Happ new year ! What?? Ok. Gogo use "or" in tbis case. if pc.get_sex() == true and npc.get_sex() == false then npc.purge() end Link to comment Share on other sites More sharing options...
Premium FlorinMarian 122 Posted January 1, 2017 Author Premium Share Posted January 1, 2017 11 hours ago, tierrilopes said: if (ch->GetMapIndex() == 110) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cant use this here.")); return -1; } Is this what you want? You can use the vnum of the item you want to block, or just add it to the function, for example mount one for the horse. Okay, thank you. Now, anybody can create a function/quest which dismount/send horse away when a player enter on these maps? Thank you! Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted January 1, 2017 Premium Share Posted January 1, 2017 ch->StopRiding(); //src Link to comment Share on other sites More sharing options...
metin2-factory 1013 Posted January 1, 2017 Share Posted January 1, 2017 @tierrilopes Atleast if you give an answer, give a proper one. Anyway, open input_login.cpp, look for : Spoiler else { if (CWarMapManager::instance().IsWarMap(ch->GetMapIndex()) || marriage::WeddingManager::instance().IsWeddingMap(ch->GetMapIndex())) { if (!test_server) ch->WarpSet(EMPIRE_START_X(ch->GetEmpire()), EMPIRE_START_Y(ch->GetEmpire())); } } add below: Spoiler if (ch->GetMapIndex() == 110) { if (ch->IsRiding()) { ch->StopRiding(); } } 1 2 Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted January 1, 2017 Premium Share Posted January 1, 2017 @metin2-factory spoon feeding doesnt make people learn, only makes them copy-paste. 2 Link to comment Share on other sites More sharing options...
Ikh 35 Posted January 1, 2017 Share Posted January 1, 2017 31 minutes ago, metin2-factory said: @tierrilopes Atleast if you give an answer, give a proper one. Anyway, open input_login.cpp, look for : Reveal hidden contents else { if (CWarMapManager::instance().IsWarMap(ch->GetMapIndex()) || marriage::WeddingManager::instance().IsWeddingMap(ch->GetMapIndex())) { if (!test_server) ch->WarpSet(EMPIRE_START_X(ch->GetEmpire()), EMPIRE_START_Y(ch->GetEmpire())); } } add below: Reveal hidden contents if (ch->GetMapIndex() == 110) { if (ch->IsRiding()) { ch->StopRiding(); } } If you want to get a good answer, then you have to ask a good question. And learn the difference between : I want help - works for me - create functins for me Link to comment Share on other sites More sharing options...
MORTE 78 Posted January 1, 2017 Share Posted January 1, 2017 47 minutes ago, metin2-factory said: @tierrilopes Atleast if you give an answer, give a proper one. Anyway, open input_login.cpp, look for : Hide contents else { if (CWarMapManager::instance().IsWarMap(ch->GetMapIndex()) || marriage::WeddingManager::instance().IsWeddingMap(ch->GetMapIndex())) { if (!test_server) ch->WarpSet(EMPIRE_START_X(ch->GetEmpire()), EMPIRE_START_Y(ch->GetEmpire())); } } add below: Hide contents if (ch->GetMapIndex() == 110) { if (ch->IsRiding()) { ch->StopRiding(); } } Because the index is 110000 And with each war increases, it was not to be the fixed value that is in files 110 and 111 ? Link to comment Share on other sites More sharing options...
alondark 59 Posted January 2, 2017 Share Posted January 2, 2017 char_horse.cpp void CHARACTER::HorseSummon(bool bSummon, bool bFromFar, DWORD dwVnum, const char* pPetName) { if ( bSummon ) { //NOTE : summon했는데 이미 horse가 있으면 아무것도 안한다. if( m_chHorse != NULL ) return; if (GetHorseLevel() <= 0) return; if (GetMapIndex() == 110 || GetMapIndex() == 111 || GetMapIndex() == 113 || GetMapIndex() == 82) { ChatPacket(CHAT_TYPE_INFO, "Burada Ata Binemezsin.."); return; } help : sykpe :alondark7 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now