Code: Select all
AddTrigger bf_Chat_tell "@Player@ tells you, '@LinePart@'"
AddTrigger bf_Chat_tell "@Player@ told you, '@LinePart@'"
AddTrigger bf_Chat_channel "@Player@ tells ${ChatInChan}:1, '@LinePart@'"
AddTrigger bf_Chat_irc "<@Player@> @LinePart@
.....
function bf_Chat_channel(string FullLine, string Player, string Command)
{
;Check it if is a master
call bf_Check_Master ${Player}
if ${si_Return}
{
return
}
echo Received a Channel with ${Command}
call bf_DoCommand ${FullLine} ${Player} ${Command}
}
......
function bf_DoCommand(string FullLine, string Player, string Command)
{
echo Start of DoCommand with ${Command}
;Find the command to execute
;TODO Custom commands from an XML
if ${Command.Left[1].Equal["/"]}
{
EQExecute ${Command}
}
if ${Command.Left[${Me.CleanName.Length}].Equal[${Me.CleanName}]}
{
echo Command is for me!
Command:Set[${Command.Right[${Math.Calc[${Command.Length}-${Me.CleanName.Length}]}]}]
}
Switch ${Command}
{
case Follow
echo [COMMAND] follow
call bf_Follow ${Player}
break
case sit
echo [COMMAND] sit
call bf_Command_sit
break
case stay
echo [COMMAND] stay
call bf_Command_stay
break
case face
echo [COMMAND] face
call bf_Command_face
break
Default
echo Could not parse: ${Command}
break
}
EndSwitch
}
My output is:
Code: Select all
Received a Channel with stay
Start of DoCommand with blah:1
Could not parse blah:1
Any ideas would be grand.
-Red


