Jump to content

How to allow horse name like "My name <3" for example


Go to solution Solved by Galet,

Recommended Posts

Hi there, like my little say, I want to allow back my Horse name to be how we want, actualy it's restricted to be something like

"Petname"

 

But on my old gamecore 2089m it was allowed to be like 

"Dat" "Or Dat" "Or dat <3" however we want 

 

Someone can help me to do it back into my source ?

Thanks guys :)

 

 

Link to comment
Share on other sites

  • Premium
  • Solution

Try with this code in questlua_horse.cpp, replace your old function. (I'm not sure)

	int horse_set_name(lua_State* L)
	{
		// ¸®ÅÏ°ª
		// 0 : ¼ÒÀ¯ÇÑ ¸»ÀÌ ¾ø´Ù
		// 1 : À߸øµÈ À̸§ÀÌ´Ù
		// 2 : À̸§ ¹Ù²Ù±â ¼º°ø

		if ( lua_isstring(L, -1) != true ) return 0;

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

		if ( ch->GetHorseLevel() > 0 )
		{
			const char* pHorseName = lua_tostring(L, -1);

			if ( pHorseName == NULL )
			{
				lua_pushnumber(L, 1);
			}
			else
			{
				int nHorseNameDuration = test_server == true ? 60*5 : 60*60*24*30;

				ch->SetQuestFlag("horse_name.valid_till", get_global_time() + nHorseNameDuration);
				ch->AddAffect(AFFECT_HORSE_NAME, 0, 0, 0, PASSES_PER_SEC(nHorseNameDuration), 0, true);

				CHorseNameManager::instance().UpdateHorseName(ch->GetPlayerID(), lua_tostring(L, -1), true);

				ch->HorseSummon(false, true);
				ch->HorseSummon(true, true);

				lua_pushnumber(L, 2);
			}
		}
		else
		{
			lua_pushnumber(L, 0);
		}

		return 1;
	}
  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.