• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Casino Macro (1 Viewer)

i can not fix something if i do not know what errors your getting

but I can tell you .. in your code above.. your loops have to have different names..

So make :loop then :loop1 smarter is to make the loop names reference what they are going.... like :tradeloop or :cursorloop

etc etc

Post the original code you used.. and post the error messages.. or what was wrong.


ARMY
 
This is the one I use and it runs with no problem:

Rich (BB code):
|***************************************************************|
| advCasino.mac v1.1                                            |
|                                                               |
| Made coz I was bored, much the same reason as the original    |
|  casino money waster.                                         |
| I made this also to learn some of the targeting, and methods  |
|  for windows, such as trade and inventory manipulation =)     |
|                                                               |
| Start in the casino room =) everything is there...            |
|                                                               |
| The only variables you will want to change are the CASINO_NPC,|
|  and PP_TO_PLAY, set that to the amount you want to gamble =) |
| CASINO_NPC is set to Tirac Goldbender, the enc, nec, wiz,     |
|  mage casino dude.  You may want to change MAX_PP_HELD, this  |
|  controls how much you get out of the bank at one time =))    |
| You can change things to trash in the CheckPrize Sub...       |
| Enjoy...                                                      |
|                                                               |
| by zoobish                                                    |
|***************************************************************|


#turbo

Sub Main
   | Declares, set CASINO_NPC, should be all u have to do =)
   /declare CASINO_NPC string outer Gralin Silvertooth
   /declare TOKEN_NPC string outer Nayda Winterwind
   /declare BANKER_NPC string outer Yeren Ironback
   /declare PP_TO_PLAY int outer 5000
   /declare MAX_PP_HELD int outer 5000
   /declare MAX_TOKENS_HELD int outer  50
   /declare CURRENT_PP int outer
   /declare PLAY_COUNT int outer 0
   /declare FOUND_TOKEN int outer 0
   /declare dupe int outer

   /echo Starting MyCasino.mac... Enjoy =)

   | First find how much pp you have on you...
   /varcalc CURRENT_PP ${Me.Platinum}
   /varcalc dupe ${CURRENT_PP}+${Me.PlatinumBank}+${Me.PlatinumShared}
   /if (${dupe}<${PP_TO_PLAY})  {
      /echo *******   ALERT   *******
      /echo  You don't have enough
      /echo  plat to play, please 
      /echo  adjust script variable
      /echo  PP_TO_PLAY to the plat
      /echo  available to you =// 
      /echo ******  END ALERT  ******
      /endmacro
   }
   /varcalc dupe ${dupe}-${PP_TO_PLAY}
   /echo You will have ${dupe} plat left after this is done.
   /varcalc PP_TO_PLAY ${PP_TO_PLAY}-${CURRENT_PP}

   | The main loop...
   :Start
      /call CheckPP
      /call BuyTokens
      /call Gamble
   |   /call IsFinished
   |   /if ( ${Macro.Return} ) /goto :Done
      /if ( ${PP_TO_PLAY}<100 ) /goto :Done
   /goto :Start

   :Done
   /echo DONE
   /endmacro

/return


Sub CheckPrize
   | Looks at the prize, trashes if no good =), Dont have to
   | put in full name if trash item, just a part.
   | Add "BAD" items here to be trashed, follow the pattern =)
   | Make sure u adjust total number in array
   /declare i int local
   /declare BAD[9] string local
   /varset BAD[1] Bread
   /varset BAD[2] Gnomish Firework
   /varset BAD[3] stew
   /varset BAD[4] kabob
   /varset BAD[5] sewing
   /varset BAD[6] essence
   /varset BAD[7] crushed
   /varset BAD[8] elixir
   /varset BAD[9] flaw


   /declare flag int local
   :START
   /varset flag 0
   /for i 1 to ${BAD.Size}
      /if ( ${Cursor.Name.Find[${BAD[${i}]}]} )  /varset flag 1
   /next i
   /if ( ${Cursor.Name.Find[Ticket]} )  {
      /for i 1 to 10
         | WOOOT!!!
         /beep
         /delay 7
      /next i
      /echo YOU WON !!!!
      /echo YAY !!!!
      /endm
   }
   /if ( ${flag} ) {
      /echo destroying ${Cursor.Name}
      /destroy
   } else {
      /autoinv
   }
   /delay 3s ( ${Cursor.ID} )
   /if ( ${Cursor.ID} ) /goto :START
/return


