Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php on line 560

Warning: Cannot modify header information - headers already sent by (output started at /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php:560) in /home/sfoyston/public_html/TextStorm/Wiki/inc/auth.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php:560) in /home/sfoyston/public_html/TextStorm/Wiki/inc/actions.php on line 210
functions - TextStorm Wiki

The Wiki is still in development, please bare with us while we add and update content.

TextStorm Functions

Below you will find the details of TextStorms in-built functions and their usage.

You will need to instantiate the User class to access these functions.

AccessClass.php
$user = new User;

Note: If you are developing a plugin, $user is already available to you!

Modify a User's Coins

This allows you to give or take coins from a user.

Function: public function ModCoins($db, $user, $operation, $amount)

To give a user coins:

GiveCoins.php
$user->ModCoins($db, $username, "+", 1000000);

To take coins from a user:

TakeCoins.php
$user->ModCoins($db, $username, "-", 1000000);

Modify a User's Experience

This allows you to give or take experience from a user.

Function: public function ModExperience($db, $user, $operation, $amount)

To give a user experience:

GiveExperience.php
$user->ModExperience($db, $username, "+", 1000000);

To take experience from a user:

TakeExperience.php
$user->ModExperience($db, $username, "-", 1000000);

Give a User a Vehicle

This allows you to give the user a new vehicle from the Vehicle Store

Function: public function GiveVehicle($db, $user, $vehicleid)

To give a user a vehicle:

GiveVehicle.php
//the below would give the user vehicle ID 27 from the vehiclestore table
$user->GiveVehicle($db, $username, 27);

Give a User a Weapon

This allows you to give the user a new weapon from the Weapon Store

Function: public function GiveWeapon($db, $user, $weaponid)

To give a user a weapon:

GiveWeapon.php
//the below would give the user weapon ID 27 from the weaponstore table
$user->GiveWeapon($db, $username, 27);

Give a User a Chest

This allows you to give a user a chest that is configured in the Administration Panel

Function: public function GiveChest($db, $reason)

To give a user a chest:

GiveChest.php
//the below would give the user the chest with the reason "Hull" in the Admin Panel
$user->GiveChest($db, "Hull");

Send a User a System Message

This allows you to send a user a message from the System user

Function: public function SysMessage($db, $username, $message)

To send a System message to a user:

SystemMessage.php
//The below would send a message to Steve from the System user telling him he won the race and how much he won
$user->SysMessage($db, "Steve", "You have won the race and received $coins coins!");

Generate a Tooltip

This allows you to generate a tooltip - when text is hovered over a CSS box will display with more information.

Function: public function GenTooltip($text, $tiptext)

To display a tooltip:

GenerateToolTip.php
$user->GenTooltip("Hover over me", "This is some information displayed when you hover over the text");

User Logging

This allows you to log a user action to the database for administrators to view

Function: public function UserLogging($db, $loguser, $logreason)

To create a log:

UserLogging.php
$user->UserLogging($db, "Steve", "Opened the chest with ID: $id");

QR Code
QR Code functions (generated for current page)