okay but what I am saying is that I still have food, it isn't recognizing it. It only eats a few then stops recognizing
[QUOTE=hoodz;1225168]If you remove the findallrandoms line the script will not response to the evil chicken ofcourse. Also i put srl_combatrandoms on false because it will mess up the script. And the evil chicken is really easy to kill. And if you are out of food it will teletab and log off. So you are completely safe.
It's not even safe. I just fucking died with 15+ sharks in my inv! Nice Script!!
Last edited by Hoodz; 04-24-2013 at 07:09 AM.
eats all my lobsters and sharks repeatedly! Anyway to stop this madness?!?!!?
k, I'll nazi your code a bit then, buddy.
Simba Code:if not(FindColor(X, Y, 255, 223, 127, 295, 175)) AND NOT (FindColor(X, Y, 65280, 223, 127, 295, 175)) AND NOT (SRL_infight) THEN
begin
if FindObjEx(X, Y, ['tta', Monstername], [monstercolor1, monstercolor2, monstercolor3, monstercolor4], 10, 50, MSX1, MSY1, MSX2, MSY2) THEN
case random(3) of
0..1 : begin
MouseBox(X+5, Y+5, X+5, Y+5, mouse_left);
status := ' attacking'
wait(5000+ random(250))
end;
2 : begin
MouseBox(X+5, Y+5, X+5, Y+5, mouse_right);
wait(200+random(100));
ChooseOptionMulti(['tta']);
status := ' attacking'
wait(5000+ random(250))
end;
first, I'll change your code to be more similar with Hoodz code, but with the same functionality.
Simba Code:if not(FindColor(X, Y, 255, 223, 127, 295, 175)) AND NOT (FindColor(X, Y, 65280, 223, 127, 295, 175)) AND NOT (SRL_infight) THEN
AttackMonster;
SRL_InFight is the same as finding the colors of the HP bar. which is what you're already doing, so no sense in having it there. So it would look like this:
Simba Code:if not(FindColor(X, Y, 255, 223, 127, 295, 175)) AND NOT (FindColor(X, Y, 65280, 223, 127, 295, 175)) THEN
AttackMonster;
alright, now we need it to eat. Which would look like this:
Simba Code:if not(FindColor(X, Y, 255, 223, 127, 295, 175)) AND NOT (FindColor(X, Y, 65280, 223, 127, 295, 175)) THEN
AttackMonster
else
begin
status := ' in fight'
eating_food;
end;
look familiar?
They have the same outcome, in this case.
the only improvement in the code you posted is maybe SRL_infight. it actually (in newer SRL-OSR) checks for the red splat as well as the hp bar. (if it finds either, it will return true)
not sure why Hoodz didn't use it, but I'm sure he has a reason.
Last edited by aaron126; 04-24-2013 at 03:22 PM.
So copy and replace with your code? Then it will work?
For me, it doesn't do any randoms.. What should I put into nickname field?
is there anyway to get the script to run away for like 10 seconds and then come back? for example if a swarm attacks?
This is what speedy's open granite uses:
Function InCombat: Boolean;
var
Total, I: integer;
Colors: TIntegerArray;
begin
Result := False;
Colors := [65280, 255];
Total := CountColorTolerance(Colors[0],HpBox.x1,HpBox.y1,HpBox.x2,HpBox.y2,2);
Total := Total + CountColorTolerance(Colors[1],HpBox.x1,HpBox.y1,HpBox.x2,HpBox.y2,2);
If InRange(Total, 125,175) then Result := True;
end;
if InCombat then
begin
EnableRun;
MMouse(650,19,0,0);
Wait(550);
ClickMouse2(Mouse_Left);
wait(RandomRange(30500,32500));
MMouse(629,149,0,0);
Wait(550);
ClickMouse2(Mouse_Left);
wait(RandomRange(18500,20500));
if InCombat then FindRandoms;
end;
sorry to keep bugging you about your script, I'm just kind of new and I don't get how hard it really is. I was wondering what to put as your nickname if your in game name was ESR6 (not my name, just something similar)
Anyone recommend a spot for range?
Why does it start gobbling all my food after it detects the HP I've set it to?
Hp is over 70, I set to eat at 40, and it keeps eating food even when my hp is full.
Tried different hp's, same thing.
updated!
It starts attacking them correctly then gives me this error after it's done killing one
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap, 3]
Help?
There are currently 3 users browsing this thread. (0 members and 3 guests)