Jump to content
  • 0
JHONDOMINIC

How to know mobid from dead mob spwan by monster?

Question

I spwan by

monster "prontera",150,160,"--ja--",-3,1,"Test::OnDeath";

And kill that mob by

killmonster "prontera","Test::OnDeath",1;

Have any way to know that mobid after it dead?

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

In that case you can try create pre-made events like

monster "prontera",150,160,"--ja--",.@spawn_id,1,"XXX::OnMonsterDead" + .@spawn_id;

OnMonsterDead1002:

end;

And then you can know what monster you killed by command.

Edited by Start_
  • Upvote 1
Link to comment
Share on other sites

  • 0
On 1/24/2022 at 8:44 AM, Rynbef said:

@JHONDOMINICmaybe like this:

OnDeath:
    if(getcharid(0))
        end;
    else if(killedrid >= 150000 || killerrid >= 150000)
        end;
    else {
        //do ur stuff
    }
    end;

 

Rynbef~

On your way how i can know mob_id from dead mob?

Link to comment
Share on other sites

  • 0
On 1/26/2022 at 3:55 AM, Rynbef said:

@JHONDOMINICIt's stored in killedrid (ID of killed monster) or killerrid (ID of the killer).

 

Rynbef~

Are you sure that not OnNPCKillEvent killedrid  working?

Link to comment
Share on other sites

  • 0
44 minutes ago, Rynbef said:

@JHONDOMINICOf course but in ur example u've spawned a monster with another label OnDeath.

 

Rynbef~

That mob die by script command not player kill how that mob id can contain on killedrid?

Link to comment
Share on other sites

  • 0

@Start_that's exactly the same he already wrote on topic start.

I've understood that he means if the mob killed by command or by player.

@JHONDOMINICThe difference between killerrid and killedrid is that killerrid is the ID of the player who killed that mob and killedrid contains the ID of the killed mob.

 

Rynbef~

Edited by Rynbef
Link to comment
Share on other sites

  • 0
On 1/24/2022 at 3:44 AM, Rynbef said:

@JHONDOMINICmaybe like this:

OnDeath:
    if(getcharid(0))
        end;
    else if(killedrid >= 150000 || killerrid >= 150000)
        end;
    else {
        //do ur stuff
    }
    end;

 

Rynbef~

"killedrid" Is a player variable , which if the code run you would be guaranteed an error

 

On 1/28/2022 at 7:40 AM, Start_ said:

In that case you can try create pre-made events like

monster "prontera",150,160,"--ja--",.@spawn_id,1,"XXX::OnMonsterDead" + .@spawn_id;

OnMonsterDead1002:

end;

And then you can know what monster you killed by command.

👆👍

Link to comment
Share on other sites

  • 0
5 hours ago, sader1992 said:

"killedrid" Is a player variable , which if the code run you would be guaranteed an error

 

👆👍

Ok that meaning we can't to know mob_id when that mob die by script command.

Link to comment
Share on other sites

  • 0
40 minutes ago, JHONDOMINIC said:

Ok that meaning we can't to know mob_id when that mob die by script command.

if it's not attached to a player in the OnDeath event or a specific OnDeath event that is unique for that monster , I am not aware of any other way without src edits

Link to comment
Share on other sites

  • 0

@JHONDOMINIC as @sader1992said. I think we couldn't filter if mob was killed by script or atcommand only. The ID is no problem if u spawn the mob with unique event label.

I've an idea to make it works but it needs src modification. I've posted at Source Discussion. Maybe other user want it too. Then I could work on it.

 

Rynbef~

Edited by Rynbef
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.