// purpose: let a player fly. (at least works on MaNGOS) // args: @def: player name // returns: guid of the targeted player, else false. empty string if we are not in the world. #permission=100 // we can use this script only if we are in the world if ?{not ${@inworld}} logerror Can't slap anything if i am not in the world! return endif // normalize player name. first char uppercased, rest lowercased. set,name ?{uppercase ?{substr,1 ${@def}}} out name1: ${name} set,len ?{strlen ${@def}} out strlen: ${len} sub,len 1 out len: ${len} append,name ?{lowercase ?{substr,${len},1 ${@def}}} out name2: ${name} // target the player. if targeting was successful, cast spell "Knockback 500". set,t ?{target ${name}} if ${t} logdebug slapping player '${name}' castspell 11027 target 0 else logerror Can't target player '${name}' endif unset name return ${t}