SRL Archive - OSR Help

woot got some walking down


cradlefatal

2013-02-27 17:25:44

alright I got the ODTM for my walking positions from the bank to climb down steps


this is what the report gave me now how do I add that into my script?


Object DTM Include: Setup complete.
'123:85:10:10:7:134:96:10:7:130:84:10:7:122:96:10:7:46:118:10:7:134:69:10:7:104:25:6:7:117:67:2:7:34:23:1:7:104:83:1:7:119:91:5:81:81:117:42:152:71:147:96:96:104'
'128:84:11:1:7:60:84:1:7:76:92:10:7:135:115:10:7:98:76:10:7:90:68:10:7:86:84:10:7:90:95:10:7:78:95:10:7:55:102:10:7:29:71:10:7:60:29:4:80:80:119:67:131:83:72:99'
'98:121:6:0:7:126:45:1:7:114:75:1:7:17:89:1:7:33:97:10:7:74:126:10:7:125:70:3:79:80:122:80:96:136'
'96:128:10:0:7:127:44:1:7:115:75:1:7:31:97:1:7:15:90:6:7:30:73:10:7:47:71:10:7:42:87:10:7:46:99:10:7:34:98:10:7:139:45:3:81:79:127:92:94:133'
'21:99:4:1:7:95:30:10:7:25:54:10:7:21:41:10:7:34:33:3:80:81:88:137:14:99'
'60:96:7:2:7:92:132:2:7:75:136:6:7:81:27:10:7:79:33:10:7:66:33:10:7:52:33:10:7:75:20:3:78:80:61:112:43:86'
'84:96:8:1:7:83:25:1:7:66:16:2:7:96:132:2:7:113:128:10:7:96:15:10:7:100:28:10:7:88:28:10:7:70:36:3:80:80:68:99:96:101'



this is my script
program DragonKiller;
{$DEFINE SMART8}
{$i SRL\SRL.simba}
{$i SPS/sps.simba}







var
x,y,kills,z,count,count2,t,waitTime,CurrentHp,TotalHp :Integer;
todragons: tpointarray;
ColorString: String;
Skills :Array of String;
FightMode,EatAt:Array of Integer;
Xp :Array of Array [0..1] of Array [0..3] of Integer;
//delcare the sps variable






todragons: =[Point(3297, 2931), Point(3305, 2929), Point(3316, 2928),
Point(3324, 2930), Point(3330, 2934), Point(3336, 2938),
Point(3341, 2942), Point(3347, 2944), Point(3355, 2945),
Point(3363, 2946), Point(3372, 2946), Point(3380, 2942),
Point(3392, 2944), Point(3400, 2943), Point(3406, 2951),
Point(3406, 2959), Point(3406, 2969), Point(3400, 2972),
Point(3390, 2978), Point(3376, 2983), Point(3364, 2983),
Point(3354, 2987), Point(3347, 2994), Point(3337, 3001),
Point(3333, 3009), Point(3248, 3011), Point(3248, 2889),
Point(3425, 2885), Point(3421, 2996), Point(3340, 3008),
Point(3393, 2976), Point(3328, 3005), Point(326, 321),
Point(326, 312), Point(326, 305), Point(327, 296),
Point(330, 280), Point(328, 266), Point(328, 255),
Point(329, 242), Point(330, 230), Point(330, 215),
Point(329, 201), Point(330, 190), Point(330, 177),
Point(330, 157), Point(335, 143), Point(344, 128),
Point(355, 118), Point(374, 110), Point(390, 112),
Point(411, 113), Point(427, 113), Point(452, 113),
Point(464, 114), Point(478, 119), Point(490, 130),
Point(501, 141), Point(509, 146), Point(519, 158),
Point(525, 172), Point(540, 182), Point(540, 198),
Point(540, 208), Point(545, 222), Point(543, 239),
Point(545, 256), Point(548, 267), Point(550, 280),
Point(556, 294), Point(565, 305), Point(569, 316),
Point(576, 326), Point(584, 328), Point(597, 331),
Point(600, 342), Point(600, 351), Point(600, 359),
Point(600, 368), Point(601, 380), Point(602, 400),
Point(597, 410), Point(564, 408), Point(545, 402),
Point(533, 407), Point(531, 418), Point(531, 426),
Point(531, 434), Point(531, 444), Point(531, 458),
Point(531, 467), Point(527, 480), Point(518, 485),
Point(505, 491), Point(488, 490), Point(481, 473),
Point(490, 457), Point(495, 438), Point(503, 427),
Point(512, 418), Point(515, 388), Point(525, 370),
Point(527, 356), Point(522, 339), Point(522, 323),
Point(513, 309), Point(499, 300), Point(492, 299),
Point(475, 297), Point(459, 300), Point(440, 300),
Point(427, 300), Point(412, 300)];
todragons;



