Author Topic: CrazyFace Script - Help Needed  (Read 1117 times)

CODE HELP NEEDED
I need help making a code that will change my face every few seconds, I have already coded it, but I need someone to test and someone to tell me how to fix errors
JOBS OPEN:
-Testing
-Helping with coding

HERE are the codes.

As cool as this would be, this can and will get you kicked from any server that has the anti-rainbowplayer script enabled.

Although I would love to have my player blink every now and again.

Well could you help me code it?
Please?
Edit: But that doesn't stop people from using it on other servers!
Will you please download the code and test?
« Last Edit: February 12, 2012, 07:45:07 PM by comedy101experiments »

Computer is out, needs repairs, etcetera. I don't have time to download this and test.
Also, I know nothing of torque script.

Computer is out, needs repairs, etcetera. I don't have time to download this and test.
Also, I know nothing of torque script.

well thanks for posting lol

Crazy Face
Author comedy101experiments

if (!$CrazyFaceBindings)
{
    $remapDivision[$remapCount] = Crazy Face;
    $remapName[$remapCount] = ActivateDeacticate;
    $remapCmd[$remapCount] = CrazyFaceToggle;
    $remapCount++;
    $RainbowPlayerBindings=true;
}

$CrazyFaceCount = 0;
$CrazyFaceFlag = 0;
$CrazyFaceTempPack   = $prefAvatarFace;

function CrazyFaceToggle(%val)
{
    if(%val)
    {
   if($CrazyFaceFlag==0)
   {
       $CrazyFaceFlag=1;
       $RainbowPlayerTempPack=$prefAvatarFace;
       CrazyFaceLoop();
   }

   else if($CrazyFaceFlag==1)
   {
       $CrazyFaceFlag=0;
       cancel($CrazyFace);
       $prefAvatarFace=$CrazyFaceTempPack;
              clientcmdupdateprefs();
   }
    }
}

function facereset()
{
    cancel($CrazyFace);
    $prefAvatar$CrazyFaceTempPack;
        clientcmdupdateprefs();
}

function CrazyFaceLoop()
{
    if($CrazyFaceCount  63)
   $CrazyFaceCount = 0;

        clientcmdupdateprefs();
    $RainbowPlayerCount++;
    $RainbowPlayer=schedule(100,0,CrazyFaceLoop);

}
you are missing a bunch of stuff here that you should have copied out of the rainbow player mod.
    if($RainbowPlayerCount > 63)
   $RainbowPlayerCount = 0;

    $R=0.5+0.5*mSin($RainbowPlayerCount*3.14/16.0);
    $G=0.5+0.5*mSin($RainbowPlayerCount*3.14/16.0+21.0);
    $B=0.5+0.5*mSin($RainbowPlayerCount*3.14/16.0+42.0);
    $pref::Avatar::PackColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::HatColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::LLegColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::HeadColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::RLegColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::AccentColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::HipColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::RHandColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::LHandColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::LArmColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::RarmColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::TorsoColor=$R SPC $G SPC $B SPC "1";
    $pref::Avatar::SecondPackColor=$R SPC $G SPC $B SPC "1";
    clientcmdupdateprefs();
    $RainbowPlayerCount++;
    $RainbowPlayer=schedule(100,0,RainbowPlayerLoop);
}


    $RainbowPlayerBindings=true;
yea nope, change it to the proper $CrazyFaceBindings

   if($CrazyFaceFlag==0)
This is a bad practice, you should test for if(!$crazyfaceflag) and then have an else statement instead of an else if()
What would happen if the variable got messed up somehow?  The mod would not be flexible enough to recover and break.

   $prefAvatar$CrazyFaceTempPack;
nope, methinks you are missing an =

   $RainbowPlayerCount++;
    $RainbowPlayer=schedule(100,0,CrazyFaceLoop);
Did you actually attempt to finish the mod before asking for help?

    - entire remaining part -
your copy/paste skills need some work

I don't mean to sound too harsh, but it looks like this is your first attempt at editing a script, and you should perhaps keep to some simpler and more easily understandable things, such as chatbots and basic input -> output slash commands (servercmd).  At least until you feel like you understand scripting enough to get the basics.

I don't mean to sound too harsh, but it looks like this is your first attempt at editing a script, and you should perhaps keep to some simpler and more easily understandable things, such as chatbots and basic input -> output slash commands (servercmd).  At least until you feel like you understand scripting enough to get the basics.

inb4manyautogreetersliekmine

I don't mean to sound too harsh, but it looks like this is your first attempt at editing a script, and you should perhaps keep to some simpler and more easily understandable things, such as chatbots and basic input -> output slash commands (servercmd).  At least until you feel like you understand scripting enough to get the basics.
Screw crazyface, I am trying a chatbot, any tutorials?
P.S. Thanks for helping me Nexus!

Screw crazyface, I am trying a chatbot, any tutorials?
P.S. Thanks for helping me Nexus!

I did a search and this one looks okay
http://forum.blockland.us/index.php?topic=143501.0

is this using the core of the Rainbow Modification?