Rollover Management

Pazleysox

Member
Hi,
Everytime i run this script it spends 10k meat for something, which i am not sure for what. And if i don't have 10k meat in my inventory, script stops working and gives me this error: "You don't have enough meat in inventory".
I'm pretty new to the game, so prob i am the one missing smt. But i am not sure what.

Found the issue. Just type SVN UPDATE into the GCLI to update to the new version.

1.14 - 2/27/20 Script no longer forces you to buy a raffle ticket every day.

Please send me your in-game name, I wish to send you a gift for finding this.
 

manyakimm

New member
Thank you for your fast reply and quick fix Pazleysox. I tried the script again and everything worked perfectly.
 
Last edited:

Terrabull

Member
Two things:
Is there an option if I DO want to buy a raffle ticket? (And will it use Hangk's?)
Second I think something is wrong if I've used all my pull on the Deck of Every Card, it aborts there, but I can run it again and it will work. Not sure if it happens for beach combing.
 

Pazleysox

Member
Two things:
Is there an option if I DO want to buy a raffle ticket? (And will it use Hangk's?)
Second I think something is wrong if I've used all my pull on the Deck of Every Card, it aborts there, but I can run it again and it will work. Not sure if it happens for beach combing.

The only way I can think to put the raffle ticket back in is to put a user prompt asking if you want to buy it. I'm try to avoid doing that. As it stands now, the script tells you at the end of it's run if you have a ticket or not. If not, there is a link available right there to go buy one.

I think I fixed the deck of every card issue.

I added beach combing to the script today also. It uses Veracity's script found here. It is included in the dependencies file, so when the script is updated, it will automatically download. The script is set to only use the free combing you have available. When testing, it worked for me. Please let me know if anyone has any issues.
 

Terrabull

Member
Is it possible to put a variable in the script that says "if raffle ticket = false" or something, then I can go into the code and just turn that to true?

If not, you're right, it's not a hard thing to work around.
 

Pazleysox

Member
Is it possible to put a variable in the script that says "if raffle ticket = false" or something, then I can go into the code and just turn that to true?

If not, you're right, it's not a hard thing to work around.
Open the script file. Hit CTRL-G, 274 (enter)

Line 274 should be this:
Code:
if(have_skill($skill[Ancestral Recall]) && item_amount($item[Blue Mana]) > 0 && get_property("_ancestralRecallCasts").to_int() < 10) { cli_execute("cast * Ancestral Recall"); }

If it's not 274, then locate that piece of code, which should be around there. Insert a line above it, and insert this code:
Code:
if(!can_interact() && $item[raffle ticket].available_amount() <= 0 ) { visit_url("raffle.php"); visit_url("raffle.php?action=buy&pwd&where=1&f=Buy+Tickets&quantity=1"); } //buy ticket with meat in storage
if(can_interact() && $item[raffle ticket].available_amount() <= 0 ) { visit_url("raffle.php"); visit_url("raffle.php?action=buy&pwd&where=0&f=Buy+Tickets&quantity=1"); } //buy ticket with meat onhand
That's the exact code I removed from the script. Just save it, and it should work. Just remember, that when you modify the script, you will have to add it again if there's any future updates.
 

fronobulax

Developer
Staff member
Just remember, that when you modify the script, you will have to add it again if there's any future updates.

Or you can just put the changes in the appropriate SVN directory and hope the merge is simple enough that SVN can handle it transparently.
 

Terrabull

Member
Can you show me the log of what happens? This doesn't happen for me.

I'll have to show you on Monday, it was on my work computer. I just encountered another thing, in Plumber it's trying to use the Snojo and with 0 adventures it just spams "Ran out of adventures." until I manually kill it.
I wish there was some way Mafia could tell that things are out of Standard (maybe there is and I just don't know it). Then you could just not check those if in ronin/hc. Most of the problems I hit are from depreciated items.
There are a lot of things it tells you you can fix, but in Standard you can't do any of it. Plumbers can't get overdrunk, but you tell them to. You can't pray to the Barrel God, check for Defective Tokens, use your Chateau, or use the Chess Set.
 
Last edited:

Veracity

Developer
Staff member
I wish there was some way Mafia could tell that things are out of Standard (maybe there is and I just don't know it). Then you could just not check those if in ronin/hc.
You need to use is_unrestricted(). A character in aftercore:

Code:
[color=green]> ash is_unrestricted( $item[ X-32-F snowman crate ] )[/color]

Returned: true
A Plumber:

Code:
[color=green]> ash is_unrestricted( $item[ X-32-F snowman crate ] )[/color]

Returned: false

Plumbers can't get overdrunk, but you tell them to.
Also a Plumber:

Code:
[color=green]> ash can_drink()[/color]

Returned: false

You can't pray to the Barrel God, check for Defective Tokens, use your Chateau, or use the Chess Set.
Those are all checkable via is_unrestricted(). You also need to check whether you have access to them, even in aftercore. There are ways to check all of that.

My Meat Farming script is aftercore-only, but works with almost all IOTMs. Therefore, it doesn't worry about is_unrestricted().
This script can work in-run OR in aftercore, as I understand it, so it needs both kinds of check.
 

Veracity

Developer
Staff member
You probably want to look at and use is_trendy()
Does anybody do Trendy runs any more?

We currently have:

is_trendy() - works only in a Trendy run
is_unrestricted() - works in any run which is under Standard restrictions.

Seems like there should only be the latter, with the meaning "can I use this thing right now in my current run - Trendy, Standard, neither, aftercore, ..."
 

Veracity

Developer
Staff member
One wrinkle with that is this:

Valid types for Trendy: "Items", "Campground", "Bookshelf", "Familiars", "Skills", "Clan Item".
Valid types for Standard: "Items", "Bookshelf Books", "Skills", "Familiars", "Clan Items".

I mean, sure - "Bookshelf" <=> "Bookshelf Books" and "Clan Item" <=> "Clan Items", but Standard does not have "Campground".
 

Pazleysox

Member
I'll have to show you on Monday, it was on my work computer. I just encountered another thing, in Plumber it's trying to use the Snojo and with 0 adventures it just spams "Ran out of adventures." until I manually kill it.
I wish there was some way Mafia could tell that things are out of Standard (maybe there is and I just don't know it). Then you could just not check those if in ronin/hc. Most of the problems I hit are from depreciated items.
There are a lot of things it tells you you can fix, but in Standard you can't do any of it. Plumbers can't get overdrunk, but you tell them to. You can't pray to the Barrel God, check for Defective Tokens, use your Chateau, or use the Chess Set.

1.16 - 3/6/20 Fixed bug with Deck of Every Card, and Snojo locking script in Standard runs

I will look into the rest. There's likely a simple fix for this I don't know about.
 

Pazleysox

Member
Does anybody do Trendy runs any more?

We currently have:

is_trendy() - works only in a Trendy run
is_unrestricted() - works in any run which is under Standard restrictions.

Seems like there should only be the latter, with the meaning "can I use this thing right now in my current run - Trendy, Standard, neither, aftercore, ..."

I know about the is_unrestricted(), but since I don't play KOL anymore, I'm only doing script support at this point. I fixed the issues of my script trying to run Barrel God, check for Defective Tokens, Chateau, & Chess Set. The script however tells you of things you can still do, such as get over drunk.

Perhaps mafia still thinks that inebriety_limit() for plumbers is higher than my_inebritey()? I use this code:
Code:
if(my_inebriety() < inebriety_limit()) { print_html("You have " + (inebriety_limit() - my_inebriety()) + " <font color=FF0000>Drunkeness</font> left"); }
	else if(inebriety_limit() == my_inebriety()) {	print_html("You need to get <font color=FF0000>Overdrunk</font>"); }
And apparently in Plumber, this still says you can get Overdrunk.
 

Veracity

Developer
Staff member
Yes. That is your bug.

Code:
[color=green]> ash inebriety_limit()[/color]

Returned: 0

[color=green]> ash can_drink()[/color]

Returned: false
 

Pazleysox

Member
Yes. That is your bug.

Code:
[color=green]> ash inebriety_limit()[/color]

Returned: 0

[color=green]> ash can_drink()[/color]

Returned: false

I'm pretty sure I understand. Thanks!

I somehow knew that the issue wasn't mafia. :)
 
Last edited:

Terrabull

Member
I get this now.

Cannot apply operator && to ( have_familiar() && have_familiar() ) (boolean) and get_property() (string) (Rollover Management.ash, line 73)
 
Top