JHONDOMINIC Posted January 22 Share Posted January 22 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? Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted January 28 Share Posted January 28 (edited) 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 January 28 by Start_ 1 Quote Link to comment Share on other sites More sharing options...
0 Rynbef Posted January 24 Share Posted January 24 @JHONDOMINICmaybe like this: OnDeath: if(getcharid(0)) end; else if(killedrid >= 150000 || killerrid >= 150000) end; else { //do ur stuff } end; Rynbef~ Quote Link to comment Share on other sites More sharing options...
0 JHONDOMINIC Posted January 25 Author Share Posted January 25 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? Quote Link to comment Share on other sites More sharing options...
0 Rynbef Posted January 25 Share Posted January 25 (edited) @JHONDOMINICIt's stored in killedrid (ID of killed monster) or killerrid (ID of the killer). Rynbef~ Edited January 27 by Rynbef Tagged member Quote Link to comment Share on other sites More sharing options...
0 JHONDOMINIC Posted January 28 Author Share Posted January 28 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? Quote Link to comment Share on other sites More sharing options...
0 Rynbef Posted January 28 Share Posted January 28 (edited) @JHONDOMINICOf course but in ur example u've spawned a monster with another label OnDeath. Rynbef~ Edited January 28 by Rynbef Quote Link to comment Share on other sites More sharing options...
0 JHONDOMINIC Posted January 28 Author Share Posted January 28 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? Quote Link to comment Share on other sites More sharing options...
0 Rynbef Posted January 28 Share Posted January 28 @JHONDOMINIC OnNPCKillEvent stores the mob ID of the killed mob in the variable killedrid. Quote Link to comment Share on other sites More sharing options...
0 Rynbef Posted January 28 Share Posted January 28 (edited) @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 January 28 by Rynbef Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted January 29 Share Posted January 29 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. Quote Link to comment Share on other sites More sharing options...
0 JHONDOMINIC Posted January 30 Author Share Posted January 30 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. Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted January 30 Share Posted January 30 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 Quote Link to comment Share on other sites More sharing options...
0 Rynbef Posted January 30 Share Posted January 30 (edited) @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 January 30 by Rynbef Quote Link to comment Share on other sites More sharing options...
0 JHONDOMINIC Posted January 30 Author Share Posted January 30 Thank you everybody to reply my topic. 1 Quote Link to comment Share on other sites More sharing options...
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