HTML Code:
// Rewritten from scratch. Public domain goodness.
// You need not credit me for this exceedingly useless utility.
function onActionServerSide()
{
if (params[0] == "attribs")
{
p = findplayer(params[1]);
if (p == null)
{
triggerAction(0, 0, "clientside", "Attributes Finder", "attribs", "null", params[1]);
}
else
{
triggerAction(0, 0, "clientside", "Attributes Finder", "attribs", p.account, p.body, p.head, p.sword, p.shield);
}
}
}
//#CLIENTSIDE
function onActionClientside()
{
if (params[0] == "attribs")
{
if (params[1] == "null")
{
say2("Player '" @ params[2] @ "' not found.");
}
else
{
say2
(
"Attributes of '" @ params[1] @ "':\n" @
"Body: " @ params[2] @ "\n" @
"Head: " @ params[3] @ "\n" @
"Sword: " @ params[4] @ "\n" @
"Shield: " @ params[5] @ "\n"
);
}
}
}
function onPlayerChats()
{
toks = player.chat.trim().tokenize();
if (toks[0] == "/getattribs" && toks[1] != null)
{
triggeraction(0, 0, "serverside", "Attributes Finder", "attribs", toks[1]);
}
}
Now, this likely does not work offhand but it is much better than that horrible code at the beginning of this thread.