Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    839
  • Joined

  • Days Won

    393
  • Feedback

    100%

Posts posted by xP3NG3Rx

  1. @Efyn That code is not correct. Because I'm wrote that code in Notepad++ and there is a lots of error what the Visual Studio shows.
     

    Here is the correct code:

    int pet_is_mine(lua_State* L)
    {
    	CQuestManager& q = CQuestManager::instance();
    	LPCHARACTER ch = q.GetCurrentCharacterPtr();
    	LPCHARACTER npc = q.GetCurrentNPCCharacterPtr();
    	CPetSystem* petSystem = ch->GetPetSystem();
    	CPetActor* petActor = petSystem->GetByVID(npc->GetVID());
    
    	lua_pushboolean(L, npc->IsPet() && petSystem && petActor->GetOwner() == ch);
    	return 1;
    }
    

    I tested on my WinServer and works.

    • Love 1
  2. Hello,

    I found a little mistake.
     

    [...]table.insert(menu, data[i][1].." "..tostring(data[i][2].." Yang"))[...]

    This method is doing like this: tostring(150000.." Yang") - Bad!

    The correct is: tostring(150000).." Yang"

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