bas
2014-05-27 19:12:17
Hello!
I'm working on a script, everything is running fine espect the main part of the script!
It needs to cast Telekinetic Grab on a item on the ground.
Can anyone give me a working example code
Any help would be great! Its the last part i need :(
Many thanks.,
ATM have this but its hovering over the item (also other things that have same colour) but wont click it!:
[BANANA]procedure UseGrabSpell;
begin
GameTab(tab_Magic);
makecompass('n');
setangle(0);
Wait(RandomRange(75, 150));
if FindColorsTolerance(TPA,TELE_GRAB,673,267,708,297,39) then
begin
writeln('found Telegrab spell, we have Law runes!');
mmouse(690,284,5,5);
wait(randomrange(200,350));
clickmouse2(true);
end;
end;
procedure ClickKnife;
var
time: Integer;
begin
if not LoggedIn then Exit;
repeat
Wait(RandomRange(500,700));
if (FindObj(x, y, 'nife', KNIFE, 7)) then
mmouse(x,y,0,0);
wait(randomrange(600,800));
until IsUpTextMultiCustom(['Knife', 'nife']);
Writeln('# Found Knife! #');
clickmouse2(true);
Writeln('# Clicked! #');
end; [/BANANA]
I'm sorry, Simba tags are screwing up for me.
I'm working on a script, everything is running fine espect the main part of the script!
It needs to cast Telekinetic Grab on a item on the ground.
Can anyone give me a working example code
Any help would be great! Its the last part i need :(
Many thanks.,
ATM have this but its hovering over the item (also other things that have same colour) but wont click it!:
[BANANA]procedure UseGrabSpell;
begin
GameTab(tab_Magic);
makecompass('n');
setangle(0);
Wait(RandomRange(75, 150));
if FindColorsTolerance(TPA,TELE_GRAB,673,267,708,297,39) then
begin
writeln('found Telegrab spell, we have Law runes!');
mmouse(690,284,5,5);
wait(randomrange(200,350));
clickmouse2(true);
end;
end;
procedure ClickKnife;
var
time: Integer;
begin
if not LoggedIn then Exit;
repeat
Wait(RandomRange(500,700));
if (FindObj(x, y, 'nife', KNIFE, 7)) then
mmouse(x,y,0,0);
wait(randomrange(600,800));
until IsUpTextMultiCustom(['Knife', 'nife']);
Writeln('# Found Knife! #');
clickmouse2(true);
Writeln('# Clicked! #');
end; [/BANANA]
I'm sorry, Simba tags are screwing up for me.