bismuth
New member
Hi!
I have a drinking script that basically does the following:
cli_execute("send 1 meat to Testudinata");
int max_iterations = 10;
int cur_iteration = 0;
while((cur_iteration < max_iterations) &&
(!ode_obtained))
{
cur_iteration = cur_iteration + 1;
cli_execute("wait 30");
cli_execute("effects refresh");
ode_obtained = (have_effect($effect[ode to booze]) > 0);
}
if (ode_obtained)
{
//some code that selects a stat optimal DB drink from the available drinks
//and drinks that untill hammered
}
else
{
print("No ode, no drinks for you boyo");
}
When I look at Kolmafia executing this script I see that:
1. The active effects page at some point (usually after the first "effects refresh") shows I have ode to booze.
2. Kolmafia doesn't see that, keeps looping and ends without drinking anything.
Where does this go wrong?
My first thought is that have_effect() doesn't work as I expected, but it could also have something to do with the synchronization of data after the cli_execute("effects refresh"); line.
anyone know what I am doing wrong? or should I file a bug report on this?
I have a drinking script that basically does the following:
cli_execute("send 1 meat to Testudinata");
int max_iterations = 10;
int cur_iteration = 0;
while((cur_iteration < max_iterations) &&
(!ode_obtained))
{
cur_iteration = cur_iteration + 1;
cli_execute("wait 30");
cli_execute("effects refresh");
ode_obtained = (have_effect($effect[ode to booze]) > 0);
}
if (ode_obtained)
{
//some code that selects a stat optimal DB drink from the available drinks
//and drinks that untill hammered
}
else
{
print("No ode, no drinks for you boyo");
}
When I look at Kolmafia executing this script I see that:
1. The active effects page at some point (usually after the first "effects refresh") shows I have ode to booze.
2. Kolmafia doesn't see that, keeps looping and ends without drinking anything.
Where does this go wrong?
My first thought is that have_effect() doesn't work as I expected, but it could also have something to do with the synchronization of data after the cli_execute("effects refresh"); line.
anyone know what I am doing wrong? or should I file a bug report on this?