Sometimes you have to get the file to be discovered and then execute it.
Most scripts I make I have a code like this:
function FixFile()
{
discoverfile("add-ons/Script_File.zip");
exec("add-ons/Script_File/client.cs");
}
Here is your fixed version of your bot. You were missing some things. I have also modified a few functions to make it a little clean.
//Josheua & §gt. ßµïlÐêx's code
package JoshBot
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
if($JoshBotFlag)
return;
switch$(%msg)
{
case "JoshBot":
commandToServer('messageSent',"JoshBot: What?");
case "no":
commandToServer('messageSent',"JoshBot: Yes.");
case "yes":
commandToServer('messageSent',"JoshBot: No.");
case "hi":
commandToServer('messageSent',"JoshBot: Sup.");
case "sup":
commandToServer('messageSent',"JoshBot: Hey.");
case "Dog":
commandToServer('messageSent',"JoshBot: WOOF! BARK!");
case "jk":
commandToServer('messageSent',"JoshBot: yo mumma is a joke!");
}
}
};
activatepackage(JoshBot);
if (!$JoshBotBindings)
{
$remapDivision[$remapCount] = "JoshBot";
$remapName[$remapCount] = "Activate/Deacticate";
$remapCmd[$remapCount] = "JoshBotToggle";
$remapCount++;
$JoshBotBindings=true;
}
$JoshBotFlag = 0;
function JoshBotToggle()
{
$JoshBotFlag = !$JoshBotFlag;
echo($JoshBotFlag);
}