Hey whats up guys & girls? I'm needing some help on my Chatbot that I'm making.
Note: I'm not going to make those Chatbots that spam up the server, later I'm going to try to make it not repeat Twice.
Whats the problem you say? Well that's just it I can't figure it out, No Syntax Errors or anything.
By the way I think it has something to do with the else function.
Code:
package Excella_03_WakeUp
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
if (%msg $= "Wake Up E3")
if(%name $= "§gt. ßµïlÐêx")
{
commandToServer('messageSent',"Excella: I'm awake! I'm awake! I was sleeping... -_-");
ActivatePackage(Excella_3_0);
}
if (%msg $= "Shutup E3")
if(%name $= "§gt. ßµïlÐêx")
{
commandToServer('messageSent',"Excella: But? Ah, ok.");
DeactivatePackage(Excella_3_0);
}
}
};
ActivatePackage(Excella_03_WakeUp);
//Main Package Is Below...
package Excella_03
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
if (%msg $= "You Awake?")
if(%name $= "§gt. ßµïlÐêx")
{
commandToServer('messageSent',"Excella: Yeah.");
}
//NOTE: It Does Not Matter How Many Spaces Or Tabs You Put InBetween, InFront Or Behind It. It's Just A Factor Of It's Easier To Read & It's Cleaner!
if (%msg $= "Hello")
{
commandToServer('messageSent',"Hi!");
}
if (%msg $= "ClearAllBricks")
if(%name $= "§gt. ßµïlÐêx")
{
commandToServer('messageSent',"Excella: Please Hold.");
commandToServer('ClearAllBricks');
commandToServer('messageSent',"Excella: Done!");
}
else
{
commandToServer('messageSent',"Excella: Task Has Failed. Maybe You Don't Have The Right Permissions To Preform This Action?");
}
if (%msg $= "ClearSpamBricks")
if(%name $= "§gt. ßµïlÐêx")
{
commandToServer('messageSent',"Excella: Please Hold.");
commandToServer('ClearSpamBricks');
commandToServer('messageSent',"Excella: Done!");
}
else
{
commandToServer('messageSent',"Excella: Task Has Failed. Maybe You Don't Have The Right Permissions To Preform This Action?");
}
if (%msg $= "ClearBricks")
if(%name $= "§gt. ßµïlÐêx")
{
commandToServer('messageSent',"Excella: Please Hold.");
commandToServer('ClearBricks');
commandToServer('messageSent',"Excella: Done!");
}
else
{
commandToServer('messageSent',"Excella: Task Has Failed. Maybe You Don't Have The Right Permissions To Preform This Action?");
}
if (%msg $= "ClearFloatingBricks")
if(%name $= "§gt. ßµïlÐêx")
{
commandToServer('messageSent',"Excella: Please Hold.");
commandToServer('ClearFloatingBricks');
commandToServer('messageSent',"Excella: Done!");
}
else
{
commandToServer('messageSent',"Excella: Task Has Failed. Maybe You Don't Have The Right Permissions To Preform This Action?");
}
}
};
ActivatePackage(Excella_03);
if (!$Excella_03Bindings)
{
$remapDivision[$remapCount] = "Excella_03";
$remapName[$remapCount] = "Activate/Deacticate";
$remapCmd[$remapCount] = "Excella_03Toggle";
$remapCount++;
$Excella_03Bindings=true;
}
$Excella_03Flag=0;
function Excella_03Toggle(%notdepressed)
{
if (!%notdepressed) return;
if($Excella_03Flag==0)
{
$Excella_03Flag=1;
deactivatePackage(Excella_03);
} else
if($Excella_03Flag==1)
{
activatePackage(Excella_03);
$Excella_03Flag=0;
exec("Add-ons/Client_Excella_03/Client.cs");
echo("Shhhh. This is a secret message: Why The Hell Did You Wake Me?!");
}
}
Thanks!