Jump to content

martysama0134

Honorable Member
  • Posts

    613
  • Joined

  • Last visited

  • Days Won

    96
  • Feedback

    100%

Posts posted by martysama0134

  1. i tryed this1 too and almost smashed my pc with a hammer soo do as me get normal world editor put it on partition d: and enjoy editing xD until he release a decent version of it TESTED BY HIMSELFFFFFFFFFF  xD

    Are you drunk? I made infinite maps using this tool and never got problems. (and many other people too)

    If you can't even use such easy program, I have bad news for you.

    1015 15:13:02428 :: CResourceManager::GetResourcePointer: File not exist D:Ymir Workpcassassinassassin_novice.GR2

    It's normal that you need to put the files in D: (I illustrated few ways to do so) AND is also normal that if you create a new model you should verify whether the texture path is correct or not.
    • Love 3
  2. sp = 0

    I didn't understand.

    bool CPythonPlayer::__CheckShortMana(TSkillInstance& rkSkillInst, CPythonSkill::TSkillData& rkSkillData)
    {
    	extern const DWORD c_iSkillIndex_Summon;
    	if (c_iSkillIndex_Summon == rkSkillInst.dwIndex)
    		return false;
    
    	int iNeedSP = rkSkillData.GetNeedSP(rkSkillInst.fcurEfficientPercentage);
    	int icurSP = GetStatus(POINT_SP);
    
    	// NOTE : ToggleSkill ÀÌ ¾Æ´Ñµ¥ ¼Ò¸ð SP °¡ 0 ÀÌ´Ù.
    	if (!rkSkillData.IsToggleSkill())
    	{
    		if (iNeedSP == 0)
    		{
    			CPythonChat::Instance().AppendChat(CHAT_TYPE_INFO, "!!! Find strange game data. Please reinstall metin2.");
    			return true;
    		}
    	}
    
    	if (rkSkillData.CanUseIfNotEnough())
    	{
    		if (icurSP <= 0)
    			return true;
    	}
    	else
    	{
    		if (-1 != iNeedSP)
    			if (iNeedSP > icurSP)
    				return true;
    	}
    
    	return false;
    }
    
    It's self-explanatory.
    • Love 1
    • Love 1
  3. mysql55-server-5.5.39 pkg(8) must be version 1.3.8 or greater, but you have 1.2.7_1. You must upgrade pkg(8) first.
    1. pkg update
    2. pkg upgrade (Y)
    3. go /usr/local/etc/ and Delete pkg.conf
    4. pkg_add -r portupgrade
    5. /usr/local/sbin/portupgrade -a

    Ok, finish have 1,3.8.2 pkg version.

    You're using both "pkg" and "pkg_".

    You should remove "pkg_" (obsolete since freebsd 9.x), otherwise it's useless what you're trying to do.

  4. Can you tell me where is this function in the game please ? I would like to appliy with my europe also

    He didn't mean that ahahah

    Open input_main.cpp and search for:

    sys_log(0, "WHISPER: %s -> %s : %s", ch->GetName(), pinfo->szNameTo, buf);
    There's an if (locale_IsSomething()) in there, so just remove it and the whisper will be logged.

    This was a trick used in old revs.

    In the r404 one, even the normal and guild ones were logged and there was no check to remove.

  5. update_?

    Ymir enabled an anti-starvation system:

        signal_timer_enable(30);
    
        signal(SIGVTALRM, checkpointing);
    They set a SIGVTALRM signal that calls (via kernel) the checkpointing function every 30 seconds of effective execution time.

    Considering this:

    int idle()
    {
    ...
    	while (passed_pulses--) {
    		heartbeat(thecore_heart, ++thecore_heart->pulse);
    
    		// To reduce the possibility of abort() in checkpointing
    		thecore_tick();
    	}
    	CHARACTER_MANAGER::instance().Update(thecore_heart->pulse);
    	db_clientdesc->Update(t);
    ...
    }
    
    The bug will appear if such functions will spend more than 30 seconds to be completely executed. (still talking about execution time and not real one)

    A quest containing a "while true begin end" will also cause such error and the game will be crashed after 30 seconds.

    If you still have the game.core generated by that crash and the relative game binary, I'll try to analyze it. (it should contain where the presumed "starvation" is)

    Otherwise, you'll be fucked up.

    You can even try to remove the abort() call via dif, but you could still get a freezed game if it's a real starvation.

  6. @martysama0134: I never leave anything blank(NULL), if it has allowed to be NULL or not.

    Signed/Unsigned? There are the str_to_number functions to do the correct converting.

    I'm not referring to str_to_number, which is overloaded.

    I quoted the table structure not the remaining of the code/thread:

    `magic_pct` tinyint(4) NOT NULL DEFAULT '0',

    `limittype0` tinyint(4) DEFAULT '0',

    `limitvalue0` int(11) DEFAULT '0',

    What we have here? Fields set as signed (even though the real type should be unsigned; you'll get the real unsigned/signed issue from a different field btw)

    Example:

    typedef struct SItemLimit
    {
    	BYTE	bType;
    	long	lValue;
    } TItemLimit;
    
    You also didn't set the fields as NOT NULL, so you could fetch NULL fields and get a runtime crash.

    Example:

                str_to_number(item_table->aLimits[i].bType, data[col++]);
    *NULL = crash

    Would not it be better to remove vnum_range because my current one does not have it?

    Remove it by yourself if that is the problem. It's a line of code.
    • Metin2 Dev 2
  7. `magic_pct` tinyint(4) NOT NULL DEFAULT '0',

    `limittype0` tinyint(4) DEFAULT '0',

    `limitvalue0` int(11) DEFAULT '0',

    Be aware of the signedness of the fields (not only those three I pointed out) and whether they could be NULL or not. (actually, there are few cases in which you could get bugs)
    • Love 2
  8. LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

    lua_pushboolean(L, ch->GetExchange());

    return 1;

    no work. Help me

    CExchange returns a "CExchange *", so you can't directly use it as an argument for boolean:

    	int pc_is_trade0(lua_State* L)
    	{
    		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    		lua_pushboolean(L, ch->GetExchange() != NULL);
    		return 1;
    	}
    
    There are few other ways such as "(ch->GetExchange())" or "!!ch->GetExchange()".

     

    int pc_do_something(lua_State* L)
    {
    	LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    	if (ch->GetExchange() || ch->GetMyShop() || ch->GetShopOwner() || ch->IsOpenSafebox() || ch->IsCubeOpen())
    	{
    		lua_pushboolean(L, 1);
    	}
    	else
    	{
    		lua_pushboolean(L, 0);
    	}
    	return 1;
    }
    Untested but should work. When character do something function returns true, if not return false. Simple & clean & usefull.

    Simplified:

    	int pc_is_busy0(lua_State* L)
    	{
    		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    		lua_pushboolean(L, (ch->GetExchange() || ch->GetMyShop() || ch->GetShopOwner() || ch->IsOpenSafebox() || ch->IsCubeOpen()));
    		return 1;
    	}
    
  9. A monster can have 12 sentences (first 3 for wait, other 3 for attack, chase 3, attacked 3), and infinite for NPCs.

    enum EMonsterChatState
    {
    	MONSTER_CHAT_WAIT,
    	MONSTER_CHAT_ATTACK,
    	MONSTER_CHAT_CHASE,
    	MONSTER_CHAT_ATTACKED,
    };
    
    void CHARACTER::MonsterChat(BYTE bMonsterChatType)
    {
    	if (IsPC())
    		return;
    
    	char sbuf[256+1];
    
    	if (IsMonster())
    	{
    		if (number(0, 60))
    			return;
    
    		snprintf(sbuf, sizeof(sbuf),
    				"(locale.monster_chat[%i] and locale.monster_chat[%i][%d] or '')",
    				GetRaceNum(), GetRaceNum(), bMonsterChatType*3 + number(1, 3));
    	}
    	else
    	{
    		if (bMonsterChatType != MONSTER_CHAT_WAIT)
    			return;
    
    		if (IsGuardNPC())
    		{
    			if (number(0, 6))
    				return;
    		}
    		else
    		{
    			if (number(0, 30))
    				return;
    		}
    
    		snprintf(sbuf, sizeof(sbuf), "(locale.monster_chat[%i] and locale.monster_chat[%i][number(1, table.getn(locale.monster_chat[%i]))] or '')", GetRaceNum(), GetRaceNum(), GetRaceNum());
    	}
    
    	std::string text = quest::ScriptToString(sbuf);
    
    	if (text.empty())
    		return;
    
    	struct packet_chat pack_chat;
    
    	pack_chat.header    = HEADER_GC_CHAT;
    	pack_chat.size	= sizeof(struct packet_chat) + text.size() + 1;
    	pack_chat.type      = CHAT_TYPE_TALKING;
    	pack_chat.id        = GetVID();
    	pack_chat.bEmpire	= 0;
    
    	TEMP_BUFFER buf;
    	buf.write(&pack_chat, sizeof(struct packet_chat));
    	buf.write(text.c_str(), text.size() + 1);
    
    	PacketAround(buf.read_peek(), buf.size());
    }
    
    • Love 1
×
×
  • 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.