As you can probably infer, I haven't done any script objects to date. I will try to understand otto's script line by line:
new scriptObject(whatIs) //Creates new script object under name of "whatIs"
{
============== value["cow"] = "moo"; //*For value "cow", set as "moo"*
};
function serverCmdWhatIs(%client , %1, %2, %3, %4, %5) //Sets up function and command with the client and 5 text arguments
{
if(whatIs.value[trim(%1 SPC %2 SPC %3 SPC %4 SPC %5)] !$= "") //If the stuff you just typed in isn't blank...
messageClient(%client,'',"\c6"@trim(%1 SPC %2 SPC %3 SPC %4 SPC %5)@"\c3 is \c6"@whatIs.value[trim(%1 SPC %2 SPC %3 SPC %4 SPC %5)]); //Send "(person) is (value)" to client
}
function serverCmdSet(%client, %pl, %set) //Sets up function with arguments for client, player, and value
{
%pl = strReplace(%pl, "_", " "); //Replace all underscores with regular spaces for player (Not sure why this is necessary but ok)
if(%set !$= "") //If you actually put something for the %set argument...
============== whatIs.value[%pl] = %set; //*Adds another value to the SO list*
messageClient(%client,'',"\c3You have set \c6"@%pl@"\c3 to \c6"@%set@"\c3."); //More messaging feedback
}All of the lines I don't fully understand have a bunch of equal signs next to them