Welcome Guest ( Log In | Register )

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Closed TopicStart new topic
> Variables List, Not to be confused with functions
post Apr 30 2009, 01:26 AM
Post #1

The following post is supplementry information

Group: Global Moderators
Posts: 2,922
Joined: 29-January 06
From: Eugene Oregon
Member No.: 31

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 http://snapnjacks.com/CCXDoc.php#Functions 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")

~Life is all busy and stuff right now. - Car accident, lots of dr. appointments... Other stuff too. I still <3 StealthBot.net - - I'll be around.
Thinking about PMing me? Post it instead! CCX Forums | SnapNJacks Trivia Forums
IPB Image
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


- Lo-Fi Version Time is now: 25th January 2020 - 04:58 PM
Skin by Andrea
Website Legal Information | Hosted by LunarPages