lanadekat
2014-08-01 16:03:15
Hi, I'm new here and I just created my own script, But it doesn't work, and it gives an error: "Exception in Script: Invalid type cast" It's probably a really dumb thing but I can't find it. Everything below is just basic copy and pasting from The Mayor's tutorials! (yes I understand what I copy, I'm NOT just copying everything without understanding what it does )The script should be a basic vial filler in the GE. I also have another question: can I just login myself ? Or do it need to automate it?
The things I probably messed up:
Functions
The walking to the bank and to the fontain
The things I probably messed up:
Functions
The walking to the bank and to the fontain
program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
function minimap.waitPlayerMoving(waitFlagGone: boolean): boolean;
function sps.setup(map name: GEmap, SPS/img/runescape_other): Boolean;
function Backpack.simba;
function Text.simba;
function Mouse.simba;
function Mainscreen.simba;
procedure Clickbank();
begin
if bankscreen.open(BANK_NPC_GREY)
writln('bank opened!');
wait(randomRange(1000, 2000));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomRange(1000, 2000));
bankScreen.withdraw(1, WITHDRAW_AMOUNT_ALL, ['ial']);
wait(randomRange(1000, 2000));
bankScreen.close();
if tabBackPack.isFull(); then
end;
procedure walktofontain();
minimap.setAngle(MM_DIRECTION_NORTH);
var Pathtofontain: TpointArray;
begin
pathtofontain := [Point(145, 65), Point(100, 19)]
if SPS.walkpath(paththofontain) then
minimap.waitPlayerMoving()
else writLn('not walking to fontain')
end;
procedure fillvials();
var
x, y: integer;
begin
tabBackPack.mouseSlot(1, MOUSE_RIGHT); //clicks vial in backpack
if mainscreen.findObject(x, y, -12756371, -6, ['ontain'], MOUSE_RIGHT) then //clicks fontain
begin
writeLn('Fountain clicked!')
chooseOption.select(['se Vial->Fontain']);
mainscreen.findObject(x, y, -7820808, -13, ['Fill'], MOUSE_RIGHT) //clicks fill
wait(randomRange(17000, 19000));
end;
procedure walktobanker();
var Pathtobanker: TpointArray;
begin
pathtobanker := [Point(100, 19), Point(145, 65)]
if SPS.walkpath(paththobanker) then
minimap.waitPlayerMoving()
Clickbank()
else writLn('not walking to banker')
end;