Veracity's MMG scripts

Right.

Please take my script and modify it to suit your strategy.

If it wins for you, send me all your winnings.
If it doesn't win for you, ask Grotfang for reimbursement.

:D
 
To accomplish these two goals, add these lines right before the last line (closing brace):

Code:
if(total>0) cli_execute("kmail "+total.pnum()+" meat to Veracity");
if(total<0) cli_execute("kmail to Grotfang || "+total.pnum()+" meat pl0x, MMG owned me up pretty badly");

(DISCLAIMER: Don't actually do this unless you really want to send Veracity all your winnings and harass Grotfang every time you lose.)
 
(DISCLAIMER: Don't actually do this unless you really want to send Veracity all your winnings and harass Grotfang every time you lose.)

Love it! I don't mind being harassed at all - just so long as my meat stays firmly out of the MMG's dirty hands :)

Yeah... I didn't mean to come across as abrasive as I think I may have done. It's just I have heard a few people assert that the MMG is "ok because you break even in the end" - then moan when they lose. The worst thing is that the popular strategy of the martingale exacerbates this. Over many iterations you will gradually gain a small amount of meat (as one would expect), but it's really hard to back out. The equaliser in the martingale is that eventually you lose horrifically.

I have nothing against people using the MMG - I guess it's nice to have something to do when you're bored and ultimately it is a game. If more people approached it with that attitude, it would be awesome.
 
Where is the iteration counter?
What if you want to infinite loop until you go broke or manual quit?

If I set this: int wait_limit = 500;
Does that mean 500 seconds is the timeout and after 500 seconds the script stops the chain?
 
Last edited:
wait_limit is the maximum time the script will wait for a MMG event before checking if anything got messed up.

I think you could lead this script into infinite iteration by changing line 152:
Code:
		if ( new_count > iterations )
change the condition into something always false, like
Code:
if ( 1 == 5 )
this way the script will keep running ignoring any iteration limit you entered

EDIT: I also slightly modified the script to use an anti-martingale betting system instead of a martingale one.
Instead of increasing the bet when losing, it increases it when winning.
It may sound like a losing strategy, but at least it is a safer one.

With a martingale system, in the best scenario you win (initial amount)*(itertions)*(chains), and in the worst scenario you completely bankrupt (like i did).
With an anti-martingale system, it's the opposite, so in the worst scenario you will lose (initial amount)*(itertions)*(chains) meat, and there is a small chance that your meat will skyrocket.

When you run it, in addition to the existing settings, you also will be asked for the maximum amount of times the script will increase your bet and if you want the script to stop if you get a succesful winning streak.

Also, a little question for Veracity. In your script you added a check if the property "mmgStopNow" is different than ""(blank), the script stops.
How can one modify the property while the script is running, if any CLI command gets queued after the script?
 

Attachments

Last edited:
Also, a little question for Veracity. In your script you added a check if the property "mmgStopNow" is different than ""(blank), the script stops.
How can one modify the property while the script is running, if any CLI command gets queued after the script?
Fair question. The answer: it's completely useless for the reason you point out.

I was considering adding the ability for an ASH script to have an "onAbort" function, which would get called when you hit the Escape key. Without such a function, the script would be stopped immediately, as now. With it, a script could be coded to do a clean shutdown. That turned out to be a can of worms, and the project is on hold - if not completely abandoned.

The property was intended to be a way to do something similar without a core change to ASH - but it would require changing the CLI to not queue up "set" commands during a script - and that is yet another can of worms.
 
Another question: in your script you use mmg_wait_event(1000).
According to the wiki this means wait 1000 seconds. I suspect that that info is wrong, and that the time is not given in seconds, but in milliseconds. Should I correct it?
 
According to the wiki this means wait 1000 seconds. I suspect that that info is wrong, and that the time is not given in seconds, but in milliseconds. Should I correct it?

Heh, missed that; Veracity even specified milliseconds in the post I referred to for all of the MMG info. Corrected on the wiki.
 
There is one last thing I don't understand.
While I was running my own MMG script, in the section where the program should wait for someone taking your bet before advancing, the script advances for some reason, while no event has yet been printed on the CLI, and everything is screwed up. I can't figure out how you made your script not behave this strangely. This is the code i use for my script:
Code:
void wait_event()
{
	print("Waiting for MMG event...");
	boolean done=false;
	int waittime=0;
	int bet_id=0;
	while (!done)
	{
		while ((waittime<=wait_limit) && (bet_id==0))
		{
			print("no bet returned, waiting...");
			bet_id=(mmg_wait_event(1000));
			waittime=waittime+1;
		}
		if (bet_id==0)
		{
			print("no bets returned for long time: checking outstanding bets");
			if (mmg_my_bets().count()==0)
				abort("Error: no result reported but KoL thinks there are no outstanding bets");
		}
		else
			done=true;
	}
}
 
Holy cow! I started out with a little over 30 million meat in my closet. By the time I had to stop to get ready for work a few hours later, I had made a little over 220 Million!

:)
 
I really love this script. Thank you Veracity! It has a great deal of usefulness in terms of feedback etc. I love seeing details of my money being lost! :)

Is it possible to easily modify this for using closet meat instead? Zarqon has a simple script that you can flag to either use closet or on-hand meat. I do a lot of HC runs, but still don't mind the odd dabbling with the MMG. But, I'm just not a scripter (i failed badly at programming so became a consultant instead) :)

Anyway I would appreciate it immensely if that function could be included. Just a thought...
 
You mean storage meat, right? If you want to use meat from your closet, you have to remove it from your closet. If you want to use meat from storage, look at the top of the script where it says:

Code:
// set to true if betting from storage
boolean storage = false;

and change "false" to "true".
 
This script is now broken with the change to the function "try".

"Reserved word 'try' cannot be used as a field name (mmg.ash, line 25)"

I realise this script hasn't been updated since '09, but it's still fun to slowly watch your gambling debts rise!
 
I just uploaded a fixed version.

I hope every current user downloads it, since I also removed the "notify" statement, and I am tired of my Inbox filling up with names of hapless gamblers.
 
EDIT: So I typed a message before I tried the script and submitted it by accident.

The script is not working for me. It places the first bet like it used to, but after that it hangs; whether the bet is won or lost.

No error is given, unfortunately.
 
Last edited:
Back
Top