Printable Version of Topic

Click here to view this topic in its original format _ Custom Command Xystem (CCX) _ Variables List

Posted by: Snap Apr 30 2009, 01:26 AM

Here's the list of variables for CCX CC's. - None of these will work in /testcc - as /testcc only parses functions.
Note - Coders: This list does not apply to ccx.ParseFunctions().
These are only replaced on execution of a Custom Command.
-- See for a list of functions.

As of 1.93

Here's the documentation - hopefully explained in a way that you can understand.
- Further documentation will be presented regarding this.

The below is subject to change in future versions of CCX

Varriable Name -> VBs code (Explanation)

%user / %0 -> Username
%chan -> MyChannel (Current channel)
%qsize -> GetQueueSize (Will error on 2.6)
%trigger -> Botvars.Trigger (The bots trigger)
%chancount -> GetInternalUserCount() (The amount of users in the channel)
%access -> UAccess (The users access - who executed the CC)
%flags -> UFlags (The flags of that user)
%gtc -> GetGTC() (Returns "Get Tick Count" - a large number containing the amount of MS the bot has been running)
%time -> Time (The time, without the date)
%date -> Date (The date, without the time)
%args -> UBound(Split(Arguements)) + 1 (Returns the amount of arguments spoken - useful in CCX code)

"Handy replacements" Depreciated...
%antiflood2 -> "%if(%qsize>2,%die)" (Useful for CCX. - Will error on 2.6)
%antiflood -> "%if(%qsize>1,%die)" (Once again, will error in 2.6)

"GID" replacements (Get Internal Data) All of these return -5 if the data is unavaliable
%clan -> GetInternalDataByUsername(Username, 0) (The users clan)
%bnetflags -> GetInternalDataByUsername(Username, 1) (The users battle-net flags - I.E. "16")
%ping -> GetInternalDataByUsername(Username, 2) (The users ping)
%product -> GetInternalDataByUsername(Username, 3) (The users product, like SEXP W2BN WAR3)
%safelisted -> GetInternalDataByUsername(Username, 4) (Is he safelisted?)
%statstring -> GetInternalDataByUsername(Username, 5) (Unparsed statstring)
%timeinchan -> GetInternalDataByUsername(Username, 6) (The amount of time in the channel)

%ruser, %ruser1, %ruser2 -> This returns a random user. %ruser1 will never = %ruser or %ruser2 - unless the channel only contains 2 people. %ruser could = %ruser2, and %ruser1 could = %ruser3.

Argument replacment explanation (%1, %2, %all, %rest)
%1, %2, %3 (ETC) -> Argument (Returns the argument related to that position, if non-existing - will not be replaced. It's good to note that unparsed %'s in a %if() will return false)
Example "!bla Hello world!" -> "Hello world %3". (Bla = "%1 %2 %3")
%all -> Arguments (Returns everything said after the command)
Example "!bla Hello world!" -> "Hello world". (Bla = "%all")
%all1, %all2, %all3 (ETC) -> Arguments After X (Returns everything after the 1st, 2nd etc- argument)
Example "!bla Hello world!" -> "world". (Bla = "%all1")
%rest -> Unparsed Args (Returns everything that remains after %1 and %2 is parsed:)
Example "!bla Hello world!" -> "Hello world". (Bla = "%1 %rest")

Powered by Invision Power Board (
© Invision Power Services (