Script Name: Multiple Custom Commands in One Command
Script Description: This doesn't work with actual server commands, only custom commands, although can be useful if there are a ton of commands a player wants to use in one swoop. Commands are separated by ";". Example: "/woosh;yes!;eat pie now" will do 3 separate commands, "/woosh", "/yes!" and "/eat pie now" within the CText variable. Please note that the commands are executed in order from left to right. DO NOT DO: "/woosh; yes!; eat pie now", which will make the script not work.. Maybe in a future version I will implement that, but for now, make sure there is no space after the ";" and there is no "/" too.
Original Author: Curt
Core Version: 2.6.2
Code: function OnPlayerCommand(ID: Byte; Text: string): boolean;
var
CText: string;
begin
CText := GetPiece(Text,';',0);
//Custom commands go here! use CText instead of Text though
//Script does not work with "normal" commands, only custom commands using CText variable
if ContainsString(Text,';') then OnPlayerCommand(ID,'/' + Copy(Text,Length(CText) + 2,Length(Text)));
end;