Brandon
08-19-2011, 11:35 PM
It doesn't work... the wire is toooo thin.. The wire also doesn't always show.. U actually have to play in openGL to see it properly.. and colour finding doesn't work in OpenGL. I tried what Coh3n suggested.. it fails quite a lot and takes way to long to find the wire.. I put it in a repeat loop.. even added "didredclick".. it just never finds the wire no matter how much tolerance I put.. instead sometimes it just finds a colour and clicks the tile and bam.. I end up getting poisoned and losing HP..
Instead I just added antipoison to my script and just made the character purposefully walk over the wire then drink. Only solution that's effective.
Wrote the script because its like 1.4-1.8m an hr (probably less in pascal/simba/smart :c) guaranteed as all the stupid Grenwall bots are for rsbuddy and they are all VIP only.. Tom actually gave me the idea.. Decided to start writing it today.. Place is dead empty.. every world I go to is clean empty.. so good money =)
Script is like this so far: Its a Grenwall/Pawya Hunter.. I can't figure out how to do the boxtraps or figure out if the traps are already baited.. *sigh* such a hard script.. well for me :c
Another problem is finding if I failed the leaf trap.. when u fall in, u have to climb out using these wall rocks.. they have No ID..
program GrenwallPro;
{.include SRL\SRL\misc\SMART.SCAR}
{.include SRL\SRL.scar}
{.include reflection2\reflection.simba}
{.include SRL\SRL\Misc\PaintSmart.SCAR}
procedure declarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name :='';
Pass :='';
Pin :='';
Nick :='';
Active := True;
end;
end;
//Fill These In..
const
FoodToEat = 385; //Shark = 385;
HPToEatAt = 500; //Eats when HP Gets Below this Number;
////////////////////////////////////////////////////////////////////////////////
// //
// All Script Code Starts here //
// //
////////////////////////////////////////////////////////////////////////////////
const
FruitBat = 12033;
FruitFall = 12423;
BoxTrap = 10008;
BoxTrapOpen = 19187;
BoxTrapClose = 28913;
BoxTrapFruit = 19192;
BoxTrapGrenwall = 28906;
BoxTrapCollapse = 10008;
Pawya = 12535;
Papaya = 5972;
GSpikes = 12539;
AntiPoison1 = 179;
AntiPoison2 = 177;
AntiPoison3 = 175;
AntiPoison4 = 2446;
Summoning1 = 12146;
Summoning2 = 12144;
Summoning3 = 12142;
Summoning4 = 12140;
procedure debug(s:string);
begin
writeln('['+TheTime+'] ' + s);
end;
procedure terminate(reason:string);
begin
debug('~ ERROR ~ ' + reason + '. Terminating!');
//PlaySound(IncludePath+'Reflection/Custom/Sounds/MorseCode.wav'); //Plays a sound to let us know the script terminated.
TerminateScript;
end;
Procedure LoginCheck;
begin
if not(R_LoggedIn) then LoginPlayer;
if (R_LobbyScreen) then
begin
LeaveLobby;
wait(5000);
LoginPlayer;
R_FindRandoms;
SetAngle(true);
R_MakeCompass('n');
end;
R_FindRandoms;
end;
Procedure PinCheck;
begin
wait(500);
if not R_OpenBankBooth then
repeat
LoginCheck;
R_OpenBankBooth;
until(R_BankScreen or R_Pinscreen);
R_InPin(Players[CurrentPlayer].Pin);
end;
Procedure HPCheck;
var
HPLevel: Integer;
begin
HPLevel:= R_GetMMLevels('hp');
Repeat
if(HPLevel < HPToEatAt) then
begin
if(R_BankScreen) then
begin
R_WithdrawItem(FoodToEat, false);
end;
wait(500);
R_ClickItemBy(FoodToEat, 'Eat');
debug('Eating Food Because Our HP is Low');
end;
Until(R_GetMMLevels('hp') = R_GetSkillLevel(3));
end;
function R_SortObjects(Objects: TRSOBJECTARRAY): TRSOBJECTARRAY;
var
i,i2, L: integer;
tpa: TPointArray;
begin
L := Length(Objects);
if L < 1 then Exit;
SetLength(TPA, L);
SetLength(Result, L);
for i := 0 to L-1 do
TPA[i] := Objects[i].Tile;
SortTPAFrom(TPA, R_GetMyPos);
for i := 0 to L-1 do
for i2 := 0 to L-1 do
if (TPA[i].x=Objects[i2].Tile.x) and (TPA[i].y=Objects[i2].Tile.y) then
Result[i] := Objects[i2];
end;
Procedure SummoningCheck; //MUST EDIT!! VALUES ARE WRONG!
var
SummoningPoints, SummoningMM: integer;
Obelisk, Sorted: TRSObjectArray;
ObjTile: TTile;
begin
SummoningMM:= 747;
SummoningPoints:= StrToInt(R_GetInterfaceText(SummoningMM, 5));
if(SummoningPoints < R_GetSkillLevel(15)) then
Repeat
Repeat
R_FindObjectsEx([29954, 29992], OBJ_INTERACTABLE, 10, Obelisk);
if(Not (Obelisk[0] = NULL_RSOBJECT)) then
break;
Until(Not (Obelisk[0] = NULL_RSOBJECT));
Sorted:= R_SortObjects(Obelisk);
ObjTile:= Sorted[0].Tile;
SmartClickMouse(R_TileToMS(ObjTile, 0).X, R_TileToMS(ObjTile, 0).Y, true);
if(SummoningPoints = R_GetSkillLevel(15)) then
break;
Until(SummoningPoints = R_GetSkillLevel(15));
debug('Summoning Points are Full');
end;
Procedure CheckBank;
var
BankItem: TBankItem;
begin
R_DepositAllBut([BoxTrap, Pawya, Papaya, FruitBat, FruitFall]);
//Withdraw Fruitbat Pouches..
if(R_ItemExistsInBank(FruitBat, BankItem) = false) then
begin
debug('Depositing All Items');
R_DepositAll(true);
terminate('No Fruitbat Pouches in Bank');
end else
if(R_CountItem(FruitBat) < 3) then
Repeat
debug('Withdrawing FruitBat Pouches');
if(R_CountItem(FruitBat) >= 3) then
break;
R_WithdrawItem(FruitBat, false);
wait(500);
Until(R_CountItem(FruitBat) >= 3);
//Withdraw Fruitbat Scrolls..
if(R_ItemExistsInBank(FruitFall, BankItem) = false) then
begin
debug('Depositing All Items');
R_DepositAll(true);
terminate('No Fruitfall Scrolls in Bank');
end else
if(R_CountItem(FruitFall) < 300) then
Repeat
if(R_CountItem(FruitFall) >= 300) then
break;
R_WithdrawX(FruitFall, (300 - R_CountItem(FruitFall)));
wait(500);
Until(R_CountItem(FruitFall) >= 300);
//Withdraw Summoning Potion..
if((R_ItemExistsInBank(Summoning4, BankItem) = false) and (R_ItemExistsInBank(Summoning3, BankItem) = false)) then
begin
debug('Depositing All Items');
R_DepositAll(true);
terminate('No Summoning Potion (3) and No Summoning Potion (4) found in Bank.');
end;
if(R_ItemExistsInBank(Summoning4, BankItem) = false) then
begin
debug('No Summoning Potion (4) found in Bank.');
debug('Using Summoning Potion (3) instead of (4).');
end else
Repeat
if(R_CountItem(Summoning4) >= 1) then
break;
R_WithdrawItem(Summoning4, false);
wait(500);
Until(R_CountItem(Summoning4) >= 1);
if((R_ItemExistsInBank(Summoning4, BankItem) = false) and (R_CountItem(Summoning4) < 1)) then
begin
if(R_ItemExistsInBank(Summoning3, BankItem) = true) then
Repeat
if(R_CountItem(Summoning3) >= 2) then
break;
R_WithdrawItem(Summoning3, false);
wait(500);
Until(R_CountItem(Summoning3) >= 2);
end;
if((R_CountItem(Summoning3) < 1) and (R_CountItem(Summoning4) < 1)) then
begin
debug('Depositing All Items');
R_DepositAll(true);
terminate('No Summoning Potion (3) and No Summoning Potion (4) in Inventory');
end;
//Withdraw Box-Traps..
if(R_CountItem(BoxTrap) <= 6) then
if(R_ItemExistsInBank(BoxTrap, BankItem) = false) then
begin
debug('Warning No BoxTraps In Bank!');
end else
Repeat
if(R_CountItem(BoxTrap) >= 6) then
break;
R_WithdrawX(BoxTrap, (6 - R_CountItem(BoxTrap)));
wait(500);
Until((R_CountItem(BoxTrap) >= 6));
if(R_CountItem(BoxTrap) < 4) then
begin
debug('Depositing All Items');
R_DepositAll(true);
terminate('Too Little Box Traps in Inventory!');
end;
//Withdraw Anti-Poisons..
if(R_CountItem(AntiPoison4) < 1) and (R_CountItem(AntiPoison3) < 1) and (R_CountItem(AntiPoison2) < 1) and (R_CountItem(AntiPoison1) < 1) then
begin
debug('No Anti-Poison Potions found in Invent');
end else
begin
if(R_ItemExistsInBank(AntiPoison4, BankItem) = false) then
begin
debug('No Anti-Poison (4) found in Bank');
if(R_ItemExistsInBank(AntiPoison3, BankItem) = false) then
begin
debug('No AntiPoison (3) found in Bank');
if(R_ItemExistsInBank(AntiPoison3, BankItem) = false) then
begin
debug('No AntiPoison (2) found in Bank');
if(R_ItemExistsInBank(AntiPoison2, BankItem) = false) then
begin
terminate('No Anti-Poisons Found in Bank!');
end else
begin
debug('Using Anti-Poison (1)''s! Hope you have high Agility!');
Repeat
if(R_CountItem(AntiPoison4) >= 1) then
break;
R_WithdrawItem(AntiPoison4, false);
wait(500);
Until(R_CountItem(AntiPoison4) >= 1);
end;
end else
Repeat
if(R_CountItem(AntiPoison2) >= 1) then
break;
R_WithdrawItem(AntiPoison2, false);
wait(500);
Until(R_CountItem(AntiPoison2) >= 1);
end else
Repeat
if(R_CountItem(AntiPoison3) >= 1) then
break;
R_WithdrawItem(AntiPoison3, false);
wait(500);
Until(R_CountItem(AntiPoison3) >= 1);
end else
Repeat
if(R_CountItem(AntiPoison4) >= 1) then
break;
R_WithdrawItem(AntiPoison4, false);
wait(500);
Until(R_CountItem(AntiPoison4) >= 1);
end;
//Withdraw Coins..
if(R_ItemExistsInBank(995, BankItem) = false) then
begin
terminate('Not Enough Coins to Take the Charter Boat.');
end else
Repeat
if(R_CountItem(995) >= 1600) then
break;
R_WithdrawX(995, (1600 - R_CountItem(995)));
wait(500);
Until(R_CountItem(995) >= 1600);
end;
Procedure CharterBoat; //EDIT!!
var
ShipDeck, SummoningPath: TPointArray;
OnDeck: TBox;
GangPlank: TRSObject;
ShipCaptains, Sorted: TNPCArray;
Child: TInterfaceChild;
begin
ShipDeck:= [Point(2809, 3438), Point(2808, 3434), Point(2804, 3430), Point(2804, 3426), Point(2803, 3422),
Point(2804, 3418), Point(2801, 3414), Point(2798, 3414)];
R_WalkPath(ShipDeck);
OnDeck.X1:= 2795; OnDeck.X2:= 2803; OnDeck.Y1:= 3416; OnDeck.Y2:= 3412;
if(R_SelfInBox(OnDeck)) then
R_FindNPCsMulti([4653, 4656], false, ShipCaptains);
Sorted:= R_SortNPCs(ShipCaptains);
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, Sorted[0].Height/2).x, R_TileToMS(Sorted[0].Tile, Sorted[0].Height/2).y);
wait(100);
SmartClickMouse(R_TileToMS(Sorted[0].Tile, Sorted[0].Height/2).x, R_TileToMS(Sorted[0].Tile, Sorted[0].Height/2).y, false);
wait(200);
R_ChooseOption('Charter');
wait(200);
if(R_ValidInterface(95)) then
break;
Until(R_ValidInterface(95));
//Choose Port Tyras..
while(R_ValidInterface(95)) do
begin
Child:= R_GetInterfaceChild(95, 12);
R_ClickInterface(Child, 1);
R_WaitInterfaceClose(95, 500);
end;
//Choose Click Continue..
while(R_ValidInterface(211)) do
begin
Child:= R_GetInterfaceChild(211, 3);
R_ClickInterface(Child, 1);
R_WaitInterfaceClose(211, 500);
end;
//Choose Okay..
while(R_ValidInterface(230)) do
begin
Child:= R_GetInterfaceChild(230, 2);
R_ClickInterface(Child, 1);
R_WaitInterfaceClose(230, 500);
end;
//Click Ladder to get off ship..
Repeat
R_FindObject(17409, OBJ_INTERACTABLE, 10, GangPlank);
if(Not (GangPlank = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (GangPlank = NULL_RSOBJECT));
if(Not (GangPlank = NULL_RSOBJECT)) then
Repeat
SmartMoveMouse(R_TileToMS(GangPlank.Tile, 0).x, R_TileToMS(GangPlank.Tile, 0).y);
if(R_isUpText('Cross')) then
SmartClickMouse(R_TileToMS(GangPlank.Tile, 0).x, R_TileToMS(GangPlank.Tile, 0).y, true);
Until(R_GetMyPos = Point(2142, 3122));
OnDeck.X1:= 2140; OnDeck.X2:= 2145; OnDeck.Y1:= 3123; OnDeck.Y2:= 3120;
if(R_SelfInBox(OnDeck)) then
debug('We have arrived at destination: Lleyta.');
SummoningPath:= [Point(2147, 3122), Point(2153, 3122), Point(2159, 3124), Point(2166, 3124), Point(2173, 3125),
Point(2180, 3128), Point(2184, 3131), Point(2184, 3135), Point(2179, 3136), Point(2177, 3136)];
R_WalkPath(SummoningPath);
OnDeck.X1:= 2175; OnDeck.X2:= 2180; OnDeck.Y1:= 3138; OnDeck.Y2:= 3134;
if(R_SelfInBox(OnDeck)) then
SummoningCheck;
end;
Procedure DodgeObstacles;
var
ObstaclePath: TPointArray;
Obstacles, Sorted: TRSObjectArray;
Child: TInterfaceChild;
Items: TInvItemArray;
InArea: TBox;
begin
ObstaclePath:= [Point(2182, 3141), Point(2185, 3147), Point(2188, 3153), Point(2188, 3160), Point(2188, 3162)];
R_WalkPath(ObstaclePath);
//Dense Forest Part 1..
Repeat
R_FindObjectsEx([3999], OBJ_INTERACTABLE, 10, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if((R_GetMyPos = Point(2188, 3165)) or (R_GetMyPos = Point(2189, 3165))) then
break;
Until((R_GetMyPos = Point(2188, 3165)) or (R_GetMyPos = Point(2189, 3165)));
//Dense Forest Part2..
Repeat
R_FindObjectsEx([3939], OBJ_INTERACTABLE, 10, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if((R_GetMyPos = Point(2187, 3168)) or (R_GetMyPos = Point(2188, 3168)) or (R_GetMyPos = Point(2189, 3168))) then
break;
Until((R_GetMyPos = Point(2187, 3168)) or (R_GetMyPos = Point(2188, 3168)) or (R_GetMyPos = Point(2189, 3168)));
//Dense Forest Part3..
Repeat
R_FindObjectsEx([3998], OBJ_INTERACTABLE, 10, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
InArea.X1:= 2186; InArea.X2:= 2190; InArea.Y1:= 3172; InArea.Y2:= 3172;
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if(R_SelfInBox(InArea)) then
break;
Until(R_SelfInBox(InArea));
ObstaclePath:= [Point(2190, 3178), Point(2199, 3177), Point(2206, 3178), Point(2213, 3175), Point(2216, 3170), Point(2271, 3169)];
R_WalkPath(ObstaclePath);
//Dense Forest Part 4..
Repeat
R_FindObjectsEx([3939], OBJ_INTERACTABLE, 10, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if((R_GetMyPos = Point(2216, 3166)) or (R_GetMyPos = Point(2217, 3166)) or (R_GetMyPos = Point(2218, 3166))) then
break;
Until((R_GetMyPos = Point(2216, 3166)) or (R_GetMyPos = Point(2217, 3166)) or (R_GetMyPos = Point(2218, 3166)));
//Dense Forest Part5..
Repeat
R_FindObjectsEx([3938], OBJ_INTERACTABLE, 5, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if((R_GetMyPos = Point(2216, 3163)) or (R_GetMyPos = Point(2217, 3163)) or (R_GetMyPos = Point(2218, 3163))) then
break;
Until((R_GetMyPos = Point(2216, 3163)) or (R_GetMyPos = Point(2217, 3163)) or (R_GetMyPos = Point(2218, 3163)));
//Dense Forest Part6..
Repeat
R_FindObjectsEx([3939], OBJ_INTERACTABLE, 5, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
InArea.X1:= 2215; InArea.X2:= 2217; InArea.Y1:= 3160; InArea.Y2:= 3158;
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if(R_SelfInBox(InArea)) then
break;
Until(R_SelfInBox(InArea));
R_WalkToTile(Point(2219, 3156), 0, 0);
if(R_TileOnMS(Point(2220, 3155), 0)) then
SmartClickMouse(R_TileToMS(Point(2220, 3155), 0).x, R_TileToMS(Point(2220, 3155), 0).y, true);
if(R_GetMyPos = Point(2220, 3155)) then
debug('Tackling the Tripwrite Obstacle. :c');
R_WalkToTile(Point(2220, 3148), 2, 1);
//Drink Anti-Poison..
Child:= R_GetInterfaceChild(748, 4);
if(R_ItemExistsEx([AntiPoison1, AntiPoison2, AntiPoison3, AntiPoison4], Items)) then
begin
if(Child.TextureID = 1801) then
Repeat
R_ClickItemBy(Items[0].ID, '');
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
if(Child.TextureID = 1208) then
break;
Until(Child.TextureID = 1208);
end;
ObstaclePath:= [Point(2220, 3150), Point(2226, 3146), Point(2231, 3149)];
R_WalkPath(ObstaclePath);
//Dense Forest Part 7..
Repeat
R_FindObjectsEx([3937], OBJ_INTERACTABLE, 10, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if((R_GetMyPos = Point(2234, 3150)) or (R_GetMyPos = Point(2234, 3149)) or (R_GetMyPos = Point(2234, 3148))) then
break;
Until((R_GetMyPos = Point(2234, 3150)) or (R_GetMyPos = Point(2234, 3149)) or (R_GetMyPos = Point(2234, 3148)));
//Dense Forest Part8..
Repeat
R_FindObjectsEx([3938], OBJ_INTERACTABLE, 10, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if((R_GetMyPos = Point(2237, 3150)) or (R_GetMyPos = Point(2237, 3149)) or (R_GetMyPos = Point(2237, 3148))) then
break;
Until((R_GetMyPos = Point(2237, 3150)) or (R_GetMyPos = Point(2237, 3149)) or (R_GetMyPos = Point(2237, 3148)));
//Dense Forest Part9..
Repeat
R_FindObjectsEx([3939], OBJ_INTERACTABLE, 10, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not(Sorted[0] = NULL_RSOBJECT)) then
break;
wait(500);
Until(Not (Sorted[0] = NULL_RSOBJECT));
InArea.X1:= 2240; InArea.X2:= 2240; InArea.Y1:= 3151; InArea.Y2:= 3147;
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y);
if(R_isUpText('Enter')) then
begin
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).X, R_TileToMS(Sorted[0].Tile, 0).Y, true);
R_WaitToAnimate(1000);
R_WaitToStopAnimating(1000);
end;
if(R_SelfInBox(InArea)) then
break;
Until(R_SelfInBox(InArea));
ObstaclePath:= [Point(2243, 3154), Point(2242, 3159), Point(2240, 3165), Point(2236, 3171), Point(2232, 3176),
Point(2227, 3181), Point(2220, 3186), Point(2214, 3191), Point(2211, 3197)];
R_WalkPath(ObstaclePath);
if(R_TileOnMS(Point(2209, 3200), 0)) then
begin
SmartMoveMouse(R_TileToMS(Point(2209, 3200), 0).x, R_TileToMS(Point(2209, 3200), 0).y);
SmartClickMouse(R_TileToMS(Point(2209, 3200), 0).x, R_TileToMS(Point(2209, 3200), 0).y, true);
R_WaitToMove(1000);
end;
if(R_GetMyPos = Point(2209, 3200)) then
debug('Tackling Obstacle: Leaves.');
if(R_GetMyPos = Point(2209, 3200)) then
Repeat
R_FindObjectsEx([3925], OBJ_INTERACTABLE, 10, Obstacles);
Sorted:= R_SortObjects(Obstacles);
if(Not (Sorted[0] = NULL_RSOBJECT)) then
break;
Until(Not (Sorted[0] = NULL_RSOBJECT));
InArea.X1:= 2207; InArea.X2:= 2221; InArea.Y1:= 3205; InArea.Y2:= 3208;
if(Not (Sorted[0] = NULL_RSOBJECT)) then
Repeat
SmartMoveMouse(R_TileToMS(Sorted[0].Tile, 0).x, R_TileToMS(Sorted[0].Tile, 0).y);
if(R_isUpText('Jump')) then
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).x, R_TileToMS(Sorted[0].Tile, 0).y, true);
//Need a way to detect if I'm in the Leaf Pits or not..
Until(R_SelfInBox(InArea));
HPCheck;
ObstaclePath:= [Point(2208, 3210), Point(2205, 3216), Point(2200, 3222), Point(2199, 3226)];
R_WalkPath(ObstaclePath);
end;
Procedure TrapPawyas;
var
Trap1, Trap2, Trap3, Trap4, Trap5: TPoint;
Child: TInterfaceChild;
Item: TInvItem;
CastOption: string;
begin
Trap1:= Point(2198, 3228);
Trap2:= Point(2200, 3228);
Trap3:= Point(2200, 3225);
Trap4:= Point(2197, 3225);
Trap5:= Point(2199, 3226);
Child:= R_GetInterfaceChild(747, 3);
Repeat
R_ClickItemBy(FruitBat, 'Summon');
if(Child.TextureID = 1802) then
begin
debug('FruitBat Summoned.');
break;
end;
Until(Child.TextureID = 1802);
SmartMoveMouse(Child.X, Child.Y);
if(Not R_isUptext('Cast')) then
begin
Repeat
R_ClickInterface(Child, 2);
R_ChooseOption('Select');
Until(R_ValidInterface(880));
while(R_ValidInterface(880)) do
begin
if(R_ValidInterface(880) = false) then
break;
Child:= R_GetInterfaceChild(747, 9);
R_ClickInterface(Child, 1);
wait(500);
Child:= R_GetInterfaceChild(747, 6);
R_ClickInterface(Child, 1);
end;
end;
SmartMoveMouse(Child.X, Child.Y);
if(R_isUptext('Cast')) then
begin
CastOption:= 'Cast';
end else
CastOption:= 'Fail';
//Lay Traps..
If(R_TileOnMS(Trap1, 0)) then
begin
SmartMoveMouse(R_TileToMS(Trap1, 0).x, R_TileToMS(Trap1, 0).y);
if(R_isUpText('Walk')) then
begin
SmartClickMouse(R_TileToMS(Trap1, 0).x, R_TileToMS(Trap1, 0).y, false);
R_ChooseOption('Walk');
if(R_GetMyPos = Trap1) then
R_ClickItemBy(BoxTrap, 'Lay');
R_WaitToStopAnimating(3000);
if(R_ItemExists(Papaya, Item)) then
//R_ClickItemBy(Papaya, 'Use'); //Use with Box trap..
end else
debug('Shit some noob is in our spot. Spot1');
end;
If(R_TileOnMS(Trap2, 0)) then
begin
SmartMoveMouse(R_TileToMS(Trap2, 0).x, R_TileToMS(Trap2, 0).y);
if(R_isUpText('Walk')) then
begin
SmartClickMouse(R_TileToMS(Trap2, 0).x, R_TileToMS(Trap2, 0).y, false);
R_ChooseOption('Walk');
if(R_GetMyPos = Trap2) then
R_ClickItemBy(BoxTrap, 'Lay');
R_WaitToStopAnimating(3000);
end else
debug('Shit some noob is in our spot. Spot2');
end;
If(R_TileOnMS(Trap3, 0)) then
begin
SmartMoveMouse(R_TileToMS(Trap3, 0).x, R_TileToMS(Trap3, 0).y);
if(R_isUpText('Walk')) then
begin
SmartClickMouse(R_TileToMS(Trap3, 0).x, R_TileToMS(Trap3, 0).y, false);
R_ChooseOption('Walk');
if(R_GetMyPos = Trap3) then
R_ClickItemBy(BoxTrap, 'Lay');
R_WaitToStopAnimating(3000);
end else
debug('Shit some noob is in our spot. Spot3');
end;
If(R_TileOnMS(Trap4, 0)) then
begin
SmartMoveMouse(R_TileToMS(Trap4, 0).x, R_TileToMS(Trap4, 0).y);
if(R_isUpText('Walk')) then
begin
SmartClickMouse(R_TileToMS(Trap4, 0).x, R_TileToMS(Trap4, 0).y, false);
R_ChooseOption('Walk');
if(R_GetMyPos = Trap4) then
R_ClickItemBy(BoxTrap, 'Lay');
R_WaitToStopAnimating(3000);
end else
debug('Shit some noob is in our spot. Spot4');
end;
If(R_TileOnMS(Trap5, 0)) then
begin
SmartMoveMouse(R_TileToMS(Trap5, 0).x, R_TileToMS(Trap5, 0).y);
if(R_isUpText('Walk')) then
begin
SmartClickMouse(R_TileToMS(Trap5, 0).x, R_TileToMS(Trap5, 0).y, false);
R_ChooseOption('Walk');
if(R_GetMyPos = Trap5) then
R_ClickItemBy(BoxTrap, 'Lay');
R_WaitToStopAnimating(3000);
end else
debug('Shit some noob is in our spot. Spot5');
end;
end;
Procedure CheckFloor;
var
TrapsF, Sorted: TRSObjectArray;
GroundItems: TGroundItemArray;
begin
R_FindObjectsEx([BoxTrap, BoxTrapClose, BoxTrapFruit, BoxTrapGrenwall, BoxTrapCollapse], 1, 10, TrapsF);
Sorted:= R_SortObjects(TrapsF);
SmartClickMouse(R_TileToMS(Sorted[0].Tile, 0).x, R_TileToMS(Sorted[0].Tile, 0).y, false);
R_ChooseOptionMulti(['Dismantle', 'Lay', 'Check'])
R_FindGroundItemsEx([Pawya, Papaya, 211], 10, GroundItems);
SmartClickMouse(R_TileToMS(GroundItems[0].Tile, 0).x, R_TileToMS(GroundItems[0].Tile, 0).y, false);
R_ChooseOption('Take');
end;
Procedure TeleportCamelot;
begin
PathToBank:= [Point(2757, 3476), Point(2758, 3473), Point(2762, 3470), Point(2764, 3467), Point(2765, 3464), Point(2770, 2460),
Point(2772, 3456), Point(2775, 2452), Point(2778, 3448), Point(2783, 3444), Point(2789, 3440), Point(2791, 3436),
Point(2797, 3432), Point(2804, 3433), Point(2809, 3438), Point(2809, 3441)]
end;
begin
end.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.