From Stealth Client

Jump to: navigation, search

Date

DateTimeToStr

function DateTimeToStr(D: TDateTime): String

FloatToStrF

function FloatToStrF(Value: Extended; Format: TFloatFormat; Precision, Digits: Integer): string

GetStaticArt

function GetStaticArt(Type, Color : Word) : TBitmap;

This function allows you to extract a picture for an item of selected Type & Color.

Return value: TBitmap class.


Examples:

NB:Method "SaveToFile" of the class saves the bit map into a file.

PROGRAM GetStaticArtDemo;
 
VAR
BMP : TBitmap;
 
BEGIN
	// $0E75, $0000 - Type and Color of your Backpack.
	BMP := GetStaticArt($0E75, $0000);
	// CurrentScriptPath - saves the file to the current script folder.
	BMP.SaveToFile(CurrentScriptPath + 'Backpack.bmp');
END.

A shorter way:

PROGRAM GetStaticArtDemo;
 
BEGIN
	GetStaticArt($0E75, $0000).SaveToFile(CurrentScriptPath + 'Backpack.bmp');
END.

GetTickCount

function GetTickCount : Cardinal;

MsToDateTime

function MsToDateTime(TimeMS : Word) : TDateTime

StrToDateTime

function StrToDateTime(const s: string): TDateTime

StrToTime

function StrToTime(const s: String): TDateTime

TimeToStr

function TimeToStr(D: TDateTime): String

Timer

function Timer: Cardinal

Outdated function, not recommended for usage.

This function is another name for function GetTickCount

Пример использования

    while (mana < 20) and (not dead) do
    begin
      if ((Timer > (MeditateTimer + (10 * 1000))) or (MeditateTimer = 0)) then
      begin
        UseSkill('Meditation')
        MeditateTimer :=Timer;
      end;
      wait(200);
    end;


Pages in category "Date"

The following 9 pages are in this category, out of 9 total.

D

D cont.

D cont.