mojo_client/bin/scripts/__core_misc.def
False.Genesis 4845888fc3 * compacted scripts. needs min rev 141 to run (skipping 'lsort'). deleted old scripts.
* added script func 'lsort'. more args will be added later.
2007-06-22 11:20:50 +00:00

58 lines
1.3 KiB
Modula-2

//-----------------------------------------------
#script=getchatitem
#permission=255
//-----------------------------------------------
// expected args:
// @def: item id
// @0 (optional): color (in RGB hex format: 00FF00 = pure green)
// returns: clickable item link to use it chat messages
SET,i ${@def}
SET,color ${@0}
DEFAULT,i 0
TOINT,i ${i}
DEFAULT,color 6679FF
SET,link |cff${color}|Hitem:${i}:0:0:0|h[Item ${i}]|h|r
UNSET i
UNSET color
RETURN ${link}
//-----------------------------------------------
#script=makechatitem
#permission=255
//-----------------------------------------------
// purpose: write the text of a clickable item link into a variable
// expected args:
// @def: item id
// @0: variable name to write into
// @1 (optional): color (in hex format: 00FF00 = pure green)
SET,v #${@caller}::${target}
SET,{${v}} ?{getchatitem,{${@1}} ${@def}}
UNSET v
//-----------------------------------------------
#script=outv
#permission=0
//-----------------------------------------------
// purpose: output a variable's value to the console.
// usage: "outv x"
SET,vn #${@caller}::${@def}
IF ?{NOT ?{ISSET ${vn}}}
OUT * Var '${@def}' not defined.
RETURN
ENDIF
SET,vv ${${vn}}
OUT * Var '${@def}' = '${vv}'
UNSET vv
UNSET vn