SomeGuyFromHere
2013-05-22 17:30:17
Hello Villavu,
two things are currently stopping me from developing a script. A little background: It is supposed to make it easier to sell stuff on the Grand Exchange. So if you just finished mining or farming or something similar and want to get your stackable items stored in your bank account sold you can do so automatically while drinking coffee or surfing the web :spot:
Stuff is working pretty well, but now I want the script to be able to sell various goods and not just the clay I have been experimenting with.
The obvious thing is to add a parameter to the routines actually withdrawing and selling your items, like so:
But obviously something is wrong with that since the compiler tells me this:
This ought to be a very simple error but I can't quite put my finger on it. DTMs are integers for sure…
Could somebody point me in the right direction?
Also, concerning DTMs: At which point are they actually getting "loaded"? After using them you're usually told to free them using FreeDTM, but what if I want to include a large amount of DTMs in my script and just define them in a procedure at the beginning of the script like I always do with my SRL walkpaths:
Will they take a lot of memory or are they only loaded when a procedure like FindDTM uses them?
Thanks so much for your help :)
two things are currently stopping me from developing a script. A little background: It is supposed to make it easier to sell stuff on the Grand Exchange. So if you just finished mining or farming or something similar and want to get your stackable items stored in your bank account sold you can do so automatically while drinking coffee or surfing the web :spot:
Stuff is working pretty well, but now I want the script to be able to sell various goods and not just the clay I have been experimenting with.
The obvious thing is to add a parameter to the routines actually withdrawing and selling your items, like so:
Function WithdrawClay (DTM: integer): Boolean;
var x, y, Clay: Integer;
begin
if TalkToBanker = True then
begin
MouseBox(112, 389, 408, 396, 1);
Wait(3000+(Random(7000)));
Clay:= DTMFromString('mlwAAAHicY2dgYNgKxHuBeCcQbwHiDUC8CYgPAvECIF4IxEugeBEQzwXieUDcWewLJJmwYi4G7AAkzogHQwEA+9cK4A==');
FindDTM(DTM, x, y, 31, 94, 490, 288);
//MMouse(x, y, 0, 0);
FreeDTM(DTM);
[yadayadayada]
Result:= True;
end;
end;and then calling them like so:if WithdrawClay(Clay) = True then
But obviously something is wrong with that since the compiler tells me this:
Unknown identifier 'Clay'
This ought to be a very simple error but I can't quite put my finger on it. DTMs are integers for sure…
Could somebody point me in the right direction?
Also, concerning DTMs: At which point are they actually getting "loaded"? After using them you're usually told to free them using FreeDTM, but what if I want to include a large amount of DTMs in my script and just define them in a procedure at the beginning of the script like I always do with my SRL walkpaths:
Procedure setglobals;
begin
SPS_Setup(RUNESCAPE_SURFACE,[yadayadayada]);//SPS Areas
VarrockToClerk := [yadayadayada];
end;
Will they take a lot of memory or are they only loaded when a procedure like FindDTM uses them?
Thanks so much for your help :)