Website hosted by:
Future Point Inc.

Raptor Chat 2001
Raptor Chat 2001 Beta Build 1873, released September 23rd, 2000 - Download Now!
                     Functions

What are functions?

A function is an advanced variable and its purpose is to return a value given the required parameters. The only differences between the two is that functions follow the format of "Function(Name;Parameters)" and that functions require parameters. The parameters allow you to customize the return value of a function.

Important Notes:

  • Function may be entered anywhere where a message is being sent to the server.
  • The ";" character is used to indicate the end of a parameter, therefore it cannot be used except to end a parameter.
  • If you do not want text formatting then add "//" to the start of the line, example:
    "Function(Uppercase;Raptor Chat)" will display "RAPTOR CHAT"
    "//Function(Uppercase;Raptor Chat)" will display "Function(Uppercase;Raptor Chat)"
  • Italic text is text that you must replace with a custom value described in the functions parameters.
  • Placing a variable in "{}" will prevent it from being formatted, example:
    "/display Today is <date> and it is currently <time> EST" will display "Today is 16/8/2001 and it is currently 3:42:24 EST"
    "/display Today is {<date>} and it is currently <time> EST" will display "Today is {<date>} and it is currently 3:42:24 EST"
  • A string is a variable that contains any characters making up words and sentences, an integer is a variable that can only contain numbers.

Raptor Chat 2001 Functions:

