tmoitoi 26 Posted April 22, 2015 Share Posted April 22, 2015 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 More sharing options...
Premium Solution Galet 509 Posted April 22, 2015 Premium Solution Share Posted April 22, 2015 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; } 1 Link to comment Share on other sites More sharing options...
tmoitoi 26 Posted April 22, 2015 Author Share Posted April 22, 2015 Thanks you (Merci l'ami ) 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); 1 Link to comment Share on other sites More sharing options...
Premium Galet 509 Posted April 23, 2015 Premium Share Posted April 23, 2015 Ur welcome (De rien ) Link to comment Share on other sites More sharing options...
tmoitoi 26 Posted April 24, 2015 Author Share Posted April 24, 2015 There's a problem With your syntax the change work but when i reboot the server, my pet is with a virgin name An idea ? thanks Link to comment Share on other sites More sharing options...
Premium Galet 509 Posted April 24, 2015 Premium Share Posted April 24, 2015 Table horse_name format utf8 ? Link to comment Share on other sites More sharing options...
tmoitoi 26 Posted April 26, 2015 Author Share Posted April 26, 2015 (edited) Yes, i've do some tests, when i put the name, there's the name in the horse_name table, but, when i restart the server and spawn my pet, name come virgin again like it: Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
tmoitoi 26 Posted April 27, 2015 Author Share Posted April 27, 2015 Problem fixed, just changed SQL Syntax. Thanks Link to comment Share on other sites More sharing options...
Premium Mano 22 Posted April 27, 2015 Premium Share Posted April 27, 2015 Can you tell us how ! Link to comment Share on other sites More sharing options...
Benhero 23 Posted April 29, 2015 Share Posted April 29, 2015 Change type of colum from varchar to varbinary Greatz Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now