Profiles

Page dedicated to handling profile accounts.


ProfileIndex variable

This variable is what tells WaspLib which account you will be using of the ones you have in a TProfileArray you want to use for this botting session.


TProfile

Record holding account credentials and world preferences.


TProfileArray

Type that holds player account information for Login, world hopping and BankPin handling.


TProfileArray.Add

procedure TProfileArray.Add(user, pass: String; pin: String = ''; worlds: TIntegerArray = []);

Adds a TProfile to the TProfileArray.

Example:

Profiles.Add('username', 'password', '0000');

TProfileArray.NextPlayer

procedure TProfileArray.NextPlayer(disableCurrent: Boolean);

Switches to the next active profile. If disableCurrent is True, the current profile is marked inactive.


Profiles.Get

function TProfileArray.Get(): TProfile;

Returns the currently selected TProfile. The currently selected TProfile is decided by ProfileIndex which is an index of the TProfileArray.

Example:

WriteLn Profiles.Get().Username;

Profiles.Update

procedure TProfileArray.Update(const profile: TProfile);

Updates the currently selected TProfile. The currently selected TProfile is decided by ProfileIndex which is an index of the TProfileArray.

The way this works is a little bit special as Profiles[ProfileIndex] is not not completely updated:

  • Profiles[ProfileIndex].Active is never changed.

  • Profiles[ProfileIndex].Name, Profiles[ProfileIndex].Username, Profiles[ProfileIndex].Password and Profiles[ProfileIndex].Pin are only updated if the values of the passed in profile are not ''.

  • Profiles[ProfileIndex].Worlds is always set to profile.Worlds

Example:

WriteLn Profiles.Get();
Profiles.Update(['', '', '', ''. [311, 312]]);
WriteLn Profiles.Get();

Profiles.GetPin

function TProfileArray.GetPin(): String;

Get the current Player bank pin.

Example:

if BankPin.IsOpen() then
  BankPin.Enter(Profiles.GetPin());

Profiles.Load

procedure TProfileArray.Load();

Loads all account profiles from the accounts JSON files (0.json, 1.json, etc).


TProfileArray.Contains

function TProfileArray.Contains(name: String): Boolean;

Checks if a profile with the given name already exists.


Profiles variable

Global TProfileArray variable.