neG
2007-11-29 07:54:23
I'm having trouble thinking of a way to make something work properly in my script.
I have this procedure here.
[PHP]procedure FixStyle;
var CAtt, CStr, CDef: Integer;
begin
if not LoggedIn then Exit;
begin
CAtt := GetSkillLevel('attack');
CStr := GetSkillLevel('strength');
CDef := GetSkillLevel('defence');
if TargetAttack > CAtt then
begin
WriteLn('Attack below target level.');
SetStyle('att');
Exit;
end;
if TargetStrength > CStr then
begin
WriteLn('Strength below target level.');
SetStyle('str');
Exit;
end;
if TargetDefence > CDef then
begin
WriteLn('Defence below target level.');
SetStyle('def');
Exit;
end;
end;
end;[/PHP]
And I want to make some constants such as
AttackPriority = 2
StrengthPriority = 1
DefencePriority = 3
so that it will excecute the "if TargetStrength > CStr then" first, then the attack part, then finally defense.
Do you understand what I mean? Can anyone help out?
I have this procedure here.
[PHP]procedure FixStyle;
var CAtt, CStr, CDef: Integer;
begin
if not LoggedIn then Exit;
begin
CAtt := GetSkillLevel('attack');
CStr := GetSkillLevel('strength');
CDef := GetSkillLevel('defence');
if TargetAttack > CAtt then
begin
WriteLn('Attack below target level.');
SetStyle('att');
Exit;
end;
if TargetStrength > CStr then
begin
WriteLn('Strength below target level.');
SetStyle('str');
Exit;
end;
if TargetDefence > CDef then
begin
WriteLn('Defence below target level.');
SetStyle('def');
Exit;
end;
end;
end;[/PHP]
And I want to make some constants such as
AttackPriority = 2
StrengthPriority = 1
DefencePriority = 3
so that it will excecute the "if TargetStrength > CStr then" first, then the attack part, then finally defense.
Do you understand what I mean? Can anyone help out?