Jump to content

Recommended Posts

  • Replies 17
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Watchout for the bumping rules, @Raylee will slap you :D

 

On topic, i belive you are doing this: IF character is NPC equals to 30122, do something, so try to spell it out, you will see the error, you verify if it's an NPC and you want a true or false to be a vnum/id..

I believe you must do GetRaceNum() to get a comparsion to npc vnum/id

 

Something like:

ch->IsNPC() && ch->GetRaceNum() == 30122

It's all lies

Link to comment
Share on other sites

Acum 10 minute, displayjokes a spus:

Watchout for the bumping rules, @Raylee will slap you :D

 

On topic, i belive you are doing this: IF character is NPC equals to 30122, do something, so try to spell it out, you will see the error, you verify if it's an NPC and you want a true or false to be a vnum/id..

I believe you must do GetRaceNum() to get a comparsion to npc vnum/id

 

Something like:

ch->IsNPC() && ch->GetRaceNum() == 30122

I'll try and come back with an answer, thank you nice.

Link to comment
Share on other sites

Acum 1 oră, displayjokes a spus:

Watchout for the bumping rules, @Raylee will slap you :D

 

On topic, i belive you are doing this: IF character is NPC equals to 30122, do something, so try to spell it out, you will see the error, you verify if it's an NPC and you want a true or false to be a vnum/id..

I believe you must do GetRaceNum() to get a comparsion to npc vnum/id

 

Something like:

ch->IsNPC() && ch->GetRaceNum() == 30122

Screenshot-1.pngI'm getting this error.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

5 minutes ago, leonvanilla said:

Screenshot-2.pngI tried and ...

I believe what you want to do can be done easier, you are only returning true in that function, on ACMD(do_emotion), find this:

if (!victim->IsPC() || victim == ch)

 

Change it to:

if ( (!victim->IsPC() && victim->GetRaceNum() != 30122 ) || victim == ch)

 

I believe it work, if not you can play around that if, this is not tested, plus what MrQuin said, you will need the animations for the NPCs.

Edited by Metin2 Dev
Core X - External 2 Internal

It's all lies

Link to comment
Share on other sites

Acum 7 minute, displayjokes a spus:

I believe what you want to do can be done easier, you are only returning true in that function, on ACMD(do_emotion), find this:

if (!victim->IsPC() || victim == ch)

 

Change it to:

if ( (!victim->IsPC() && victim->GetRaceNum() != 30122 ) || victim == ch)

 

I believe it work, if not you can play around that if, this is not tested, plus what MrQuin said, you will need the animations for the NPCs.

NPC is a function starter in InstanceBase.cpp.

 

    int i=0;
    if(c_rkCreateData.m_dwRace == 30122)
    {
        SetInstanceType(CActorInstance::TYPE_PC);    
        SetRace(3);
        i=1;
    }

 

Whatever I do in cmd_emotion tells me that NPC is not online.

Screenshot-4.pngI get this error at the function given to you above.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

2 minutes ago, leonvanilla said:

NPC is a function starter in InstanceBase.cpp.

 

    int i=0;
    if(c_rkCreateData.m_dwRace == 30122)
    {
        SetInstanceType(CActorInstance::TYPE_PC);    
        SetRace(3);
        i=1;
    }

 

Whatever I do in cmd_emotion tells me that NPC is not online.

Screenshot-4.pngI get this error at the function given to you above.

You are missing parentesis, but show me that part of the function complete, with the number of the lines please :D

Edited by Metin2 Dev
Core X - External 2 Internal

It's all lies

Link to comment
Share on other sites

3 minutes ago, leonvanilla said:

I solved it, but it still tells me it's not online.

Oh okay, that's different, now we need to look for that message, you can try to copy the message to notepad, search for it on translate or locale.lua, i do not remember what file, and check what's the key phrase that's giving you that message, than we can look for that key phrase in this file, because i'm not sure where it tells you the player is not offline, other options is that you can send chatpacket to see where it stops, like this:


            ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT(" Test 1 "));

 

than ahead in the functions add a couple more and add +1 to the number after Test, this is how i usually debug

It's all lies

Link to comment
Share on other sites

Acum 1 minut, displayjokes a spus:

Oh okay, that's different, now we need to look for that message, you can try to copy the message to notepad, search for it on translate or locale.lua, i do not remember what file, and check what's the key phrase that's giving you that message, than we can look for that key phrase in this file, because i'm not sure where it tells you the player is not offline, other options is that you can send chatpacket to see where it stops, like this:


            ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT(" Test 1 "));

 

than ahead in the functions add a couple more and add +1 to the number after Test, this is how i usually debug

I said try to return true on that function but it gives me segmentation error.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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