Invictus 24 Posted September 28, 2014 Share Posted September 28, 2014 hey, anyone got a good efficient way to check if all the mobs are dead in a dungeon? as in there's not a single mob left. the reason being. d.count_monster blows, it has some sort of delay, not entirely sure why but say you kill X mob, and it outputs say the value of 10 as in 10 left, if you kill another within a few seconds it will still say 10 even tho theres actually 9. so that function wont work for me. d.check_eliminated - this did nothing, couldn't figure out how to use it couldnt make any output in chat etc or likewise. tried using quest flags, no luck on that part, got to test dungeon flags. also is there a way to check amount of players in a single part? i can't see any function in the function list. running 34k appreciate the help. Link to comment Share on other sites More sharing options...
luzzo 197 Posted September 29, 2014 Share Posted September 29, 2014 hi invictus. i have checked those two function on 40k function. d.count_monster() seems not have any delay on monster count. -it just call a dungeon istance and do a foreach entity that is not a charachter by incrementing n++ and return n(number of mob) d.check_eliminated() doesn't do what you think. -It accepts and go on with 2 suboption. -1 exitallateliminate -2 warpallateliminate -There is a final condition in case mob_count is 0 and 1 & 2 conditiones are false. it just write a syslog this three cases are able just in the condition of mobcount = 0 if you can specifize what you want to do exactly, i ll try to help you 1 Link to comment Share on other sites More sharing options...
Developer PACI 930 Posted September 29, 2014 Developer Share Posted September 29, 2014 Why don't you just set a flag? d.setf("mobs_left", 10) when kill begin local count = d.getf("mobs_left")-1 d.setf("mobs_left", count) d.notice(count.." mobs left") --if count <= 0 then -- do something --end end 1 when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
luzzo 197 Posted September 29, 2014 Share Posted September 29, 2014 Why don't you just set a flag? d.setf("mobs_left", 10) when kill begin local count = d.getf("mobs_left")-1 d.setf("mobs_left", count) d.notice(count.." mobs left") --if count <= 0 then -- do something --end end I prefear use somethin like this: d.setf("mobs_left", d.count_monster()) when kill with not pc.is_pc() begin local count = d.getf("mobs_left")-1 d.setf("mobs_left", count) d.notice(count.." mobs left") --if count <= 0 then -- do something --end end remember to check that you are in a dungeon and you are in the right map =D 1 Link to comment Share on other sites More sharing options...
Invictus 24 Posted September 29, 2014 Author Share Posted September 29, 2014 last way is the most efficient due to more party members = harder dungeon/more mobs, as i said i hadn't gotten around to testing with dungeon flags and that was next on the list, other dungeons i've done have been purely for solo/boss kills. was going to use a timer to check but Iuzzo's will be the best choice i believe. but then coding at 3 am on no sleep for two days isn't always a great idea lmfao thanks for the help guys Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now