Jump to content

Grou

Inactive Member
  • Posts

    67
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Grou

  1.  

    Did you write the pet_is_mine_function into the pet function table?

    In the same file (questlua_pet.cpp) scroll down and check if you made an entry. The error is caused due to the server not knowing what 'is_mine' from the pet-class actually is. So I guess you just forgot to add it  :)

     

    Oh jesus, I forgot it :D Thanks :)

     

    int pet_is_mine(lua_State * L)
    {
    	LPCHARACTER ch = CQuestManager::Instance().GetCurrentCharacterPtr();
    	LPCHARACTER npc = CQuestManager::Instance().GetCurrentNPCCharacterPtr();
    	CPetSystem * pPetSystem = ch->GetPetSystem();
    	
    	if (!pPetSystem)
    	{
    		lua_pushboolean(L, false);
    		return 0;
    	}
    	
    	CPetActor * pPetActor = pPetSystem->GetByVID(npc->GetVID());
    	
    	if (!pPetActor)
    	{
    		lua_pushboolean(L, false);
    		return 0;
    	}
    	
    	LPCHARACTER pet = pPetActor->GetCharacter();
    	
    	if (!pet)
    	{
    		lua_pushboolean(L, false);
    		return 0;
    	}
    	
    	lua_pushboolean(L, pet->GetVID() == npc->GetVID());
    	return 1;
    }
    

    Kind Regards

    Ken

     

     

    Thanks Ken, I will try it :)

  2. Hi metin2dev, I have a problem with pet.is_mine function...
    In questlua_pet.ccp I have this:

     


    int pet_is_mine(lua_State* L)
    {
    CQuestManager& q = CQuestManager::instance();
    LPCHARACTER mch = q.GetCurrentCharacterPtr();
    LPCHARACTER tch = q.GetCurrentNPCCharacterPtr();
    CPetSystem* petSystem = mch->GetPetSystem();
    CPetActor* petActor = petSystem->GetByVID(tch->GetVID());

    // ~ DEBUG Messages:
    /*
    sys_log(0, "mch->GetVID : %d", mch->GetVID());
    sys_log(0, "npc->GetVID : %d", npc->GetVID());
    sys_log(0, "petSystem : %s", (petSystem ? "True":"False"));
    sys_log(0, "petActor : %s", (petActor ? "True":"False"));
    sys_log(0, "npc->IsPet() : %s", (npc->IsPet() ? "True":"False"));
    if (petActor)
    sys_log(0, "petActor->GetOwner()->GetVID() : %d", petActor->GetOwner()->GetVID());
    */

    lua_pushboolean(L, tch && tch->IsPet() && petActor && petActor->GetOwner() == mch);
    return 1;
    }

     

    In quest this:

     

    when 34001.click with pet.is_mine() begin
    say_title("Pet")
    end

     

    and when I click on pet, so game will write this :X

     

    SYSERR: Mar 31 18:42:13 :: RunState: LUA_ERROR: [string "pet_system"]:1: attempt to call global `is_mine' (a nil value)
    SYSERR: Mar 31 18:42:13 :: WriteRunningStateToSyserr: LUA_ERROR: quest pet_system.start click

     

    Many thanks for help  :)

     
  3.  

    different bonus set from the call item ( item proto ) ( the item that call the pet )

    for e.g

    53003    ؛ù؟°؛ز»çء¶¼زب¯ئذ    ITEM_QUEST    0    1    ANTI_DROP|ANTI_SELL|ANTI_STACK|ANTI_MYSHOP    LOG    NONE    NONE    0    0    0    0    0    REAL_TIME    10368000    LIMIT_NONE    0    APPLY_MELEE_MAGIC_ATTBONUS_PER    20    APPLY_MAX_HP    2000    APPLY_PENETRATE_PCT    10    600    0    0    0    0    0    0    0    0
    bonus are :
     APPLY_MELEE_MAGIC_ATTBONUS_PER
    APPLY_MAX_HP
    APPLY_PENETRATE_PCT
     
    you can change it for what u want
    

     

    Oh.. I didn't know this but I want to do menu, where I can select bonus which I want and then bonus will increase with lvl of pet... How I can do this ?? Sorry for my inexperience and thanks to you for your help :)

  4.  

    How did you compile your quest? What about "restart", how did you do that?

     

    Normaly through make.py... 

     

    this is very old system from 2012

    i dont recommend to use it

     

    look at this :

     

    Yes, this look good but I need different bonuses for different pets... I don't know how make lua function and this system from 2012 have it...

  5. Ok thanks, but I have another question. How can I edit the text so that it will be center over the character ? Text is too much in left side now...

     

    IMG:

    fi7pd.png

     

    Source of AttachTitle:

    void CPythonTextTail::AttachTitle(DWORD dwVID, const char * c_szName, const D3DXCOLOR & c_rColor)

    {
    if (!bPKTitleEnable)
    return;
     
    TTextTailMap::iterator itor = m_CharacterTextTailMap.find(dwVID);
    if (m_CharacterTextTailMap.end() == itor)
    return;
     
    TTextTail * pTextTail = itor->second;
     
    CGraphicTextInstance *& prTitle = pTextTail->pTitleTextInstance;
    if (!prTitle)
    {
    prTitle = CGraphicTextInstance::New();
    prTitle->SetTextPointer(ms_pFont);
    prTitle->SetOutline(true);
     
    if (LocaleService_IsEUROPE())
    prTitle->SetHorizonalAlign(CGraphicTextInstance::HORIZONTAL_ALIGN_RIGHT);
    else
    prTitle->SetHorizonalAlign(CGraphicTextInstance::HORIZONTAL_ALIGN_CENTER);
    prTitle->SetVerticalAlign(CGraphicTextInstance::VERTICAL_ALIGN_BOTTOM);
    }
     
    prTitle->SetValue(c_szName);
    prTitle->SetColor(c_rColor.r, c_rColor.g, c_rColor. B);
    prTitle->Update();

    }

     

    Source of AttachLevel:

    void CPythonTextTail::AttachLevel(DWORD dwVID, const char * c_szText, const D3DXCOLOR & c_rColor)

    {
    if (!bPKTitleEnable)
    return;
     
    TTextTailMap::iterator itor = m_CharacterTextTailMap.find(dwVID);
    if (m_CharacterTextTailMap.end() == itor)
    return;
     
    TTextTail * pTextTail = itor->second;
     
    CGraphicTextInstance *& prLevel = pTextTail->pLevelTextInstance;
    if (!prLevel)
    {
    prLevel = CGraphicTextInstance::New();
    prLevel->SetTextPointer(ms_pFont);
    prLevel->SetOutline(true);
     
    prLevel->SetHorizonalAlign(CGraphicTextInstance::HORIZONTAL_ALIGN_RIGHT);
    prLevel->SetVerticalAlign(CGraphicTextInstance::VERTICAL_ALIGN_BOTTOM);
    }
     
    prLevel->SetValue(c_szText);
    prLevel->SetColor(c_rColor.r, c_rColor.g, c_rColor. B);
    prLevel->Update();
    }
     

    • Angry 1
  6.  

    Specular is bugged on launcheur I think

     

     

    Specular works fine but only at one armor not working...

     

     

    Or maybe in msm you put wrong the adress of the texture, the specular dont work only with the route the .gr2 file takes

     

    must look like this

    	
    	Group ShapeData27
    	{
    		SpecialPath			"d:/ymir Work/pc/assassin/"
    
    		ShapeIndex			26	
    		Model				"assassin_4-1.GR2"
    		SourceSkin			"assassin_4-1.dds"
    		TargetSkin			"assassin_4-2.dds"
    	}

     

    I tried this but not work.. My msm look like this

     

    Group ShapeData166
    {
    SpecialPath "d:/ymir work/pc/ridack_work/ridack_armor_3/"
     
    ShapeIndex 3001
    Model "set10-war.GR2"
    SourceSkin "ridack_nf_foot.dds"
    TargetSkin "ridack_nf_foot.dds"
        
    SourceSkin2 "ridack_nf_hand.dds"
    TargetSkin2 "ridack_nf_hand.dds"
        
    SourceSkin3 "ridack_nf_lower.dds"
    TargetSkin3 "ridack_nf_lower.dds"
     
    SourceSkin4 "ridack_nf_upper.dds"
    TargetSkin4 "ridack_nf_upper.dds"
        
    SourceSkin5 "ridack_bouclier.dds"
    TargetSkin5 "ridack_bouclier.dds"
    }
×
×
  • 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.