Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

how to use "valor" and "justice"

Only working scripts
Post Reply
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

how to use "valor" and "justice"

Post by mixers »

thanks everyone.
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: how to use "valor" and "justice"

Post by Vizit0r »

procedure ReqVirtuesGump;
procedure UseVirtue(VirtueName : String);

VirtueName : 'Compassion';
VirtueName : 'Honesty';
VirtueName : 'Honor';
VirtueName : 'Justice';
VirtueName : 'Sacrifice';
VirtueName : 'Valor';
VirtueName : 'Humility';
VirtueName : 'Spirituality';
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

Re: how to use "valor" and "justice"

Post by mixers »

i am sorry, did you give me a example?
Gauhar
Novice
Novice
Posts: 87
Joined: 08.07.2008 17:40

Re: how to use "valor" and "justice"

Post by Gauhar »

What example?
Justice is awarded to the person who delivers the killing blow to a murderer, or red, character in Felucca.
Valor is obtained by killing creatures in a Champion Spawn.
Crome696
Novice
Novice
Posts: 67
Joined: 04.03.2012 18:57
Location: Germany
Contact:

Re: how to use "valor" and "justice"

Post by Crome696 »

Code: Select all

Function Honor(TargetID:Integer):Boolean;
var
    myResult : Boolean;
begin
    myResult := False;
    ReqVirtuesGump();
    UseVirtue('Honor');
    if(WaitForTarget(500) = True)and (GetDistance(TargetID) < 6) then
    begin
        TargetToObject(TargetID);
        myResult := False;        
    end;                  
    Result := myResult;
end;
Sample of using Honor
Stealth Development Team & Support
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

Re: how to use "valor" and "justice"

Post by mixers »

Code: Select all

Program New;
begin
 //Body of Script    
    UseVirtue('Honor');
end.
error message:
21:27:11:718 [kaitan]: Compiler: [Error] (111.sc at 4:5): Unknown identifier 'UseVirtue'
21:27:11:718 [kaitan]: Compiling failed
21:27:11:718 [kaitan]: Script 111.sc stopped successfuly
Crome696
Novice
Novice
Posts: 67
Joined: 04.03.2012 18:57
Location: Germany
Contact:

Re: how to use "valor" and "justice"

Post by Crome696 »

mixers wrote:

Code: Select all

Program New;
begin
 //Body of Script    
    UseVirtue('Honor');
end.
error message:
21:27:11:718 [kaitan]: Compiler: [Error] (111.sc at 4:5): Unknown identifier 'UseVirtue'
21:27:11:718 [kaitan]: Compiling failed
21:27:11:718 [kaitan]: Script 111.sc stopped successfuly

Code: Select all

Program Test;

Function Honor(TargetID:Integer):Boolean;
var
    myResult : Boolean;
begin
    myResult := False;
    ReqVirtuesGump();
    UseVirtue('Honor');
    if(WaitForTarget(500) = True)and (GetDistance(TargetID) < 6) then
    begin
        TargetToObject(TargetID);
        myResult := False;        
    end;                  
    Result := myResult;
end;

begin
    Honor($12345678);
end.

Code: Select all

14:42:56:690 [Crome_Developer]: Compiling
14:42:56:715 [Crome_Developer]: Compiled succesfully
14:42:57:075 [Crome_Developer]: Succesfully executed
14:42:57:075 [Crome_Developer]: Script honor sample.sc stopped successfuly
Stealth 6.1.3 : https://bitbucket.org/Stealthadmin/stea ... /downloads
Stealth Development Team & Support
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

Re: how to use "valor" and "justice"

Post by mixers »

thanks, it's very good and i needed.
Post Reply