SRL Archive - OSR Script Requests

Bandits Script - guthans - need a little code.


fire_caper

2013-04-30 07:55:59

Name - What would the script be called? I dont mind.
What does the script do? and Where does it do it? Bandits camp.
What does the script achieve? Trains combat.
f2p/p2p? any other level / skill / quest requirements? p2p, 70 att str def
Do you have an account with these requirements you could lend to a dev? yes.
Difficulty… (Easy/Medium/Hard) Easy.

I tried editing hoodz fighter a lot so that instead of eating the food at a certain amount it would click on the guthans spear. However im not sure how i do this and also im not sure how i would switch back to my d scim and rune defender :/

program bandits;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$i SRL-OSR\SRL\misc\debug.simba}
{$i SRL-OSR\SRL\misc\SmartGraphics.simba}

var
TabDTM, redbar, X, Y, count, backgroundpaint: integer;
Monster: TPointArray;
status: string;
const
//configuration settings
//standard setup: monster: deadly red spider, eating lobster, eat at 42 hp, looting: false, prayer: false.

nickname = ''; //your ingame name *nickname* *ONLY 3-4 LETTERS!
username = ''; //enter your username/mail here.
password = ''; //enter your password here.

debuginfo = 'false'; //debug info, true or false (automatic false)

HpToEat = 42; // enter the amount of hitpoints where you want to eat at, example: HpToEat = 35;
foodname = 'obste'; //enter food name here (only a couple letters) example: foodname = 'obster';
foodcolor1 = 1798355; //enter your food colors here.
foodcolor2 = 1598911; //
foodcolor3 = 1598653; //PLEASE USE ALL FOOD COLOR1+2+3 AND PICK SOME IDENTICAL COLORS OF THE FOOD!
trainingmode = 2; //use here what mode you want to use, leftupcorner: 1 rightupcorner: 2 leftundercorner:3 rightundercorner: 4, example: trainingmode: 2;

//END OF USER CONFIGURATIONS DONT TOUCH ANYTHING AFTER THIS!
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := username;
Pass := password;
nick := nickname;
Active := True;
end;
end;
procedure AntiBan;
begin
case random(900) of
0..1: begin
hoverskill(skill_strength, false)
status := ' antiban: hovering skill'
sleep(800+random(500)) end;
2..3: begin hoverskill(skill_hitpoints, false)
status := ' antiban: hovering skill'
sleep(800+random(500)) end;
4..10: begin
status := ' antiban: moving camera'
makecompass(randomrange(0, 360))
sleep(800+random(500)) end;
11..16: begin MouseBox(MSX1, MSY1, MSX2, MSY2, 3)
status := ' antiban: random mouse movement'
sleep(800+random(500)) end;
17: begin
if (use_prayer = 'false') then
case random(5) of
1: begin
status := ' antiban: afk mode'
wait(80000+ random(40000))
end
end
else
if use_prayer = 'true' then
antiban;
end;
18: begin adjustmousespeed(2, 10, 20)
status := ' antiban: changing mouse speed'
sleep(800+random(500)) end;
19: begin randomRClick;
status := ' antiban: random right click'
sleep(800+random(500)) end;
20: begin hovermovingobject;
status := ' antiban: hovering random object'
sleep(800+random(500)) end;
21: begin MMouseOffClient('top');
status := ' moving mouse off client'
sleep(800+random(500)) end;
22: begin MMouseOffClient('left');
status := ' antiban: moving mouse off client'
sleep(800+random(500)) end;
23: begin MMouseOffClient('right');
status := ' antiban: moving mouse off client'
sleep(800+random(500)) end;
24:begin MMouseOffClient('bottom');
status := ' antiban: moving mouse off client'
sleep(800+random(500)) end;
end
end;

procedure eating_food;
begin
if GetSkillInfo('hitpoints', true) > HpToEat then
begin
status := ' checking hp'
wait(700+random(200))
antiban;
end
else
begin
gametab(tab_inv)
wait(120+ random (200))
if gametab(tab_inv) Then
begin
if FindObjEx(X, Y, ['at', foodname], [foodcolor1, foodcolor2, foodcolor3], 10, 50, MIX1, MIY1, MIX2, MIY2) THEN
begin
status := ' eating'
MouseBox(X+3, Y+3, X+3, Y+3, mouse_left);
sleep(1000+random(1000))
gametab(tab_stats)
end
else
begin
status := ' out of food, logging out after 20 seconds'
TabDTM := DTMFromString('m1gAAAHic42JgYOAFYmkg5gJiESBmBWJ+BgSQhmKQOh4kvjRUXgKqlw2IRYE4KykJSDISxP8ZiAOETYJgBAAAz9MDgg==');
if FindDTM(TabDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MouseBox(X+1, Y+1, X+1, Y+1, mouse_left);
sleep(10000+random(4000))
logout;
FreeDTM(TabDTM);
terminatescript;
end;
end
end
end
end;
procedure skill_failsafe;
begin
if FindColor(X, Y, 8042720, 485, 11, 515, 32) then
begin
status := ' found a skill interface, closing'
MouseBox(X+1, Y+1, X+1, Y+1, mouse_left);
wait(400+random(300))
end
else
begin
isincombat;
end
end;

begin
DeclarePlayers;
SetupSRL();
disguise('bandits')
SRL_CombatRandoms := False;
ActivateClient;
ClearDebug;
writeln('bandits')
repeat
if (not LoggedIn) then
begin
LogInPlayer;
setangle(0)
setrun(true)
setfightmode(trainingmode)
gametab(tab_stats)
end;
if (LoggedIn) then
begin
skill_failsafe;
FindNonInventoryRandoms();
end;
until(false);
end.

Pukka

2013-04-30 10:32:05

I would like this also :)

Hoodz

2013-04-30 19:09:31

From: Pukka
I would like this also :)


You can request it in my thread