@create Function Parent @desc Function Parent=RavenBlack's function parent object, containing functions commonly used by the bird in other code. Other objects will require this setting as their parent.%rraven@ravenblack.net%rhttp://www.ravenblack.net/ &A_111_HELP Function Parent=Functions available from FNHELP : [u(data_fnlist)] &DATA_FNLIST Function Parent=A_111 FN_DBREF FN_SHORTTIME FN_MOD FN_PLAYER_DBREF FN_LEADSTRING FN_MULTIREMOVE &FN_DBREF_HELP Function Parent=--u(FN_DBREF,target,%%#)%rReturns the dbref of 'target', if valid, else blank.%r%%# is required as the source looker, for objects in the same room or for searching for 'me' or 'here'. &FN_DBREF Function Parent=[u(FN_DBREF_[isdbref(locate(%1,%0,*))][isdbref(locate(%1,*%0,*))],%0,%1)] &FN_DBREF_00 Function Parent= &FN_DBREF_11 Function Parent=[locate(%1,%0,*)] &FN_DBREF_10 Function Parent=[locate(%1,%0,*)] &FN_DBREF_01 Function Parent=[locate(%1,*%0,*)] &FN_PLAYER_DBREF_HELP Function Parent=--u(FN_PLAYER_DBREF,target,%%#)%rAs FN_DBREF, except also returns blank if the resultant dbref is not that of a player. &FN_PLAYER_DBREF Function Parent=[setq(0,u(FN_DBREF,%0,%1))][u(FN_PLAYER_DBREF_[strmatch(type(%q0),PLAYER)],%q0)] &FN_PLAYER_DBREF_1 Function Parent=%0 &FN_SHORTTIME_HELP Function Parent=--u(FN_SHORTTIME,seconds)%rReturns the time indicated by 'seconds' in forms such as 10s, 6m, 14h or 2d. &FN_SHORTTIME Function Parent=[u(fn_shorttime_[gt(%0,86400)][gt(%0,3600)][gt(%0,60)],%0)] &FN_SHORTTIME_111 Function Parent=[div(%0,86400)]d &FN_SHORTTIME_011 Function Parent=[div(%0,3600)]h &FN_SHORTTIME_001 Function Parent=[div(%0,60)]m &FN_SHORTTIME_000 Function Parent=%0s &FN_MOD_HELP Function Parent=--u(FN_MOD,x,y)%rReturns the remainder when x is divided by y, ie u(FN_MOD,8,5) will return 3. &FN_MOD Function Parent=[sub(%0,mul(div(%0,%1),%1))] &FN_LEADSTRING Function Parent=[u(FN_LEADSTRING[strmatch(%1,)],%0,%1)] &FN_LEADSTRING0 Function Parent=%0%1 &FN_MULTIREMOVE_HELP Function Parent=--u(FN_MULTIREMOVE,list1,list2)%rMuch like 'setdiff()', except it will only remove /one/ of each element from list2, and won't remove duplicates. &FN_MULTIREMOVE Function Parent=[u(FN_MULTIREMOVE[lte(words(%1),0)],%0,%1)] &FN_MULTIREMOVE0 Function Parent=[u(FN_MULTIREMOVE[lte(words(%1),1)],remove(%0,extract(%1,1,1)),extract(%1,2,9999))] &FN_MULTIREMOVE1 Function Parent=%0 &FN_SUM Function Parent=[fold(FN_SUM1,%0)] &FN_SUM1 Function Parent=add(%0,%1) @create Dodgy Commands @parent Dodgy Commands=Function Parent @desc Dodgy Commands=You might wish to lock this to wizards only, and put it in the global room.%rYou might not want to lock it.%rI don't mind, either way.%rThe commands are on this separate object because if they were on the parent, every object so parented would run the command, with the potential then to badly spam the command's user. &CMD_FNHELP Dodgy Commands=$fnhelp*:@pemit %#=u(EXT_FNHELP_[gt(setq(0,match(u(data_fnlist),trim(%0)*))%q0,0)],%q0,%0) &EXT_FNHELP_0 Dodgy Commands=No function help for topic '%1'. &EXT_FNHELP_1 Dodgy Commands=[u(extract(u(data_fnlist),%0,1)_HELP)]