Jump to content

Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

Add it to questlua_pc.cpp:

int pc_change_race(lua_State * L)
{
	LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

	if (!lua_isnumber(L, 1)) 
	{
		return 0;
	}

	ch->SetRace(lua_tonumber(L,1));
	ch->SetSkillGroup(0);
	ch->ClearSkill();
	ch->ClearSubSkill();
	ch->SetPolymorph(101);
	ch->SetPolymorph(0);
	return 0;
}

Next add this to the RegisterPCFunctionTable:

{"change_race", pc_change_race},

After you can use it in quests:

pc.change_race(NUMBER)

Numbers for races:

0 - warrior man
1 - ninja woman
2 - sura man
3 - shaman woman
4 - warrior woman
5 - ninja man
6 - sura woman
7 - shaman man

  • Metin2 Dev 14
  • Eyes 2
  • Good 1
  • Love 11

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

Link to comment
https://metin2.dev/topic/16482-quest-function-pc-change-race/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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.