procedure DeclarePlayers;
begin
HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)
SetLength(Xp,HowManyPlayers);
SetLength(FightMode,HowManyPlayers);
SetLength(PercentEat,HowManyPlayers);

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
FightMode[0] := 4; // 1 Attack 2 Strength 3 Controlled 4 Defence
// 0 if using your own preset Ex. range or magic
PercentEat[0] := 25; // Percentage to Eat at whole numbers only
//(Health to eat at divided by total health multiplied by 100)
end;




procedure todragons;
begin
todragons := [Point(3297, 2931), Point(3305, 2929), Point(3316, 2928),
Point(3324, 2930), Point(3330, 2934), Point(3336, 2938),
Point(3341, 2942), Point(3347, 2944), Point(3355, 2945),
Point(3363, 2946), Point(3372, 2946), Point(3380, 2942),
Point(3392, 2944), Point(3400, 2943), Point(3406, 2951),
Point(3406, 2959), Point(3406, 2969), Point(3400, 2972),
Point(3390, 2978), Point(3376, 2983), Point(3364, 2983),
Point(3354, 2987), Point(3347, 2994), Point(3337, 3001),
Point(3333, 3009), Point(3248, 3011), Point(3248, 2889),
Point(3425, 2885), Point(3421, 2996), Point(3340, 3008),
Point(326, 321), Point(326, 312), Point(326, 305),
Point(327, 296), Point(330, 280), Point(328, 266),
Point(328, 255), Point(329, 242), Point(330, 230), Point(330, 215),
Point(329, 201), Point(330, 190), Point(330, 177),
Point(330, 157), Point(335, 143), Point(344, 128),
Point(355, 118), Point(374, 110), Point(390, 112),
Point(411, 113), Point(427, 113), Point(452, 113),
Point(464, 114), Point(478, 119), Point(490, 130),
Point(501, 141), Point(509, 146), Point(519, 158),
Point(525, 172), Point(540, 182), Point(540, 198),
Point(540, 208), Point(545, 222), Point(543, 239),
Point(545, 256), Point(548, 267), Point(550, 280),
Point(556, 294), Point(565, 305), Point(569, 316),
Point(576, 326), Point(584, 328), Point(597, 331),
Point(600, 342), Point(600, 351), Point(600, 359),
Point(600, 368), Point(601, 380), Point(602, 400),
Point(597, 410), Point(564, 408), Point(545, 402),
Point(533, 407), Point(531, 418), Point(531, 426),
Point(531, 434), Point(531, 444), Point(531, 458),
Point(531, 467), Point(527, 480), Point(518, 485),
Point(505, 491), Point(488, 490), Point(481, 473),
Point(490, 457), Point(495, 438), Point(503, 427),
Point(512, 418), Point(515, 388), Point(525, 370),
Point(527, 356), Point(522, 339), Point(522, 323),
Point(513, 309), Point(499, 300), Point(492, 299),
Point(475, 297), Point(459, 300), Point(440, 300),
Point(427, 300), Point(412, 300)];
end;

begin
if todragons then
status := 'walking to the dragons'
else begin
status :='failed walking to the dragons';
writeln(status + ' + time running:' +timerunning);
writeln(status + ' + time running:' +timerunning);
end;
end;
end;



