Hello everyone. I'm having trouble trying to figure out how to reset the value of a local variable (in this case, an integer). The context is as such: The portion of the script I'm trying to fix is making unfinished potions. In dungeoneering, the wait time between each potion is ~3 seconds. The wait time can be reduced if you re-mix the vial of water with the herb. This has the possibilty to boost xp/hr drastically (waiting 1 second/potion vs 3 seconds/potion). I've looked through some pascal tutorials and found a few functions to reset/release memory, but the variable type stored is an integer (where the "freeMem();" call only free's a pointer variable).
Here's the code I have so far:
Simba Code:
procedure mixUnfinishedPotions();
var
x, y, x2, y2: integer;
begin
while isWaterVialVisible do //The isWaterVialVisible is a function that returns "True" if a vial of water is in the tabBackPack
//freemem(x2); //Here I am trying to free the coordinates (x2, y2) because we want to store new coordinates for another vial of water, as the initial one is no longer present.
//freemem(y2); //Initially, freeing a nonstored variable should do nothing, but after the script processes through the while loop at least once, I want to release the (x2, y2) coordinate to store a new one.
begin
findDTM(cleanDTM, x, y, tabBackPack.getBounds()); //Here we are finding the clean herb DTM and storing the coordinates as (x, y)
mouse(x, y, 3, 3, MOUSE_MOVE); //Here we move the mouse to (x, y)
if isMouseOverText(['lean']) then //If the uptext correctly identifies that the mouse is over the clean herb, we click it
begin
fastClick(MOUSE_LEFT);
findDTM(waterVialDTM, x2, y2, tabBackPack.getBounds()); //Here we are finding the vial of water DTM and storing the coordinates as (x2, y2)
mouse(x2, y2, 3, 3, MOUSE_MOVE); //Move the mouse to (x2, y2)
if isMouseOverText(['ial', 'ater']) then //If the uptext shows that we can mix the two, click.
begin
fastClick(MOUSE_LEFT);
wait(GaussRangeInt(850, 1000));
pressKey(32);
wait(GaussRangeInt(800, 1000));
end;
end;
end;
end;
@The Mayor; @KeepBotting; Any advice you two can give me?