Jump to content

d.count_monster (checking if all current mobs are dead in dungeon)


Recommended Posts

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

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

  • Love 1
Link to comment
Share on other sites

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

  • Love 1
Link to comment
Share on other sites

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

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.