Procedure Main ();
Begin
if not(FightMode[CurrentPlayer] = 0) then
SetFightMode (FightMode[CurrentPlayer]);
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][0][count]:= getXP (Skills[count]);
Xp[CurrentPlayer][1][count]:=Xp[CurrentPlayer][0][count];
End;
Marktime(T);
repeat
RunEnergy(25);
TotalHp:= Max(1, GetSkillInfo('hitpoints', False))*10;
if FindObjCustom(x,y,['ttack','Blu', 'Att', 'lue'],[8410698, 4473370, 4401698, 3354644, 3618325, 3218712, 4012317, 3350297, 9670715, 3218712, 10511185,4275482], 2) then
Begin
ClickMouse2(True);
markTime (t);
repeat
Wait(5);
if (TimeFromMark(t) >= 5000) then Break;
until (not FlagPresent) and srl_InFight;
if (srl_Infight) then
begin
Marktime(T);
waitTime := 1000+RandomRange(300,600);
repeat
wait (100+random (200));
AntiBAM;
CurrentHp:= GetMMLevels('hp', ColorString);
if (z>200) then begin
writeln('Hp: '+ToStr(CurrentHp)+' / '+ToStr(TotalHp));
writeln ('Hp: %'+ToStr(CurrentHp*100/TotalHp));
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][1][count]:= getXP (Skills[count]);
End;
z:=0;
end;
Eat(Round(CurrentHp*100/TotalHp),PercentEat[CurrentPlayer]);
z:= z+1;
If srl_InFight Then Marktime(T);
until (TimeFromMark(T) >= waitTime)
Marktime(T)
Kills := Kills +1;
Proggy;
End;
End;
until (not LoggedIn or (TimeFromMark(T) > 80000))
Players[CurrentPlayer].Active := False;
LogOut;
if not(CurrentPlayer+1 = HowManyPlayers) then
CurrentPlayer := CurrentPlayer + 1;
End;










// SpiralOut: Basic Antiban Mouse Spiral
Procedure SpiralOut ();
var
z,x,y, endpoint : Integer;
begin
z := 0;
endpoint := randomRange (50,150);
repeat
x := Round(z*Cos(0.5*z)+260);
y := Round(z*Sin(0.5*z)+224);
z := z + 1;
MMouse (x,y,20,20);
until (z >= endpoint)
end;


// Basic Antiban, exmain inventory, Spiral Mouse, Check Level, and Reset View
Procedure AntiBAM ();
begin
FindNormalRandoms;
case random(1000) of
25: examineInv;
30: SpiralOut;
50: begin gameTab (23);
LevelUpEX(False,True);
hoverSkill (Skills[Random(1)],false);
gameTab(25);
wait (100+Random(random(500))) end;
70: MMouse (365, 275,100,100);
99: ClickNorth(0);
end;
end;
Function Eat(HPP, PercentEat:Integer): Boolean;
var
I: Integer;
begin
Result := False;
If Not LoggedIn then Exit;
if (HPP < PercentEat) then
for i := 1 to 28 do
begin
if (ExistsItem(i)) then
begin
InvMouse(I, 3);
if IsUpText('Eat') then
begin
ClickMouse2(True);
Wait(RandomRange(350, 525));
Result := True;
Exit;
end;
end else
if (i = 28) then
Logout;
end;
end;
Procedure Proggy;
Begin
ClearDebug;
writeln('----------------------------------------------------------------');
For count2 := 0 to CurrentPlayer do
Begin
writeln(Players[count2].Name+' has gained the following xp');
for count := 0 to 3 do
begin
if not(Xp[count2][1][count]-Xp[count2][0][count] = 0) then
writeln (Skills[count]+' gained ~ '+ToStr (Xp[count2][1][count]-Xp[count2][0][count])+' XP');
end;
End;
writeln ('You have killed '+ToStr(Kills)+'Blue dragon');
writeln (Players[CurrentPlayer].Name+' has '+ToStr(InvCount)+' Pieces of Food Left');
writeln('----------------------------------------------------------------');
End;




begin
activateClient;
DeclarePlayers;
LoginPlayer;
SetupSRL
ClickNorth(0);
todragon;
Kills := 0;
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
repeat
Main;
until (AllPlayersInactive)
end.