Increase drop from monters by type

Lulupard

New member
Messages
17
Points
0
Hi!

Is it possible to dynamically increase drop rates from certain types of monsters, for example Fish monsters?

Thank you!

 
first, remove the existing drop:

delmonsterdrop(<mob id or name>, <item id>)


then add it back, with a different drop rate:

addmonsterdrop(<mob id or name>, <item id>, <rate>)


This will only change one monster at a time, so you must hard-code all the mob ids in your script.

An alternative could be to iterate over ALL monsters in a loop starting from id 1001 and checking with getmonsterinfo() if the race is RC_Fish, but the loop would be insanely long and block the thread (so requires freeloop), which would make the server completely unresponsive while processing the loop. If you only plan to do it in OnInit or when a custom atcommand is called it would probably be fine though.

 
As I was planning on doing automatic weekly drop increases, that does not sound very promising.

Thank you for the answer anyway!
default_smile.png


 
Back
Top