quote:
Originally posted by Silentdragon
I'm assuming you use a space between the second part of the command so, change the substrings for those functions by 1 character or you will end up getting the space with it.
ie
code:
Message.substr(4,2) == "cs"
should be
code:
Message.substr(5,2) == "cs"
and for "/tphelp jeu" ?
And for this:
code:
if(Message.substr(0,8) == "/jeutous"){
if(Message.substr(9,2) == "cs"){
notify("Bonne boucherie ");
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
return 'Désolé, je charcute des gens a CS ';
}
else if(Message.substr(9,2) == "fp"){
notify("Bon frutijeux ");
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
return 'Désolé, je suis occupé sur Frutiparc ! ';
}
else if(Message.substr(9,5) == "dofus"){
notify("Bonnes quetes ! Et faites attention aux bouftous ! ");
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
return 'Désolé, je suis en train de jouer a Dofus !';
}
else {
notify("Commande non reconnue ...");
}
}
When i send "/jeutous dofus", i have: a notify "Commande non reconnue" and a the normal function.
Why ?