Jump to content
×
×
  • Create New...
  • 0

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


tmoitoi

Question

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

9 answers to this question

Recommended Posts

  • 0
  • Premium

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

  • 0

Thanks you :)

(Merci l'ami :P )

 

 

 

 

PS: If you guys too are borred of the spawn of the horse every rename just comment or edit like this:

 

Switch:

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

To:

ch->HorseSummon(false, false);
  • Love 1
 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.