From
http://www.eqemulator.net/forums/viewtopic.php?t=12020:
quest::castspell(id,spellid); - Casts "spell" on entity with "id".
quest::selfcast(spellid); - Forces client to cast spell on themself (useful for self only and group effect spells).
Instead of
quest::selfcast($userid,2049); try
quest::castspell($userid,2049);