on:use {
$tmp = getplayerweapon();
// Set Goal
local $goal, $cur, $targ;
$goal = 4; $cur = 0;
// Gather
if ( $branches == 0 ) {
msg "Tree is stripped of branches.", 800;
} elseif ( $tmp == 87 ) {
loop( "count", $goal ) {
local $id;
$id = create( "item", 24 );
store $id, "unit", 1;
$branches--; $cur++;
process "Removing branch", 600;
}
} else {
msg "Need an axe.", 800;
}
freevar $tmp, $id;
}
}
The problem is that the loops repeats before the process ends. So clearly I can see the process is run separately, but I couldn't find anything like a wait function that would the loop to allow the process to end. I realize my whole concept might be wrong. I have also tried using a sequence. I know how to program so if you have a completely different way a quick pointer would be helpful.