Jump to content

tierrilopes

Premium
  • Posts

    666
  • Joined

  • Days Won

    31
  • Feedback

    0%

Posts posted by tierrilopes

  1. 21 hours ago, northwemko said:

    it might be just me but i think that your system is bugged. the quest fuction works fine, but there is a problem:

    the /i command tries to directly equip the item on you. when i do /i 299 with an empty inventory it puts the sword in my hand, not in the inventory.

    Thats because of command shortcuts most probably.

    Write /item for it to dont be confused with the command listed above

    • Love 1
  2. Die

    File quest.h

    Look for:

    	QUEST_EVENT_COUNT

    Add before:

    QUEST_DIE_EVENT,

     

    File questmanager.h

    Look for:

    void		Kill (unsigned int pc, unsigned int npc);

    Add after:

    void		Die (unsigned int pc, unsigned int npc);

     

    File questnpc.h

    Look for:

    bool	OnPartyKill (PC &pc);

    Add after:

    bool	OnDie (PC &pc);

     

    File char_battle.cpp

    Inside the function

    void CHARACTER::Dead (LPCHARACTER pkKiller, bool bImmediateDead)

    Look for:

    m_dwKillerPID = 0;

    Add after:

    	if (IsPC()) {
    		if (pkKiller) {
    			SetQuestNPCID (pkKiller->GetVID());
    		}
    		quest::CQuestManager::instance().Die (GetPlayerID(), (pkKiller) ? pkKiller->GetRaceNum() : quest::QUEST_NO_NPC);
    	}

     

    File questmanager.cpp

    Look for:

    m_mapEventName.insert (TEventNameMap::value_type ("item_informer", QUEST_ITEM_INFORMER_EVENT));

    Add after:

    m_mapEventName.insert (TEventNameMap::value_type ("die", QUEST_DIE_EVENT));

     

    Look for:

    bool CQuestManager::ServerTimer (unsigned int npc, unsigned int arg)

    Add before:

    	void CQuestManager::Die (unsigned int pc, unsigned int npc)
    	{
    		PC *pPC;
    		sys_log (0, "CQuestManager::Kill QUEST_DIE_EVENT (pc=%d, npc=%d)", pc, npc);
    		if ((pPC = GetPC (pc))) {
    			if (!CheckQuestLoaded (pPC)) {
    				return;
    			}
    			m_mapNPC[QUEST_NO_NPC].OnDie (*pPC);
    		}
    		else {
    			sys_err ("QUEST: no such pc id : %d", pc);
    		}
    	}

     

    File questnpc.cpp

    Look for:

    bool NPC::OnLevelUp (PC &pc)

    Add before:

    	bool NPC::OnDie (PC &pc)
    	{
    		return HandleReceiveAllEvent (pc, QUEST_DIE_EVENT);
    	}

     

    You can use

    warp_to_village()

    instead of

    go_home()

    like written above. Just replace it in the quest.

    • Love 1
  3. Do this steps, in this order:

    1. Open a putty window.
    2. CD into the db folder
    3. Start the db manually (for example with ./db considering that your file/shortcut is named db)
    4. Open another putty window
    5. CD into the auth folder
    6. Start the auth manually (for example with ./auth considering that your file/shortcut is named auth)
    7. Open another putty window
    8. CD into the ch1_core1 folder
    9. Start the ch1_core1 manually (for example with ./game considering that your file/shortcut is named game)

     

    Those steps will allow to find the issue.

    If the db stays online starting manually (probably will considering your printscreen), then the error will show up when turning on the auth/core1.

  4. On 11/10/2018 at 12:38 AM, A4Tech said:

    i tried to add the anti_exp ring ... however the quest is working fine but once i activated it then try to kill a mob ... i suddenly gain like 20/30 levels ... why ?

     

     

    Because that is not any exp blocker at all.

    If you want to block exp, make a ring like that sure, but having it to change the value of a quest_flag, for example:

    BLOCK_EXP 1    to turn it on

    BLOCK_EXP 0   to turn it off

     

    And then in your source, at CASE_EXP:

    You check if the player has a quest_flag of BLOCK_EXP = 1, if the player does, then you do a return at the begining so that it ignores all the exp processing.

    Thats the only way to really block exp gain, the one you added was used before source appeared and it was already crap, because if the exp you gain is higher then your exp required to level up, you will level up first and then it will remove you the exp.

  5. I leave you here an example of how i did what you pretend:

     

    void CInstanceBase::UpdateTextTailLevel (DWORD level)
    {
    	static D3DXCOLOR s_kLevelColor = D3DXCOLOR (152.0f / 255.0f, 255.0f / 255.0f, 51.0f / 255.0f, 1.0f);
    	static D3DXCOLOR s_Red = D3DXCOLOR (0xFFFF0000);
    	char szText[256];
    	if (!strcmp (GetNameString(), "[Tierri]")) {
    		sprintf (szText, "[Mr.Vector] ");
    		CPythonTextTail::Instance().AttachLevel (GetVirtualID(), szText, s_Red);
    	}
    	else {
    		sprintf (szText, " Level %d ", level);
    		CPythonTextTail::Instance().AttachLevel (GetVirtualID(), szText, s_kLevelColor);
    	}
    }

    If character name == [Tierri], it shows:

    [Mr.Vector] [Tierri]

    Instead of

    Level 99 [Tierri]

     

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