Bale
Minion
While waiting for mafia to support folding the Loathing Legion knife, I decided to knock out a script to handle it. Sadly my script does not work and I'm hoping someone can tell me why. This will probably become meaningless in a few days when the fold command works on the knife, but I'm still curious what my problem is:
PHP:
boolean fold_knife(item doodad) {
if(available_amount(doodad) < 1) {
string fold_to = doodad.to_string().replace_string(" ", "+");
for i from 4908 to 4928
if(i.to_item().available_amount() > 0) {
visit_url("inv_use.php?pwd="+my_hash()+"&which=4&whichitem="+i);
visit_url("inv_use.php?whichitem="+i+"&pwd="+my_hash()+"&switch=1&eq=0&fold="+fold_to);
return true;
}
return false;
}
return true;
}
Last edited: