46
Modification Help / (Solved) Arguments for sending avatar data?
« on: December 30, 2014, 11:16:27 PM »
What are the args for servercmdUpdateBodyColors and servercmdUpdateBodyParts?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
function hello()
{
test("hi");
}
//Remember this
//Each global var, there will be a tab in between
// $Schedules::All_[%num] = %type %func %ms %arg[0,15]
// or
// $Schedules::Type_[%num] = %func %ms %arg[0,15]
function releaseSchedules(%type)
{
if($Schedules_["Total",%type] <= 0)
{
error("You cannot release empty schedules.");
return;
}
if(!strLen(%type)) %type = "ALL";
cancel($ClearSch);
if(%type $= "ALL")
{
for(%i=0;%i<$Schedules_["Total",%type];%i++)
{
%main = $Schedules_[%type,%i];
%main = strReplace(%main,"\t","" TAB "");
//echo("Detected schedule: " NL %main);
%func = getField(%main,1);
%ms = getField(%main,2);
if(%func !$= "")
{
%crap = "";
for(%a=3;%a<17;%a++)
{
%str = getField(%main,%a) @ ", ";
if(%str !$= ", ") %crap = %crap @ "\"" @ %str @ "\"";
}
if(%crap !$= "")
{
%stuff = getSubStr(%crap,strLen(%crap)-4,4);
%crap = getSubStr(%crap,0,strLen(%crap)-4) @ strReplace(%stuff,", ","");
}
$Schedule_["ALL",%i] = schedule(%ms,0,eval,%func @ "(" @ %crap @ ");");
if(%ms > %bestMS) %bestMS = %ms;
}
$Schedule_["Total",%type]++;
}
}
else
{
//echo("Found " @ $Schedules_["Total",%type] @ " schedules to order.");
for(%i=0;%i<$Schedules_["Total",%type];%i++)
{
%main = $Schedules_[%type,%i];
%main = strReplace(%main,"\t","" TAB "");
//echo(" -> Detected schedule: " NL %main);
%func = getField(%main,0);
%ms = getField(%main,1);
if(%func !$= "")
{
%crap = "";
for(%a=2;%a<17;%a++)
{
%str = getField(%main,%a) @ ", ";
if(%str !$= ", ") %crap = %crap @ "\"" @ %str @ "\"";
}
if(%crap !$= "")
{
%stuff = getSubStr(%crap,strLen(%crap)-4,4);
%crap = getSubStr(%crap,0,strLen(%crap)-4) @ strReplace(%stuff,", ","");
}
$Schedule_[%type,%i] = schedule(%ms,0,eval,%func @ "(" @ %crap @ ");");
if(%ms > %bestMS) %bestMS = %ms;
}
$Schedule_["Total",%type]++;
}
}
$ClearSch = schedule(%bestMS,0,clearSchedules,%type);
}
//If %type is blank all holding schedules will be deleted and canceled
function clearSchedules(%type)
{
if($Schedules_["Total",%type] <= 0)
{
error("You cannot cancel empty schedules.");
return;
}
if(!strLen(%type)) %type = "ALL";
if($Schedule_["Total",%type] > 0)
{
for(%i=0;%i<$Schedule_["Total",%type];%i++)
cancel($Schedule_[%type,%i]);
}
deleteVariables("$Schedule_" @ %type @ "*");
deleteVariables("$Schedules_" @ %type @ "*");
$Schedules_["Total",%type] = 0;
$Schedule_["Total",%type] = 0;
}
function addToSchedule(%type,%func,%ms,%arg0,%arg1,%arg2,%arg3,%arg4,%arg5,%arg6,%arg7,%arg8,%arg9,%arg10,%arg11,%arg12,%arg13,%arg14,%arg15)
{
if(!strLen(%type)) %type = "ALL";
for(%i=0;%i<15;%i++)
%args = %args TAB %arg[%i];
%args = trim(%args);
if(%type $= "all") $Schedules_["ALL",$Schedules_["Total",%type]] = %type TAB %func TAB %ms TAB %args;
else $Schedules_[%type,$Schedules_["Total",%type]] = %func TAB %ms TAB %args;
$Schedules_["Total",%type]++;
}