Casino Macro

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Qosis

Casino Macro

Post by Qosis » Wed Mar 17, 2004 11:41 pm

I've noticed people have been looking for a casino macro, so here's my shot at one. I made one earlier, with a runtime of about 2 hours, and then I got my ticket =) Unfortunately, at this time it does not stop if you get ag old ticket, if someone can add in a clause for that I'd apprecaite it (as gold tickets are lore, so if you get one and another, one will dissapear =P)

But, here's the script in the meantime. It works well if you sit there watching it while playing another char or watching TV, so if a gold ticket does appear you can stop the macro.
|Qosis's Casino Automater!
|This macro will hand in 4 tokens (1 in each slot) to whatever merchant you stand infront of
|make sure you are standing right up at the merchant, if someone runs between you and the merchant
|and you try to give them the token, it'll end the script. If ever more than 1 token
|or anything other than a token ends up in a slot, the script will end...for obvious security reasons
|(we don't want you deleting your gold ticket!) If you have any questions or comments my
|AIM is Qosis55.

|USAGE: /macro casino

Sub Main
/declare l0 local
:Loop
/if n $count("Gold Ticket")>0 /endmacro
/sendkey down ctrl
/for l0 1 to 4
/finditem "King's Court Token"
/if $find()==FALSE /goto :Done
/delay 2
/if n @l0==1 /click left target
/delay 2
/if n @l0>1 /click left npctrade $int($calc(@l0-1))
/delay 2
/next l0
/sendkey up ctrl
/delay 2
/click left npctrade give
/delay 2
/goto :Loop
:cursorclear
/autoinv
/delay 2
/if "$cursor()"!="NULL" /goto :cursorclear
/goto :Loop
:Done
/sendkey up ctrl
/delay 3
/click left npctrade give
/end
Last edited by Qosis on Fri Mar 19, 2004 10:58 pm, edited 2 times in total.

Tuna
a lesser mummy
a lesser mummy
Posts: 68
Joined: Mon Jul 21, 2003 4:10 pm

Post by Tuna » Thu Mar 18, 2004 8:37 am

Awesome! I'll try it out when I get home. I want to be a dark elf beastlord and tell people I've been playing "since pre-design... back when the devs were in junior high and sony only made walkmen."

nightgod
a ghoul
a ghoul
Posts: 122
Joined: Sun Nov 02, 2003 4:39 am

Post by nightgod » Thu Mar 18, 2004 6:57 pm

This should take care of the concerns about ending up burning a golden ticket with a dup lore.

Code: Select all

 :Loop
[color=red]/finditem "Gold Ticket"
/if $find()==TRUE /goto :Done[/color]
/sendkey down ctrl 

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Thu Mar 18, 2004 8:16 pm

Shorter and won't do bad stuff that /finditem could do...

Code: Select all

if n $count("Gold Ticket")>0 /endmacro
- Plazmic

Tuna
a lesser mummy
a lesser mummy
Posts: 68
Joined: Mon Jul 21, 2003 4:10 pm

Post by Tuna » Thu Mar 18, 2004 9:48 pm

Wohoo - grats me on Scimitar of the Mistwalker! Thanks Qosis!

User avatar
OnyxSys
a ghoul
a ghoul
Posts: 133
Joined: Sun Dec 21, 2003 9:58 pm
Contact:

Cant get this one to work...

Post by OnyxSys » Fri Mar 19, 2004 4:54 am

AiM is your Friend and thanks for the Help on fixing my problem :)

Qosis

Post by Qosis » Fri Mar 19, 2004 5:09 am

No problem Onyx =)

Also, updated the original code with gold ticket clause. The script should now turn off once you receive a ticket.

Qosis

Post by Qosis » Fri Mar 19, 2004 5:36 am

If anyone wants an addition to the code to delete anything other than food/expensive potions please let me know, I will not be putting it on the original code as I know I don't want any delete code in a macro involving a gold ticket. Just worried it may destroy the wrong item. But, if anyone wants it. Please feel free to ask.

Mental
orc pawn
orc pawn
Posts: 16
Joined: Mon Jun 02, 2003 5:55 pm

Post by Mental » Fri Mar 19, 2004 2:48 pm

red changes were some code clean ups, believe this runs the same/more efficiently.

Code: Select all

|AIM is Qosis55. 

|USAGE: /macro casino 

Sub Main 
/declare l0 local 

    :Loop
	/if n $count("Gold Ticket")>0 /endmacro
	/sendkey down ctrl 
	/for l0 1 to 4 
	/finditem "King's Court Token" 
	/if $find()==FALSE /goto :Done 
	/delay 2 
	/if n @l0==1 /click left target 
	/delay 2 
	/if n @l0>1 /click left npctrade $int($calc(@l0-1)) 
	/delay 2 
	/next l0 
	/sendkey up ctrl 
	/delay 2 
	/click left npctrade give 
	/delay 2 

 [color=red]   :cursorclear 
	/autoinv
	/delay 2
	/if "$cursor()"!="NULL" /goto :cursorclear
	/goto :Loop
[/color] 	
   :Done 
	/sendkey up ctrl 
	/delay 3 
	/click left npctrade give 
	/end 
My only question is, is there a way to speed up the first step of the initial hand in other than the way listed here? I run on a slower system and that part of the maro takes foreverf or each hand in.

kasodo
a lesser mummy
a lesser mummy
Posts: 64
Joined: Fri Feb 13, 2004 9:41 am

how much plat?

Post by kasodo » Sat Mar 20, 2004 1:18 pm

How much plat is it taking for you all to get a ticket?
I can try and work on a portion that will go buy more tokens for you if you like.

zedisdeadbaby
a ghoul
a ghoul
Posts: 83
Joined: Sun Nov 03, 2002 4:24 pm

Post by zedisdeadbaby » Sat Mar 20, 2004 2:49 pm

SOE must love this. First MQ was being used to make plat, but now it's being used to DESTROY plat.

nightgod
a ghoul
a ghoul
Posts: 122
Joined: Sun Nov 02, 2003 4:39 am

Post by nightgod » Sat Mar 20, 2004 5:07 pm

SoE shoulda just made it ALOT easier to use the casino

Could have used the new tradeskill interface: Click one button to bet, a second to autoinventory.

cheater
orc pawn
orc pawn
Posts: 26
Joined: Sat Oct 04, 2003 6:06 am

Post by cheater » Thu Apr 15, 2004 7:04 pm

anyone who can get the casino script to work again? need my gambling fix :wink: