Jump to content

Recommended Posts

  • Honorable Member

Open questlua_pc.cpp and search for the pc_mount function.

Overwrite the whole function with this:

	int pc_mount(lua_State* L)
	{
		if (!lua_isnumber(L, 1))
			return 0;

		int length = 60;

		if (lua_isnumber(L, 2))
			length = (int)lua_tonumber(L, 2);

		DWORD mount_vnum = (DWORD)lua_tonumber(L, 1);

		if (length < 0)
			length = 60;

		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

		ch->RemoveAffect(AFFECT_MOUNT);
		ch->RemoveAffect(AFFECT_MOUNT_BONUS);

		// ¸»ŔĚ ĽŇČŻµÇľî µű¶ó´Ů´Ď´Â »óŶó¸é ¸»şÎĹÍ ľřľÚ
		if (ch->GetHorse())
			ch->HorseSummon(false);

		int ertek = 0;
			
		if (lua_isnumber(L, 3))
			ertek = (int)lua_tonumber(L, 3);
		
		if (ertek <= 0)
			ertek = 0;
			
		ch->AddAffect(AFFECT_MOUNT, POINT_MOV_SPEED, ertek, AFF_NONE, length, 0, true, true);
		
		
		return 0;
	}

Then you can use it in quests like

pc.mount(ID, duration, speed)

 

  • Metin2 Dev 1
  • Love 1

992404397646696589.png
Former C++ Developer at Gameloft on DML
Join my Discord: Distraught Labs

Link to comment
https://metin2.dev/topic/16483-set-speed-for-riding-mounts/
Share on other sites

  • 4 weeks later...
  • 8 months 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.