SRL Archive - Help and Support

Food Finder and eater


aztek

2006-06-16 16:26:37

Hey Guys,

I was wondering if anyone could help me with a fod finding, and eating procedure. I cannot create the right one, script attached below.

inferno

2006-06-17 04:29:45

Procedure EatToHeal(FoodColor: Integer);
Var
Sex, Sey: Integer;
Begin
Sex:= 565;
Sey:= 215;

If(FindColorSpiral(Sex, Sey, FoodColor, MIX1, MIY1, MIX2, MIY2)) Then
Begin
Mouse(Sex, Sey, 0, 0, True);
End Else
Begin
WriteLn('You do not have food!');
SetRun(True);
RunAwayDirection('East');
LogOut;
TerminateScript;
End;
End;

You can take out the Sex:= 565; and Sey:= 215; lines, they assign that value to the variables but if it finds the colour then that value is overwritten by the coordinates of the colour. I don't know what the MIX1 etc values are but I guess you're searching in the inventory so replace them with the coordinates of the inventory. Apart from that it looks fine.

phantombmx

2006-06-17 04:53:28

From: inferno

You can take out the Sex:= 565; and Sey:= 215; lines, they assign that value to the variables but if it finds the colour then that value is overwritten by the coordinates of the colour. I don't know what the MIX1 etc values are but I guess you're searching in the inventory so replace them with the coordinates of the inventory. Apart from that it looks fine.

sex and sey are where it will spiral from :) also the MIX1..ect IS the coords for the inventory.. lookin in globals.scar ;)

WhiteShadow

2006-06-17 14:04:48

If you copied any procedures or functions from another script, please give them credits.

YoHoJo

2006-06-18 13:55:15

seX and seY and pwnds!