Sub Gamble
   | Start Gambling!!
   /declare i int local
   /declare ToGamble int local 4
   /target ${CASINO_NPC}
   /face nolook
   /call MoveToTarget
   /call ToggleBags
   
   :Start
      /if ( ${FindItemCount[=King's Court Token]}<1 )  /goto :Done
      /for i 0 to 3
         /call PickUpToken
         /click left target
         /delay 2s ( !${Cursor.ID} )
         /varcalc PLAY_COUNT ${PLAY_COUNT}+1
         /if ( ${FindItemCount[=King's Court Token]} == 0 ) /varset i 4
      /next i
      /delay 1s
      /notify GiveWnd GVW_Give_Button leftmouseup
      /delay 2s
      /call CheckPrize
   /goto :Start
   
   :Done
   /call ToggleBags
/return


Sub ToggleBags
   | Opens bags, or closes if already open...
   /declare i int local
   /for i 3 to 8
      /itemnotify pack${i} rightmouseup
   /next i
/return


Sub PickUpToken
   /ctrl /itemnotify ${FindItem[=King's Court Token].InvSlot} leftmouseup
   /delay 1s ( ${Cursor.ID} )
/return
   


Sub BuyTokens
   | Buys one lot of tokens
   /if ( ${FindItemCount[=King's Court Token]}>${MAX_TOKENS_HELD} ) /return
   /declare NumBuys int local
   /varcalc NumBuys ${MAX_TOKENS_HELD}-${FindItemCount[=King's Court Token]}
   /if ( ${Math.Calc[${NumBuys}*100]}>${CURRENT_PP} )  /varcalc NumBuys ${CURRENT_PP}/100
   /declare NumBought int local ${NumBuys}
   /target ${TOKEN_NPC}
   /face nolook
   /call MoveToTarget
   /click right target
   /delay 3s
   /echo Buying ${NumBuys} tokens
   /notify MerchantWnd MW_ItemList listselect ${Window[MerchantWnd].Child[MW_ItemList].List[King's Court Token,2]}
   /notify MerchantWnd MW_ItemList leftmouse ${Window[MerchantWnd].Child[MW_ItemList].List[King's Court Token,2]}

   /delay 2s
   :START
      /if ( ${NumBuys}>20 ) {
         /shift /notify MerchantWnd MW_Buy_Button leftmouseup
         /delay 2s
         /varcalc NumBuys ${NumBuys}-20
      } else {
         /call GetQuantity MerchantWnd MW_Buy_Button ${NumBuys}
         /delay 2s
         /goto :END
      }
   /goto :START

   :END
   /varcalc CURRENT_PP ${CURRENT_PP}-(${NumBought}*100)
   /notify MerchantWnd MW_Done_Button leftmouseup

/return


Sub CheckPP
   | Goes to the bank if not enough for 1 lot of tokens
   /echo checking pp
   /declare need int local
   /varcalc need ${MAX_TOKENS_HELD}*100
   /if ( ${CURRENT_PP}<${need} )  /call GotoBank
/return

Sub GotoBank
   | Gets some pp from the bank
   /target ${BANKER_NPC}
   /call MoveToTarget
   /click right target
   /declare qty int local
   /varcalc qty ${MAX_PP_HELD}-${CURRENT_PP}
   /if ( ${qty} > ${PP_TO_PLAY} )  /varset qty ${PP_TO_PLAY}
   /call GetQuantity BigBankWnd BIGB_SharedMoney0 ${qty}
   /delay 2s ( ${Cursor.ID} )
   /autoinv
   /varcalc CURRENT_PP ${Me.Platinum}
   /varcalc PP_TO_PLAY ${PP_TO_PLAY}-${qty}
   /echo Left To Withdraw: ${PP_TO_PLAY}
   /notify BigBankWnd BIGB_DoneButton leftmouseup
/return

Sub GetQuantity(string Wnd, string Ctrl, int Count)
   /declare I int local
   /declare J int local
   /declare S string local
   /echo in GetQuantity...
   /delay 1s
   /echo notifying ${Wnd} ${Ctrl} leftmouseup
      /notify ${Wnd} ${Ctrl} leftmouseup
      /delay 3s ( ${Window[QuantityWnd].Open} )

      /for I 1 to 2
         /varset J ${Window[QuantityWnd].Child[QTYW_SliderInput].Text.Length}
         /if ( ${J} > 0 ) {
            /keypress backspace chat
            /delay 3s ( ${Window[QuantityWnd].Child[QTYW_SliderInput].Text.Length} < ${J} )
            /varset I 1
         } else {
            /varset I 2
         }
      /next I

      /varset S ${Count}
      /for I 1 to ${S.Length}
         /keypress ${S.Mid[${I},1]} chat
         /delay 3s ( ${Window[QuantityWnd].Child[QTYW_SliderInput].Text.Length} == ${I} )
      /next I

   /delay 1s

      /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup
      /delay 3s ( !${Window[QuantityWnd].Open} )


/return


Sub MoveToTarget
   | Moves to the current target
   /if (!${Target.ID})  /return
   :Move
      /face nolook
      /keypress forward hold
      /delay 5 ${Target.Distance}<18
      /if (${Target.Distance}<18)  {
         /keypress forward
         /face nolook
         /return
      }
   /goto :Move
/return

To tweak to your need, you can change these:
/declare CASINO_NPC string outer Gralin Silvertooth

to one of the 4 npc for the casino. Unless you're farming for crqap stats food, it's mostly pointless. Someone once claimed that sticking to one is bad but I think the odd of winning gold tix are equal regardless of who you play with.

/declare PP_TO_PLAY int outer 5000
/declare MAX_PP_HELD int outer 5000
/declare MAX_TOKENS_HELD int outer 50

Sets the money and token to play with. If you have more token on hand than max when you start, the script skips the banker and token vendor. Do keep in mind not to set too high a max PP held without a mount or your toon would be stuck.

Also you can tweak checkprize loop if you'd rather keep the trash for selling to vendor but mostly I average 200pp worth of trash for every 10k I spend so not a whole lot of money back. Sewing kit is there because if it's not auto destroyed and your inventory is full, you'd be dropping brown bags and if anyone's nearby and knows about MQ2, they'd figure you're running MQ2.

If you want to skip running back and forth between casino npc, banker, and token npc, set PP_TO_PLAY and MAX_PP_HELD to 0 and buy all the tokens you want. Then your toon would just stand by the npc and stay there after you either win a gold ticket or run out of tokens. I'd suggest moving to beside or behind npc since the script normally place you in front of the npc and you might be in the way of other players.

PS this macro was found in Macro Depot 3.0 and is free to all, not from VIP section. Should be safe to post this here.
 
Casino Macro

Users who are viewing this thread

Back
Top