Sloppy Seconds Diner Counter?

GODdamnNOOB

New member
Seeing as monsters in this zone only drop items 20 times a day, I tried checking in the pref files if they have a count.
Unfortunately, there might not be one or I'm looking for the wrong terms. (I tried diner, sloppy, spring)

Is there a pref for this or do I have find a way to track it myself? And if I have to track it myself, what would be an efficient way to write this in mafia?

I was thinking maybe saving each drop to a text file in Data, but then there is the problem of maybe at rollover I forget to clear the counter and mess up the count.

Any advice is appreciated =)
 

lostcalpolydude

Developer
Staff member
Mafia does not track this. I don't have any advice on tracking it, but counting only the drops that count toward the limit is probably not trivial.
 

Darzil

Developer
This also applies to the Government Lab. You need to count drops that drop in the zone, from non-copied monsters, that are on their normal drop list only. So yes, not entirely trivial.
 

GODdamnNOOB

New member
Currently what I'm trying to do is using the extract_items function to count the drops and stop once I reach a total of 20 for the various loots.

Unfortunately I'm not really sure how the "extract_items" function runs, and for some reason, my pre-adv and post-adv script doesn't work when I use it too.

void main(int adv)
{
int[item] items;
int[string] total_loot;

int n = my_adventures() - adv;

while (my_adventures() != n)
{

buffer fight = visit_url(to_url($location[The Deep Dark Jungle]));
repeat {
if (contains_text(fight, "choice.php")) {
cli_execute("choice-goal");
fight = visit_url(to_url($location[The Deep Dark Jungle]));
}
} until (!contains_text(fight, "choice.php"));


fight = run_combat();
if (have_effect($effect[beaten up]) == 0) {
items = extract_items(fight);
foreach it in items
{
total_loot[it.to_string()] += items[it];
print("Looted "+((items[it]!=1)?items[it].to_string()+" ":"")+it+".","green");
}

}
else print("You lost the fight :(", "red");
}

string loot_list;

foreach lt in total_loot
{
loot_list += "<br><span style='color:purple;'>" + lt + "</span> -- " + total_loot[lt];
}

The code I've written above manages to count the amount of loot, but then I'm running into the problem where my moods and between-adventure scripts aren't working and I have no idea why.
 
Top