Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread Tools Search this Thread Display Modes
Old 03-01-2010, 12:57 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Cool sendText / requestText / onReceiveText()

I found a very old list from Skyld and I am trying to complete it with
all the sendtext / requesttext params and their results
(even if they are only available on single servers or are no longer
accessable from normal npcs)
Maybe everyone can help me to make this list up to date =p


Client-RC functionality is no longer available to local scripts on a server; only those added to the player on the login server such as the Scripted RC.


It is possible to use the requesttext and sendtext functions in order to communicate more directly with the gserver. There are many uses for using requesttext and sendtext, such as with the in-game IRC, Client-RC, and serverlist interaction.

Normally there are three parts to a request: the type, the option and with sendtext, the lines of data you wish to send, for example:

PHP Code:
requestTextstr typestr option );
sendTextstr typestr option, { params } ); 
PHP Code:
requestText"class""testclass" );
sendText"class""testclass", { "// My test class""// Scripted by Skyld" } ); 
The data is received using the onReceiveText method:
PHP Code:
function onReceiveTexttemp.texttypetemp.textoptiontemp.textlines ) {

The current list (not tested if everything works yet):
PHP Code:
requestText"clientrc"int 1 or ); - opens/closes a Client-RC session (only works if you have admin rights set up correctly on the server)

requestText"list"NULL ); - returns the serverlist (TestedDoes not work with normal scripts)
requestText"simplelist"NULL ); - returns a simplified version of the serverlist (TestedDoes not work with normal scripts)
requestText"upgradeinfo"NULL ); ^ - returns the upgrade information of the current player
"bantypes"NULL ); - returns possible ban types (Client-RC)
requestText"localbans"NULL ); - returns a list of local bans (Client-RC)

requestText"pmservers"NULL ); ^ - returns a list of public servers (used in the playerlist)
requestText"pmserverplayers"str servername ); ^ - shows the players of a given server in the playerlist
"pmunmapserver"str servername ); ^ - hides the players of a given server in the playerlist
"pmguilds"NULL ); ^ - returns a list of the guild tags currently in use
requestText"pmguildplayers"str guildname ); ^ - shows the players wearing the given guild tag in the playerlist
"pmunmapguild"str guildname ); ^ - hides the players wearing the given guild tag in the playerlist

Requests marked with a 
are special requests that might not be accessible by normal scriptsi.e. for privileged scripts such as the playerlist and serverlist.

requestText"weaponlist"NULL ); - retrieves the weapon list from the server (Client-RC)
requestText"classlist"NULL ); - retrieves the class list from the server (Client-RC)
requestText"npclist"NULL ); - retrieves the DB NPC list from the server (Client-RC)
requestText"weapon"str weaponname ); * - returns the weapon script of the given weapon (Client-RC)
requestText"class"str classname ); * - returns the class script of the given class (Client-RC)
requestText"npc"str npcname/int npcid ); * - returns the NPC script of the given DB NPC (Client-RC)
requestText"npcflags"str npcname/int npcid ); * - returns the flag list of the given DB NPC (Client-RC)
requestText"options"NULL ); * - returns the server options (Client-RC)
requestText"folderconfig"NULL ); * - returns the folder config (Client-RC)
requestText"serverflags"NULL ); * - returns the server flags (Client-RC)
requestText"folders"NULL ); - retrieves a list of folders accessible to RC (Client-RC)
requestText"folder"str foldername ); - retrieves a list of files in the given folder (Client-RC)
requestText"rights"str accountname ); * - returns the local rights of the player (Client-RC)
requestText"comments"str accountname ); * - returns the local comments of the player (Client-RC)
requestText"playerflags"str accountname ); * - returns the script flags of the given player (Client-RC)
requestText"playerweapons"str accountname ); * - returns the weapons list of the given player (Client-RC)
requestText"playerchests"str accountname ); * - returns the chest list of the given player (Client-RC)
requestText"playerattributes"str accountname ); * - returns the basic attributes of the given player (Client-RC)
requestText"nextdbnpcid"NULL ); - retrieves the next available DB NPC ID (Client-RC)
requestText"scripthelp"str searchterm ); - searches scripthelp texts for information on commands and objects (Client-RC)

Requests marked with are similar in requesting as they are sending data back using sendtexti.eto send a new weapons list.

requestText"playerweapons""Skyld" ); // requesting
sendText"playerweapons""Skyld", {"Test/NPC""Foo/Bar"} ); // sending a new list

sendText"adminmessage"int playeridstr message ); - sends an admin message to a player (Client-RC)
sendText"disconnect"int playeridstr disconnectreason ); - disconnects the given player ID (Client-RC)
sendText"lister""getbanhistory"str accountname ); - gets the ban history of a players account
"lister""staffactivity"str accountname ); - gets the staff activity of a players account
"resetnpc"str npcname/int npcidNULL ); - resets the given DB NPC (Client-RC)
sendText"deleteweapon"str weaponnameNULL ); - deletes the given weapon (Client-RC)
sendText"deleteclass"str classnameNULL ); - deletes the given class (Client-RC)
sendText"deletenpc"str npcnameNULL ); - deletes the given DB NPC (Client-RC)

sendText"irc"str option, { params } ); - See "IRC sendtext params" a few lines below for optionsparams and actions
"lister""checkinguild", { str accountnamestr guildname } ); - returns the players nick in the guild and the players guildrank also returns if the guild is pending !
sendText"lister""checkguildexists"str guildname ); - returns true or false if the guildname exists also returns true if the guild is pending 
IRC sendtext params
(Take a look into
for a description and usage):

Outgoing data:

PHP Code:
sendText"irc""login"str ircname ); - Connects to the IRC using name as the connections nickname
"irc""logout""" ); - Disconnects from the IRC
"irc""privmsg", { str destinationstr message } ); - Sends a message to a channel or user
"irc""notice", { str destinationstr message } ); - Sends a "notice" message to a channel or user
"irc""join"str channelname ); - Join channelname
"irc""part"str channelname ); - Leave channelname
"irc""topic", { str channelnamestr topic } ); - Set the topic for the channel 
Incoming data:

PHP Code:
onReceiveText"irc""privmsg", { str sourcestr destinationstr message } ) - Sends the source of a messagewhere the message was directed to (destination) and the message
"irc""notice", { str sourcestr destinationstr message } ) - Sends the source of a noticewhere the notice was directed to (destination) and the notice
"irc""addchanneluser", { str channelstr name, ( str servername ), ( str accountname ) } ) - Mechanism used to alert IRC scripts when users have joined the current channel, and lists users in the channel upon joinShows the channel that name joined.
onReceiveText"irc""deletechanneluser", { str channelstr name } ) - Mechanism used to alert IRC scripts when users have left the current channel
"irc""join", { str channel } ) - Mechanism used to confirm that you have joined channel
"irc""part", { str channel } ) - Mechanism used to confirm that you have left channel 
Reply With Quote
Old 03-01-2010, 06:25 PM
adam adam is offline
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura about
Send a message via AIM to adam
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- Channel: #graaldt
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
Old 09-10-2010, 05:52 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
PHP Code:
sendtext("syncoptions","distance", {horizontalvertical}); 
I keep messages in forums to the most important ones
Check out all of my other usefull threads here:
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 12:14 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.