Page 1 of 1

ATTN servers with custom content using onMobDeath

Posted: Sun May 15, 2016 5:15 pm
by TeoTwawki
How to fix your stuff
As of revision 22ea0bb the function arguments have changed (sorry). If you don't have any custom code using onMobDeath or onMobDeathEx, you can ignore this post.
_________________________

If you are good with regex you can do this all in a single find+replace..If anyone would like to contribute that to the thread, knock yourself out. why didn't I save the regex I used, sigh. Include the spaces when performing these instructions!

Find this string:

Code: Select all

 ally:
Replace with:

Code: Select all

 player:
Find this string:

Code: Select all

(ally
Replace with:

Code: Select all

(player
Find this string:

Code: Select all

onMobDeath(mob,killer,ally)
Replace with:

Code: Select all

onMobDeath(mob, player, isKiller)
Find this string:

Code: Select all

onMobDeath(mob, killer, ally)
Replace with:

Code: Select all

onMobDeath(mob, player, isKiller)
Find this string:

Code: Select all

, ally
Replace with:

Code: Select all

, player
Find this string:

Code: Select all

,ally
Replace with:

Code: Select all

,player
Notice all above I only gave you examples to fix ally and not killer? Killer is gone. If you used it you had broken code this whole time. To act only on the person who landed the killing blow, wrap your code with:

Code: Select all

if (isKiller == true) then
    your Code here
end