Jump to content

avertuss

Inactive Member
  • Posts

    480
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by avertuss

  1. 2 godziny temu, Ayaka napisał:

    ok thats strange, i was so sure that this is working xD

    I would check if this is really the right place to change code. Whats happen if you change the "[" and "]" like:

    
    "%s<Prestige %d>"

    if the output isn't <Prestige 1>EbeEbe then this function isn't rendering for your output. 

    Okey, so i have this

    	std::string stPrestige = "[";
    	if (GetPrestigeLevel() == 5)
    	{
    		stPrestige += "King";
    	}
    	else
    		stPrestige += "Dick";
    	stPrestige += "] ";
    	//GetNameString() += stPrestige;
    	stPrestige += GetNameString();
    	CPythonTextTail::Instance().UpdateName(GetVirtualID(), stPrestige.c_str());

    This version doesn't work

    GetNameString() += stPrestige;

    5a251d275cc44b4202c9ce6cb8425b28.png

    but this version works

    stPrestige += GetNameString();

     

  2. 1 godzinę temu, Ayaka napisał:

    from reading this http://en.cppreference.com/w/cpp/io/c/fprintf i think this is the solution.

    %s is a character string (name) and %d a signed integer (level) so i changed the position in the first snprintf function. Hope this works, never coded in C++. i can only write php but from a logical point of view it should work:

    
    
    		if (pCharacterInstance->GetPrestigeLevel() < PRESTIGE_MAX)
    			snprintf(szNameTextTail, sizeof(szNameTextTail), "%s[Prestige %d]", pCharacterInstance->GetNameString(), pCharacterInstance->GetPrestigeLevel());
    		else
    			snprintf(szNameTextTail, sizeof(szNameTextTail), "%s[Prestige Master]", pCharacterInstance->GetNameString());

     

    Still the same c753ae778b257585c194d2e0112959de.png

  3. Hi. I use prestige system

    #if ENABLE_NEW_PRESTIGE_SYSTEM == 1
    	char szNameTextTail[5000 + 1];
    
    	if (pCharacterInstance->IsPC() && pCharacterInstance->GetPrestigeLevel())
    	{
    		if (pCharacterInstance->GetPrestigeLevel() < PRESTIGE_MAX)
    			snprintf(szNameTextTail, sizeof(szNameTextTail), "[Prestige %d]%s", pCharacterInstance->GetPrestigeLevel(), pCharacterInstance->GetNameString());
    		else
    			snprintf(szNameTextTail, sizeof(szNameTextTail), "[Prestige Master]%s", pCharacterInstance->GetNameString());
    	}
    	else
    		snprintf(szNameTextTail, sizeof(szNameTextTail), "%s", pCharacterInstance->GetNameString());
    
    	TTextTail * pTextTail = RegisterTextTail(dwVirtualID,
    		szNameTextTail,
    		pCharacterInstance->GetGraphicThingInstancePtr(),
    		pCharacterInstance->GetGraphicThingInstanceRef().GetHeight() + fAddHeight,
    		c_rColor);
    
    #else
    	TTextTail * pTextTail = RegisterTextTail(dwVirtualID,
    		pCharacterInstance->GetNameString(),
    		pCharacterInstance->GetGraphicThingInstancePtr(),
    		pCharacterInstance->GetGraphicThingInstanceRef().GetHeight() + fAddHeight,
    		c_rColor);
    #endif

    It looks like 481551e6ba1a40348abbd680ed1af253.png

    i want edit this to Czny. [Prestige level] 

     

    How can i do it? I tried 

    if (pCharacterInstance->GetPrestigeLevel() < PRESTIGE_MAX)
    			snprintf(szNameTextTail, sizeof(szNameTextTail), pCharacterInstance->GetNameString(), "%s" "[Prestige %d]", pCharacterInstance->GetPrestigeLevel());
    		else
    			snprintf(szNameTextTail, sizeof(szNameTextTail), pCharacterInstance->GetNameString(), "%s" "[Prestige Master]");

    but it doesn't work ;/ 

  4. Hi. How can i change these bonuses? POINT_PARTY_ATTACKER_BONUS, POINT_PARTY_TANKER_BONUS, POINT_PARTY_BUFFER_BONUS, POINT_PARTY_SKILL_MASTER_BONUS, POINT_PARTY_DEFENDER_BONUS, POINT_PARTY_HASTE_BONUS. I mean that i want to change for example POINT_PARTY_TANKER_BONUS = 3k hp etc. Thank you for help. 

  5. Hi. I have problem with this error in syserr

    OnButton: QUEST There's suspended quest state, can't run new quest state (quest: wskaznikHpWroga pc:

    Quest

    quest wskaznikHpWroga begin
    	state start begin
    		when login begin
    			cmdchat("super_quest "..q.getcurrentquestindex())
    		end
    
    		when info or button begin
    			cmdchat("GetInputStart")
    			local vid = input(cmdchat("get_input_value"))
    			cmdchat("GetInputStop")
    			local old_pc = pc.select(vid)
    			local name = pc.get_name()
    			local hp = pc.get_hp()
    			local max_hp = pc.get_max_hp()
    			pc.select(old_pc)
    			cmdchat("pvp_zdruwko "..name.."|"..hp.."|"..max_hp)
    		end
    	end
    end

     

  6. Hi. I don't wanna align with values on -, so i edit in char_battle like this:

    m_iRealAlignment = MINMAX(0, m_iRealAlignment + iAmount, 200000);
    if (GetRealAlignment() >= 190000)
    		iAlignIndex = 0;
    	else if (GetRealAlignment() >= 180000)
    		iAlignIndex = 1;
    	else if (GetRealAlignment() >= 170000)
    		iAlignIndex = 2;
    	else if (GetRealAlignment() >= 160000)
    		iAlignIndex = 3;
    	else if (GetRealAlignment() >= 150000)
    		iAlignIndex = 4;
    	else if (GetRealAlignment() >= 140000)
    		iAlignIndex = 5;
    	else if (GetRealAlignment() >= 150000)
    		iAlignIndex = 6;
    	else if (GetRealAlignment() >= 160000)
    		iAlignIndex = 7;
    	else
    		iAlignIndex = 8;
    FPartyAlignmentCompute f(0, pkKiller->GetX(), pkKiller->GetY());
    pkKiller->GetParty()->ForEachOnlineMember(f);
    
    if (f.m_iCount == 0)
    pkKiller->UpdateAlignment(0);
    else
    {
    sys_log(0, "ALIGNMENT PARTY count %d amount %d", f.m_iCount, f.m_iAmount);
    
    f.m_iStep = 1;
    pkKiller->GetParty()->ForEachOnlineMember(f);
    }
    }
    else
    pkKiller->UpdateAlignment(0);

    Should it work? + How can i increase max align values. Default it's short with max 32k i want change it to int. 

  7. Hi. How can i add bonus when i transfor into marble? For example: i have Polymorph skill on p level and when i use marble i will receive bonus 2k hp. Probably it's this void CHARACTER::SetPolymorph(DWORD dwRaceNum, bool bMaintainStat) function but idk. Ofc if i dead or marble will end own time bonus will be removed. Thank you for help guys. 

     

     

    + i don't wanna make spam on forum so i will ask there. Where can i edit bonuses from http://wiki.metin2.co.uk/index.php/Leadership ???

  8. Hi, i want start server on virtualbox in my lan but game doesn't start. Db works. I turned on dhcp client on freebsd. I got this ip address

    3532a626cccb05cbba0d613e9e069eca.png

    In syserr i can see:

    INTERNAL_IP: 10.10.10.5 interface em0
    Can not get public ip address

    Putty works, winscp works, db works but game not. What should i do? I don't wanna use hamachi or idk.

  9. Hi. I added report system, but i have problem. Py code:

    http://pastebin.com/UtE76rQe

    Syserr:

    0313 19:13:24983 :: Traceback (most recent call last):
    
    0313 19:13:24984 ::   File "ui.py", line 1366, in CallEvent
    
    0313 19:13:24984 ::   File "ui.py", line 87, in __call__
    
    0313 19:13:24984 ::   File "ui.py", line 69, in __call__
    
    0313 19:13:24984 ::   File "uiSystem.py", line 144, in ReportWindowOpen
    
    0313 19:13:24984 :: TypeError
    0313 19:13:24984 :: : 
    0313 19:13:24984 :: 'module' object is not callable
    0313 19:13:24984 :: 
    
    0313 19:13:31084 :: Traceback (most recent call last):
    
    0313 19:13:31084 ::   File "ui.py", line 1366, in CallEvent
    
    0313 19:13:31084 ::   File "ui.py", line 87, in __call__
    
    0313 19:13:31084 ::   File "ui.py", line 69, in __call__
    
    0313 19:13:31084 ::   File "uiSystem.py", line 354, in __PencereyiKapatMesaji
    
    0313 19:13:31084 :: AttributeError
    0313 19:13:31084 :: : 
    0313 19:13:31084 :: 'SystemDialog' object has no attribute 'KurallarOpen'
    0313 19:13:31084 :: 

    Can you help me guys?

  10. 14 minutes ago, Syreldar said:
    
    ALTER TABLE `player` MODIFY COLUMN `hp` bigint(5) UNSIGNED NOT NULL AFTER `exit_map_index`;

    Then restart the server.

    Still 
     

    SYSERR: Mar 11 21:55:04 :: ChildLoop: AsyncSQL: query failed: Out of range value for column 'hp' at row 1 (query: UPDATE player SET job = 0, voice = 0, dir = 0, x = 967125, y = 277225, z = 0, map_index = 41, exit_x = 967125, exit_y = 277225, exit_map_index = 41, hp = -27950, mp = 2731, stamina = 1975, random_hp = 4072, random_sp = 2016, playtime = 12, level = 102, level_step = 0, st = 135, ht = 135, dx = 46, iq = 3, gold = 542019661, exp = 87633261, stat_point = 0, skill_point = 16, sub_skill_point = 43, stat_reset_count = 0, ip = '25.69.178.230', part_main = 41337, part_hair = 5070, part_sash = 4, last_play = NOW(), skill_group = 1, alignment = -10000, horse_level = 21, horse_riding = 0, horse_hp = 35, horse_hp_droptime = 1489524623, horse_stamina = 120, horse_skill_point = 0, prestige = 0, skill_level = '\0\0\0\0\0\0(\0\0\0\0(\0\0\0\0\0\0\0\0(\0\0\0\0(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\

     

  11. 26 minutes ago, Syreldar said:

    If you don't know what are you talking about, at least listen to what i say, little buddy.

    You got type int, which is a basic signed integer type. Capable of containing a number which value is <= +32,767.

    You said you have got 46086 hp, which is greater than 32767, the maximum positive number that type can handle, thus creating an overflow, or out of range, exception.

    
    ChildLoop: AsyncSQL: query failed: Out of range value for column 'hp'

    Put bigint instead of int in the column type, and please.. next time if you ask for help at least learn to listen ;)

    Still 

    SYSERR: Mar 11 21:26:58 :: ChildLoop: AsyncSQL: query failed: Out of range value for column 'hp' at row 1 (query: UPDATE player SET job = 0, voice = 0, dir = 0, x = 959652, y = 273628, z = 0, map_index = 41, exit_x = 959652, exit_y = 273628, exit_map_index = 41, hp = -27950, mp = 2731, stamina = 1975, random_hp = 4072, random_sp = 2016, playtime = 13, level = 102, level_step = 0, st = 135, ht = 135, dx = 46, iq = 3, gold = 532359523, exp = 88267224, stat_point = 0, skill_point = 16, sub_skill_point = 43, stat_reset_count = 0, ip = '25.69.178.230', part_main = 41337, part_hair = 5070, part_sash = 4, last_play = NOW(), skill_group = 1, alignment = -10000, horse_level = 21, horse_riding = 0, horse_hp = 35, horse_hp_droptime = 1489522939, horse_stamina = 120, horse_skill_point = 0, prestige = 0, skill_level = '\0\0\0\0\0\0(\0\0\0\0(\0\0\0\0\0\0\0\0(üĹX(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
    SYSERR: Mar 11 21:33:59 :: ChildLoop: AsyncSQL: query failed: Out of range value for column 'hp' at row 1 (query: UPDATE player SET job = 0, voice = 0, dir = 0, x = 469300, y = 964200, z = 0, map_index = 1, exit_x = 469300, exit_y = 964200, exit_map_index = 1, hp = -22950, mp = 2731, stamina = 1975, random_hp = 4072, random_sp = 2016, playtime = 18, level = 102, level_step = 0, st = 135, ht = 135, dx = 46, iq = 3, gold = 532359523, exp = 88267224, stat_point = 0, skill_point = 16, sub_skill_point = 43, stat_reset_count = 0, ip = '25.69.178.230', part_main = 41337, part_hair = 5070, part_sash = 4, last_play = NOW(), skill_group = 1, alignment = -10000, horse_level = 21, horse_riding = 0, horse_hp = 35, horse_hp_droptime = 1489522939, horse_stamina = 120, horse_skill_point = 0, prestige = 0, skill_level = '\0\0\0\0\0\0(\0\0\0\0(\0\0\0\0\0\0\0\0(üĹX(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\

    c1d601f9f353d50f0d8b3ac6bfcc7f4e.png

    3f4f23de4f0c403172619e3cf1b69a35.png

  12. Hi. I have problem with hp query into player table. Query:

    SYSERR: Mar 11 15:59:44 :: ChildLoop: AsyncSQL: query failed: Out of range value for column 'hp' at row 1 (query: UPDATE player SET job = 0, voice = 0, dir = 0, x = 960272, y = 273122, z = 0, map_index = 41, exit_x = 960272, exit_y = 273122, exit_map_index = 41, hp = -19450, mp = 2731, stamina = 1975, random_hp = 4072, random_sp = 2016, playtime = 10, level = 102, level_step = 0, st = 135, ht = 135, dx = 46, iq = 3, gold = 530273745, exp = 76221927, stat_point = 0, skill_point = 0, sub_skill_point = 43, stat_reset_count = 0, ip = '25.69.178.230', part_main = 41337, part_hair = 5070, part_sash = 0, last_play = NOW(), skill_group = 0, alignment = -10000, horse_level = 21, horse_riding = 0, horse_hp = 35, horse_hp_droptime = 1489503257, horse_stamina = 120, horse_skill_point = 0, prestige = 0, skill_level = '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0

    hp in query : -19450

    but in game i have 46086 hp

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