Frozenfire216
09-02-2012, 10:33 PM
Ok, have a script for a different MMORPG then RS. Basically, its a script that farms monsters for loot, and sells that loot for cash.
You lose no items when you die, and you die fairly often. The spot where you respawn is close to the market, so I made a procedure that apon death would check if there are any items to sell, and then call a different procedure to sell those items if it found them, and call a procedure to walk back to monsters if not.
Procedure SellingCheck;
begin
if FindDTM(DeathDTM, DeathCheckX, DeathCheckY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) then // this checks if a a graphic signifying death is on the screen
begin
writeln('Dead!');
bodyLost:=0;
dec(count);
dec(count);
dec(count);
wait(25000);
Writeln('Checking for items to sell...');
if FindDTM(BagDTM, BagX, BagY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) then //opens inventory
begin
Mouse(BagX,BagY, 3, 3, True);
if FindDTM(CanDTM, MarketX, MarketY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) or FindDTM(ClawDTM, MarketX, MarketY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) or FindDTM(ScopeDTM, MarketX, MarketY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) then
begin //if finds items to sell
SellItems;
Writeln('Found items to sell!');
end else
begin
Writeln('No items found!')
Mouse(BagX,BagY, 3, 3, True);
DeathWalk; //walk back to monsters
end;
end;
end;
The problem is, simba wont compile and gives this error
[Error] D:\\Home\\Simba\Scripts\Farmer.simba(97:9): Unknown identifier 'SellItems' at line 96
Ive checked that the names are correct, and that the procedure is actually called SellItems, but other then that, I dont know whats wrong
Any help is appreciated!
You lose no items when you die, and you die fairly often. The spot where you respawn is close to the market, so I made a procedure that apon death would check if there are any items to sell, and then call a different procedure to sell those items if it found them, and call a procedure to walk back to monsters if not.
Procedure SellingCheck;
begin
if FindDTM(DeathDTM, DeathCheckX, DeathCheckY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) then // this checks if a a graphic signifying death is on the screen
begin
writeln('Dead!');
bodyLost:=0;
dec(count);
dec(count);
dec(count);
wait(25000);
Writeln('Checking for items to sell...');
if FindDTM(BagDTM, BagX, BagY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) then //opens inventory
begin
Mouse(BagX,BagY, 3, 3, True);
if FindDTM(CanDTM, MarketX, MarketY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) or FindDTM(ClawDTM, MarketX, MarketY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) or FindDTM(ScopeDTM, MarketX, MarketY, SCREEN_X1, SCREEN_Y1, SCREEN_X2, SCREEN_Y2) then
begin //if finds items to sell
SellItems;
Writeln('Found items to sell!');
end else
begin
Writeln('No items found!')
Mouse(BagX,BagY, 3, 3, True);
DeathWalk; //walk back to monsters
end;
end;
end;
The problem is, simba wont compile and gives this error
[Error] D:\\Home\\Simba\Scripts\Farmer.simba(97:9): Unknown identifier 'SellItems' at line 96
Ive checked that the names are correct, and that the procedure is actually called SellItems, but other then that, I dont know whats wrong
Any help is appreciated!