Jump to content

Recommended Posts

  • Premium

Hello !

I wanna block summoning (horse and all of mounts) in map with index 110.

How can I do that ? (via source)

*I want horse to dissapear when they log in in that map.

Thank you 1

Link to comment
https://metin2.dev/topic/13064-questionblock-summoning-in-specific-map/
Share on other sites

  • Active Member

quest block_horse begin
    state start begin
        when 50051.use or 50052.use or 50053.use with pc.get_map_index() == 26 or pc.get_map_index() == 114 or pc.get_map_index() == 121 or pc.get_map_index() == 125 or pc.get_map_index() == 110 or pc.get_map_index() == 111 begin
            syschat("Sorry, can't call the horse in this map")
        end
        
        when login with pc.get_map_index() == 26 or pc.get_map_index() == 114 or pc.get_map_index() == 121 or pc.get_map_index() == 125 or pc.get_map_index() == 110 or pc.get_map_index() == 111 begin
            if pc.is_mount() then
                pc.unmount()
                horse.unsummon()
                syschat("Sorry, can't have the horse or another mount in this map")
            else
                horse.unsummon()
                syschat("Sorry, can't have the horse or another mount in this map")
            end
        end
    end
end

Example add in function ->> bool CHARACTER::UseItem(TItemPos Cell, TItemPos DestCell) (char_item.cpp)

	int pTableArray[] = {53001, 53002, 53003, 53004, 53005, 53006, 53007, 53008, 53009, 53010, 53011, 53012, 53013, 53014, 53015, 53016, 53017, 53018, 53019, 53020, 53021, 53022, 53023, 53024, 53025};
	
	for (int i = 0; i < _countof(pTableArray); i++){
		if (item->GetVnum() == pTableArray[i] && GetMapIndex() == 110)
		{
			ChatPacket(CHAT_TYPE_INFO, "<Summon> You can't summon item [%s] in this map!", item->GetName());
			return false;
		}
	}

 

  • Love 1
  • Premium

Half o problem solved. (All items wanted are now blocked).

Final problem: How to unmount everytime when they go in specific map ? (I tried quest shown in this topic but works only with horse and old mounts).

What can I do to work with Power Mounts too ? (Item remain always in inventory)

  • 2 weeks later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.