SRL Archive - OSR Help

Another method for "&&"?


lmfaoown

2013-03-04 12:09:45

Is there another method for && through pascal? I'm pretty new at it, and can't figure it out! I've got this so far

if (IsInCombat = 0 && not P07InvFull) then
How would I make the && into something pascal? I'm confuzzled :duh:

The Killer

2013-03-04 12:10:35

and
e.g.
if (IsInCombat = 0 and not P07InvFull) then

Sjoe

2013-03-04 12:10:57

if (IsInCombat = 0 and not P07InvFull) then

EDIT: Fu TK! :ninja:

Ian

2013-03-04 12:11:53

From: lmfaoown
Is there another method for && through pascal? I'm pretty new at it, and can't figure it out! I've got this so far

if (IsInCombat = 0 && not P07InvFull) then
How would I make the && into something pascal? I'm confuzzled :duh:


You mean like


if ((IsInCombat = 0) and (not P07InvFull_) then

lmfaoown

2013-03-04 12:34:08

Perfection! Thank's a bunch. Now, instead of spamming threads, i'll post my other problem here… I want my script to bury every bone in its inventory, but it'll only bury 1 bone, then proceed to pickup another bone, then bury 1, repeat. How can I fix this? I know the "until not Bone:….." is completely incorrect, but that's to give you the idea of what I want to do. Is there a way, instead of doing the method 27 times?

Bone := DTMFromString('mggAAAHicY2NgYHBlYmCwAmInIPYAYl8o+yoQXwbic0B8AYivA/FtIG4oL2fISExk2L1hA8PSWTMZpnZ3MXi6uDDgAow4MAQAAO+jD7s=');
if FindDTM(Bone, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeLn('BuryingBone');
Mouse(x, y, 1, 1, true);;
end;
until not(Bone := DTMFromString('mggAAAHicY2NgYHBlYmCwAmInIPYAYl8o+yoQXwbic0B8AYivA/FtIG4oL2fISExk2L1hA8PSWTMZpnZ3MXi6uDDgAow4MAQAAO+jD7s='));
end;

Sjoe

2013-03-04 12:39:52


for i:= 1 to 28 do
begin
if P07_ExistsItemDTM(Bone, x, y) then
begin
writeLn('BuryingBone');
Mouse(x, y, 1, 1, true);;
end;
end;

use this

function P07_ExistsItemDTM(dtm: Integer; var x, y: Integer): Boolean;
begin
P07_Gametab(tab_Inv);
Wait(300 + Random(300));
Result := FindDTM(dtm, x, y, P07_MIx1, P07_MIy1, P07_MIx2, P07_MIy2);
end;