Casino.mac w/ Stats

Frequency

Lifetime Member
Joined
Nov 26, 2006
Messages
345
Reaction score
0
Points
16
Age
40
Location
Bumblefuck, PA
Before running:
All bags must be open and not over lapping.
You must select the casino dealer you wish to deal with.
After Macro has completed you will recieve a stat report of the following:
**Edit Corrected a stat problem
**Edit #2 Corrected gold ticket problem

CasinoStats.jpg


Code:
|    Casino.mac
|    By: Frequency
|    All bags must be Open
|    Casino Merchant you wish to deal with must be targeted
|
 
#event NoWin "#*#Lady Luck is not on your side today.#*#"
#event SmallWin "#*#here is your small prize.#*#"
#event MediumWin "#*#Not a bad hand for you#*#"
#event PrettyGoodWin "#*#That is a pretty good hand#*#"
#event GoodWin "#*#That is a good hand!#*#" 
#event IllusionWin "#*#mask your appearance#*#"
#event TokenWin "#*#here are your#*#King's Court tokens.#*#"
 
Sub main
    /declare NoWin int outer
    /declare SmallWin int outer
    /declare MediumWin int outer
    /declare PrettyGoodWin int outer
    /declare GoodWin int outer
    /declare IllusionWin int outer
    /declare TokenWin int outer
    /declare StartTokens int outer
        /varset StartTokens ${FindItemCount[=King's Court Token]}
 
    /declare CasinoNPC int local
        /varset CasinoNPC ${Target.ID}
        /if ( !${CasinoNPC} ) {
            /echo You need to target an NPC you wish to run the casino with
            /endmacro
        }
    /declare TradeSlot int local
        /varset TradeSlot 0
    /declare TurnInsRemaining int local
        /varset TurnInsRemaining 0
 
:MainLoop    
    /if ( ${FindItemCount[=King's Court Token]} == 0 ) /goto :Done
    /if ( ${FindItemCount[=Gold Ticket]} > 0 ) /goto :Done
    /if ( !${Me.FreeInventory} ) /goto :Done
 
    /if ( ${FindItemCount[=King's Court Token]} > 4 ) {
        /varset TurnInsRemaining 3
    } else {
        /varset TurnInsRemaining ${Math.Calc[${FindItemCount[=King's Court Token]} - 1]}
    }    
    /for TradeSlot 0 to ${TurnInsRemaining} 
        /call ClearCursor
        /call GetToken
        /if ( !${TradeSlot} ) {
            /target ID ${CasinoNPC}
            /click Left Target
            /delay 2        
        :WaitForWindow
            /if ( !${Window[GiveWnd].Open} ) /goto :WaitForWindow
        } else {
            /target ID ${CasinoNPC}
            /click Left Target
            /delay 2        
        }            
    /next TradeSlot
    /notify GiveWnd GVW_Give_Button leftmouseup
        /delay 5
        /doevents
    /call ClearCursor
    /goto :MainLoop
:Done
    /call Report
    /call BeepLoop
/return
 
Sub GetToken
    /ctrlkey    /itemnotify ${FindItem[=King's Court Token].InvSlot} leftmouseup
    /delay 10
    /if ( ( ${Cursor.ID} ) && ( ${Cursor.Name.NotEqual[King's Court Token]} ) ) {
        /call ClearCursor
        /call GetToken
    }
/return
 
Sub ClearCursor
    /if ( ${Cursor.ID} ) {
    :ClearLoop
        /autoinv
        /delay 1
        /if ( ${Cursor.ID} ) /goto :ClearLoop
    }
/return
 
Sub BeepLoop
:BeepLoop
    /beep
    /delay 5
    /beep
    /delay 4
    /beep
    /delay 3
    /beep
    /delay 2    
    /beep
    /delay 1
    /goto :BeepLoop
    }
/return
 
Sub Report
    /doevents
    /declare TotalPlays int local
        /varset TotalPlays ${Math.Calc[${SmallWin} + ${MediumWin} + ${PrettyGoodWin} + ${GoodWin} + ${IllusionWin} + ${TokenWin} + ${NoWin}]}
    /declare TotalWins int local
        /varset TotalWins ${Math.Calc[${SmallWin} + ${MediumWin} + ${PrettyGoodWin} + ${GoodWin} + ${IllusionWin} + ${TokenWin}]}
 
    /echo Total Plays: ${TotalPlays}
    /echo Wins: ${TotalWins}
    /echo Win Percentage: ${Math.Calc[(${TotalWins} / ${TotalPlays}) * 100]}%
    /echo Small Wins: ${SmallWin} - ${Math.Calc[(${SmallWin} / ${TotalPlays}) * 100]}%
    /echo Medium Wins: ${MediumWin} - ${Math.Calc[(${MediumWin} / ${TotalPlays}) * 100]}%
    /echo Pretty Good Wins: ${PrettyGoodWin} - ${Math.Calc[(${PrettyGoodWin} / ${TotalPlays}) * 100]}%
    /echo Good Wins: ${GoodWin} - ${Math.Calc[(${GoodWin} / ${TotalPlays}) * 100]}%
    /echo Illusion Wins: ${IllusionWin} - ${Math.Calc[(${IllusionWin} / ${TotalPlays}) * 100]}%
    /echo Tokens Wins: ${TokenWin} - ${Math.Calc[(${TokenWin} / ${TotalPlays}) * 100]}%
    /echo Tokens Won: ${Math.Calc[${TotalPlays} - ${StartTokens}]}
    /echo Total Time Running: ${Math.Calc[${Macro.RunTime} / 60]} Minutes
/return
 
Sub Event_NoWin
    /varcalc NoWin ${NoWin} + 1
/return
 
Sub Event_SmallWin
    /varcalc SmallWin ${SmallWin} + 1
/return
 
Sub Event_MediumWin
    /varcalc MediumWin ${MediumWin} + 1
/return
 
Sub Event_PrettyGoodWin
    /varcalc PrettyGoodWin ${PrettyGoodWin} + 1
/return
 
Sub Event_GoodWin
    /varcalc GoodWin ${GoodWin} + 1
/return
 
Sub Event_IllusionWin
    /varcalc IllusionWin ${IllusionWin} + 1
/return 
 
Sub Event_TokenWin
    /varcalc TokenWin ${TokenWin} + 1
/return
 
Last edited:
NM!

Just reread it again, and I see the Gold Ticket , done part =)
 
im having trubel starting it whats the /coman to start this
 
Works nicely btw, but that su><or Freq is taking all the GD gold tickets!!!
 
How much money on average does it take to get a golden ticket?
 
That's up to the RNG... I've gotten one within 15k and none after 75k
 
auto delete

is there a way to auto delete the food????
 
So I didnt really do any work for this so all the credit goes to the guy that made yafm (Yet Another Forage Macro). I just attached his HandleItem subroutine to Freq's macro here and changed some things around so it will automatically add things to your ini file and you have to of course manually set them to 0 if you want them autodestroyed. I've attached my sample casino.ini ...please take note of the last item on the list....yes I did get one after 400k =)

Code:
|    Casino.mac
|    By: Frequency
|    All bags must be Open
|    Casino Merchant you wish to deal with must be targeted
|
 
#event NoWin "#*#Lady Luck is not on your side today.#*#"
#event SmallWin "#*#here is your small prize.#*#"
#event MediumWin "#*#Not a bad hand for you#*#"
#event PrettyGoodWin "#*#That is a pretty good hand#*#"
#event GoodWin "#*#That is a good hand!#*#" 
#event IllusionWin "#*#mask your appearance#*#"
#event TokenWin "#*#here are your#*#King's Court tokens.#*#"
 
Sub main
    /declare NoWin int outer
    /declare SmallWin int outer
    /declare MediumWin int outer
    /declare PrettyGoodWin int outer
    /declare GoodWin int outer
    /declare IllusionWin int outer
    /declare TokenWin int outer
    /declare StartTokens int outer
        /varset StartTokens ${FindItemCount[=King's Court Token]}
 
    /declare CasinoNPC int local
        /varset CasinoNPC ${Target.ID}
        /if ( !${CasinoNPC} ) {
            /echo You need to target an NPC you wish to run the casino with
            /endmacro
        }
    /declare TradeSlot int local
        /varset TradeSlot 0
    /declare TurnInsRemaining int local
        /varset TurnInsRemaining 0
 
:MainLoop    
    /echo ${FindItemCount[=King's Court Token]} tokens found
    /if ( ${FindItemCount[=King's Court Token]} == 0 ) /goto :Done
    /if ( ${FindItemCount[=Gold Ticket]} > 0 ) /goto :Done
    /if ( !${Me.FreeInventory} ) /goto :Done
 
    /if ( ${FindItemCount[=King's Court Token]} > 4 ) {
        /varset TurnInsRemaining 3
    } else {
        /varset TurnInsRemaining ${Math.Calc[${FindItemCount[=King's Court Token]} - 1]}
    }    
    /for TradeSlot 0 to ${TurnInsRemaining} 
        /call ClearCursor
        /call GetToken
        /if ( !${TradeSlot} ) {
            /target ID ${CasinoNPC}
            /click Left Target
            /delay 2        
        :WaitForWindow
            /if ( !${Window[GiveWnd].Open} ) /goto :WaitForWindow
        } else {
            /target ID ${CasinoNPC}
            /click Left Target
            /delay 2        
        }            
    /next TradeSlot
    /notify GiveWnd GVW_Give_Button leftmouseup
        /delay 5
        /doevents
    /call ClearCursor
    /goto :MainLoop
:Done
    /call Report
    /call BeepLoop
/return
 
Sub GetToken
    /ctrlkey    /itemnotify ${FindItem[=King's Court Token].InvSlot} leftmouseup
    /delay 10
    /if ( ( ${Cursor.ID} ) && ( ${Cursor.Name.NotEqual[King's Court Token]} ) ) {
        /call ClearCursor
        /call GetToken
    }
/return
 
Sub ClearCursor
    /if ( ${Cursor.ID} ) {
    :ClearLoop
        /call HandleItem
        /delay 5
        /if ( ${Cursor.ID} ) /goto :ClearLoop
    }
/return
 
Sub BeepLoop
:BeepLoop
    /beep
    /delay 5
    /beep
    /delay 4
    /beep
    /delay 3
    /beep
    /delay 2    
    /beep
    /delay 1
    /goto :BeepLoop
    |/camp
    }
/return
 
Sub Report
    /doevents
    /declare TotalPlays int local
        /varset TotalPlays ${Math.Calc[${SmallWin} + ${MediumWin} + ${PrettyGoodWin} + ${GoodWin} + ${IllusionWin} + ${TokenWin} + ${NoWin}]}
    /declare TotalWins int local
        /varset TotalWins ${Math.Calc[${SmallWin} + ${MediumWin} + ${PrettyGoodWin} + ${GoodWin} + ${IllusionWin} + ${TokenWin}]}
 
    /echo Total Plays: ${TotalPlays}
    /echo Wins: ${TotalWins}
    /echo Win Percentage: ${Math.Calc[(${TotalWins} / ${TotalPlays}) * 100]}%
    /echo Small Wins: ${SmallWin} - ${Math.Calc[(${SmallWin} / ${TotalPlays}) * 100]}%
    /echo Medium Wins: ${MediumWin} - ${Math.Calc[(${MediumWin} / ${TotalPlays}) * 100]}%
    /echo Pretty Good Wins: ${PrettyGoodWin} - ${Math.Calc[(${PrettyGoodWin} / ${TotalPlays}) * 100]}%
    /echo Good Wins: ${GoodWin} - ${Math.Calc[(${GoodWin} / ${TotalPlays}) * 100]}%
    /echo Illusion Wins: ${IllusionWin} - ${Math.Calc[(${IllusionWin} / ${TotalPlays}) * 100]}%
    /echo Tokens Wins: ${TokenWin} - ${Math.Calc[(${TokenWin} / ${TotalPlays}) * 100]}%
    /echo Tokens Won: ${Math.Calc[${TotalPlays} - ${StartTokens}]}
    /echo Total Time Running: ${Math.Calc[${Macro.RunTime} / 60]} Minutes
/return
 
Sub Event_NoWin
    /varcalc NoWin ${NoWin} + 1
/return
 
Sub Event_SmallWin
    /varcalc SmallWin ${SmallWin} + 1
/return
 
Sub Event_MediumWin
    /varcalc MediumWin ${MediumWin} + 1
/return
 
Sub Event_PrettyGoodWin
    /varcalc PrettyGoodWin ${PrettyGoodWin} + 1
/return
 
Sub Event_GoodWin
    /varcalc GoodWin ${GoodWin} + 1
/return
 
Sub Event_IllusionWin
    /varcalc IllusionWin ${IllusionWin} + 1
/return 
 
Sub Event_TokenWin
    /varcalc TokenWin ${TokenWin} + 1
/return
 
sub HandleItem
 
   /declare ItemSetting int local
   /declare NotFound int local
 
   /varset NotFound -1
 
   | Look up this item in yafm.ini
   /varset ItemSetting ${Ini[casino.ini,KeepList,${Cursor.Name},${NotFound}]}
 
   /delay 5
 
   | If the item isn't in the .ini file then add it.
   /if (${ItemSetting}==${NotFound}) {
 
      /ini "casino.ini" "KeepList" "${Cursor.Name}" "1"
 
      /varset ItemSetting 1
 
   }
 
   | If we're keeping this item then stash it in our bags.
   | Otherwise, just destroy it.
   /if (${ItemSetting}==1) {
 
      :LootIt
      /autoinventory
      /delay 5
 
   } else {
 
      /destroy
 
   }
 
/return

casino.ini:
Code:
[KeepList]
Roasted Mammoth Sandwich=0
King's Court Token=1
Vial of Swirling Smoke=0
Crushed Topaz=0
Club Sandwich=0
Gnomish Firework=0
Essence of Halfling=0
Essence of Barbarian=0
Flawed Sea Sapphire=0
Essence of Erudite=0
Elixir=0
Crushed Coral=0
Essence of Dwarf=0
Essence of High Elf=0
Beer Goggles=1
Blue Resistance Stone=0
Essence of Half Elf=0
Essence of Dark Elf=0
Flawed Emerald=0
Pristine Emerald=0
Essence of Troll=0
Essence of Gnome=0
Deluxe Sewing Kit=0
Snakefingers=1
Essence of Ogre=0
Crushed Black Marble=0
Illusionists Stone=0
Prayers of Life=1
Essence of Wood Elf=0
Essence of Iksar=0
Flawless Diamond=0
Crushed Flame Emerald=0
White Resistance Stone=0
King's Court Sandwich=0
Essence of Vah Shir=0
Essence of Human=0
Gold Ticket=1
 
Spent 60k today with the first version, will try this newer version so I can have it delete the fireworks and other bullshit items.
 
Thanks Tru, and /rudes Freq for being so god-d*mned lazy! I told you to do this biatcha! Now look, someone else did it!!!

How much snow? I'm bustin out the machine now! Looks nasty outside...
 
Spent 3mill in a 18 hr macro camp.. No gold ticket. I forever give up on the casino.
 
bleh

i know howta make this more effective..
 
How so?
anyone came up with any tricks of the casino or random luck?
 
i am new to this casion thing and have a question. If i win a golden ticket do i get to pick what i want or is it random too?
 
ticket

Its random,

Unless you know someone who has a casino pack.

A casino pack is a set of all the drops, they are lore so you can almost dial in yoru drop.
 
just won a gold ticket and got the holgresh elder beads spent about 100K thinking of selling the beads to barter guy on my server for 600K lol