Deprecation: specialeffect2(), misceffect()

1 post in this topic

As of June 3rd, the specialeffect() command has been upgraded and it now allows to use effects on any kind of unit (player, npc, mob, homunculus, ...) and to show it to any player. This allowed us to deprecate specialeffect2() and misceffect() so now there is a single command for effects instead of 3 different ones, making things simpler for everyone. You can still use specialeffect2() and misceffect() but they will trigger a warning every time, since they will be removed in the future.




Here's how the updated specialeffect() command works:


specialeffect(effect number{, send target{, unit id{, account id ]}})


effect number is the effect to use.
see effect_list.txt for a list of all effects


send target is to whom the effect should be sent. The most common values are:

AREA will show the effect to every player in the area
SELF will show the effect to one player only

see for a list of possible send targets


unit id is the unit on which the effect should be centered
it can be a mob id, an account id, a npc id or the id of any other kind of unit


account id is the player to which the effect should be sent if SELF was specified as send target





To migrate from specialeffect2 to specialeffect:

specialeffect2(effect➜ specialeffect(effect, AREA, playerattached())

specialeffect2(effect, target, "player name"➜ specialeffect(effect, target, getcharid(CHAR_ID_ACCOUNT, "player name"))





To migrate from misceffect to specialeffect:

Because the behaviour of this command varies depending on if the npc has a sprite or not, what you want is either one of the two:

misceffect(effect➜ specialeffect(effect)

effect) ➜ specialeffect(effect, AREA, playerattached())




If you are using vanilla Hercules then all your scripts should already be converted.

See also

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now