Function: Function(GetName;[account_number])
Parameters: account_number - A users Battle.Net account number
Description: Converts a users account number to their account name. The user must exist in the database and have an account number recorded for this function to return the correct value.
Examples: Pretend that "Nightmare" has an account number of "#7896234"
Function(ConvertRank;#7896234) - Returns: "Nightmare"
 

 

Function: Function(ConvertRank;[rank])
Parameters: rank - This can be a rank name or number, if you enter a number then the function will return the name of the rank, if you enter the name of a rank then the function will return the number of that rank.
Description: Converts a rank number to a name or vice versa.

Valid ranks are:
8 = Banned
7 = Ignored
6 = Guest
5 = Regular
4 = VIP
3 = Operator
2 = Leader
1 = Master

Examples: Function(ConvertRank;2) - Returns: "Leader"
Function(ConvertRank;Leader) - Returns: "2"
 

 

Function: Function(USFLine;[filename];[line])
Parameters: filename - The name of the existing file that you want to read from, the file must have an extension of ".usf", although you do not need to enter it, regardless of what extension you enter it will always add or replace it with ".usf".
line - The line name or number that you want to read from the file. If you enter a name then it will search through the file for any line where the first word of the line is equal to the name that you entered. The name and following space is not returned by the function, this makes it possible for you to use the user files as databases or a location to store variables. If there is a specific line number that you would like to get then enter the line number after the "#" sign, otherwise Raptor Chat will treat it as a word and try to find a line with that name on it.
Description: Returns a specified line number or line name from a user file.
Examples: Pretend we have a file named "Questions.usf" and the second line in the file is "Q2: What is your favorite character?"
Function(USFLine;Questions;#2) - Returns: "Q2: What is your favorite character?"
Function(USFLine;Questions;Q2:) - Returns: "
What is your favorite character?"
Function(USFLine;Questions.usf;Q2:) - Returns: "What is your favorite character?"
 

 

Function: Function(CleanWord;[word])
Parameters: word - Any string that you want to clean up
Description: Removes the unnecessary periods (.), commas (,) and spaces ( ) from the start and end of a string. This is helpful for use in a script's "Advanced If Conditions", where there may be a period at the end of a word and it really doesn't matter. It is good to use this function along with the "Word" function.
Examples: <sample> = "Test variable."
<sample> - Returns: "Test variable."
Function(CleanWord;<sample>) - Returns: "Test variable"
 

 

Function: Function(Value;[variable])
Parameters: variable - The name of the variable that you want to get the value for
Description: Returns the value of a variable. Placing a variable within {} will prevent it from returning a value, although there may be times where you do need a value for it, for instance when you are trying to edit the value of a variable with the /edit command. So this function will allow you to get the value even from within {}.
Examples: <sample> = "Test variable"
{<sample>} - Returns: "{<sample>}"
{Function(Value;<sample>)} - Returns: "{Test variable}"
<sample> - Returns: "Test variable"
Function(Value;<sample>) - Returns: "Test variable"
 

 

Function: Function(Word;[string];[from];[count])
Parameters: string - The string which will be used to retrieve the words
from
- The word number to begin copying from
count
- The number of words to copy
Description: Returns words from the string parameter
Examples: Function(Word;This is a test;2;3) - Returns: "is a test"
Function(Word;This is a test;1;2) - Returns: "This is"
 

 

Function: Function(Length;[string])
Parameters: string - The string which to return the length of
Description: Returns an integer value of the strings length/number of characters.
Examples: Function(Length;Whats up?) - Returns: "9"
Function(Length;Not much) - Returns: "8"
 

 

Function: Function(UpperCase;[string])
Parameters: string - The string to return in uppercase
Description: Converts a string to uppercase
Examples: Function(UpperCase;Raptor Chat) - Returns: "RAPTOR CHAT"
 

 

Function: Function(LowerCase;[string])
Parameters: string - the string to return in lowercase
Description: Converts a string to lowercase
Examples: Function(LowerCase;Raptor Chat) - Returns: "raptor chat"
 

 

Function: Function(Users;[groupName])
Parameters: groupname - The group which you are getting a list of users from
Description: Returns a list of users from the specified group name
Examples: Function(Users;Friends)
Function(Users;Enemies)
 

 

Function: Function(UserGroups;[username])
Parameters: username - The user that you are finding a list of groups for
Description: Returns a list of groups that a specified user is in
Examples: Function(UserGroups;Guest2)
 

 

Function: Function(ChannelHits;[channelname])
Parameters: channelname - The channel that you want to check the number of hits for
Description: Returns the number of hits a channel has received. Every time someone joins the channel "1" is added to the number of channel hits for that channel.
Examples: Function(ChannelHits;<channel current>)
Function(ChannelHits;Raptor Chat)
 

 

Function: Function(Random;[low];[high])
Parameters: low - Lowest possible return value
high
- Highest possible return value 
Description: This function will generate a random number, making it possible to create random response messages.
Examples: Function(Random;1;10) - Result: Any number from 1 - 10
Function(Random;15;20) - Result: Any number from 15 - 20
 

 

Function: Function(OnlineMonitor;Online;[user])
Parameters: user - The user whose online status you would like to check
Description: This function is designed to return a users online status from your "Online Monitor". The possible results are "Online", "Offline" or "Updating"
Examples: Function(OnlineMonitor;Online;Guest5)
 

 

Function: Function(OnlineMonitor;Location;[user])
Parameters: user - The user whose location you would like returned
Description: This function is designed to return the location of a user on Battle.Net through your "Online Monitor"
Examples: Function(OnlineMonitor;Location;Guest2)
 

 

Function: Function(OnlineMonitor;Updated;[user])
Parameters: user - The user that you are checking the last update for 
Description: This function is designed to return the time that a users information was last updated on your "Online Monitor"
Examples: Function(OnlineMonitor;Updated;Guest7)
 

 

Function: Function(OnlineMonitor;UsersCount)
Parameters: No optional parameters
Description: This function is designed to return the number of users that you have on your "Online Monitor"
Examples: Function(OnlineMonitor;UsersCount)
 

 

Function: Function(OnlineMonitor;UsersInfo;[index];[field])
Parameters: index - The item number in the list to retrieve information from
field
- The field number of the item to retrieve information from

Optional values for [index] are:
1 = Account Name
2 = Account Number
3 = Search Data
4 = Location
5 = Last Updated

Description: This function is designed to return information from your "Online Monitor", unlike the rest you enter an index number for the item that you would like to retrieve information from and then the field number for what information you want returned.
Examples: Function(OnlineMonitor;UserInfo;2;1) - Returns the second users Account name
Function(OnlineMonitor;UserInfo;1;4) - Returns the first users location
 

 

Function: Function(ChannelMonitor;UsersCount;[channel])
Parameters: channel - The channel to return the number of users for
Description: This function is designed to return the number of users in a channel from your "Channel Monitor"
Examples: Function(ChannelMonitor;UsersCount;Raptor Chat)
 

 

Function: Function(ChannelMonitor;Users;[channel])
Parameters: channel - The channel to return the list of users for
Description: This function is designed to return a list of users in a channel from your "Channel Monitor"
Examples: Function(ChannelMonitor;Users;Clan Recruitment)
 

 

Function: Function(ChannelMonitor;Updated;[channel])
Parameters: channel - The channel to return the last updated time
Description: This function is designed to return the time that a channels information was last updated through your "Channel Monitor"
Examples: Function(ChannelMonitor;Updated;Clan Recruitment)
 

 

Function: Function(ChannelMonitor;ChannelsCount)
Parameters: No optional parameters
Description: This function is designed to return the number of channels on your "Channel Monitor"
Examples: Function(ChannelMonitor;ChannelsCount)
 

 

Function: Function(ChannelMonitor;ChannelInfo;[index];[field])
Parameters: index - The item number in the list to retrieve information from
field
- The field number of the item to retrieve information from

Optional values for [index] are:
1 = Users Count
2 = Channel Name
3 = Users List
4 = Last Updated

Description: This function is designed to return information from your "Channel Monitor", unlike the rest you enter an index number for the item that you would like to retrieve information from and then the field number for what information you want returned.
Examples: Function(ChannelMonitor;ChannelInfo;3;2) - Returns the channel name of the third channel in the list
Function(ChannelMonitor;ChannelInfo;2;4) - Returns the time that the second channel in the list was last updated 
 

 

Function: Function(UserInfo;user;[field])
Parameters: user - The user that you would like to find information on
field
- The field that you would like returned

Optional values for [field] are:
1 or BN_Account_Name - The users Battle.Net account name
2 or BN_Account_Number - The users Battle.Net account number
3 or BN_Alias_Names - A list of alias names
4 or RC_Rank - The users rank that you set for them
5 or BN_Client - The users product/client code
6 or BN_Flag - The users Battle.Net flag
7 or RC_Icon - An integer value representing the users icon displayed
8 or PG_Flag - The users PlanetGamers.Net flag
9 or RC_Notes - Personal notes about this user
10 or RC_Last_Time_Seen - The last time you saw this user
11 or RC_First_Time_Seen - The first time you saw this person
12 or RC_Total_Time_Seen - Total time in seconds that you have seen this user
13 or RC_Time_In_Channel - The amount of time that the users has been in the channel
14 or RC_Number_Times_Seen - Number of times you saw this user join a channel
15 or RC_Last_Message_Seen - The last message you saw come from this user
16 or BN_Location - The user current channel/location on Battle.Net
17 or PG_RaptorChat - True or False, indicates if the user is a Raptor Chat user and on PlanetGamers.Net
18 or PG_Buddy - True of False, indicates if the user is on your buddy list
19 or PG_Name - The users account name on PlanetGamers.Net
20 or PG_Build - The users Raptor Chat Build according to PlanetGamers.Net
21 or PG_ChatState - The users chat state according to PlanetGamers.Net
22 or PG_Channel - The users channel/location on PlanetGamers.Net
23 or RC_Keep - True or False, indicates if this user will be saved to your database when Raptor Chat shuts down
24 or PG_Profile_Name - The users name from their profile
25 or PG_Profile_Age - The users age from their profile
26 or PG_Profile_Gender - The users gender from their profile
27 or PG_Profile_Location - The users location from their profile
28 or PG_Profile_EMail - The users e-mail address from their profile
29 or PG_Profile_Icq - The users Icq number from their profile
30 or PG_Profile_Homepage - The users homepage from their profile
31 or PG_Profile_Description - The users description from their profile

Description: This function will return information about a user through the Raptor Chat database
Examples: Function(UserInfo;<user>;2) or  Function(UserInfo;<user>;BN_Account_Number)

The Raptor Chat Website and all content is Copyright (c) 2000 Buaron Software