DreamerRO Casino macro

Moderator: Moderators

Message
Author
SkylorD
Moderators
Moderators
Posts: 1163
Joined: 16 Dec 2011, 02:53
Noob?: Yes
Location: Brazil

DreamerRO Casino macro

#1 Post by SkylorD »

"The game consists of score 3 consecutive letters."

Feedback : I made 300billions bang in one day. You have at least 30% of chance to won.
Last update :
Changed "automacro zenys" eval condition to check if your inventory is not full before you change your zenys for bags.
Reason : I lost some billions. The last condition was 'eval !%talk'. If you want to change it.

*We can replace the "automacro zenys" with the itemExchange plugin. ^^
1 - Set in your config :
casino_machinenumber <Machine ID> - Here you need to set the slot machine name . Just one. If you don't set this option, you will play in a random machine.
I want to play in "Slot machine #slot3-4" :

casino_machinenumber 3-4


You can set the amount to bet in "automacro insertzeny" :
$casinoamount = 2000000
You could see this macro above :

#Note : items.txt => 20062#1Billion Money Bag# as default now is "1B", and not "1 B". sry.

#PS (2014/10/03) :
Updated macro : http://forums.openkore.com/viewtopic.ph ... 58#p269098 (Your char must be inside casino map)

You can use the macro above (The link to the updated macro) or the macro below (Oudated) :

Code: Select all

automacro casinoroute {
exclusive 1
location caspen
zeny < 1990000000
hook AI_pre
call {
$billionbag = @inventory(1Billion Money Bag)
$billamount = @invamount(1Billion Money Bag)
if ($billionbag != -1) {
do c @storage
pause 1
$billionbag = @inventory(1Billion Money Bag)
do storage add $billionbag
pause 1
do storage close
pause 1
} else {
pause 2
$x = @rand (183, 187)
$y = @rand (104, 106)
$x2 = @rand (182, 191)
$y2 = @rand (98, 99)
$randompos = @random ("$x $y", "$x2 $y2")
do c @warp cmd_in02 $randompos
pause 1
#$x = @rand (151, 159)
#$y =  @rand (203, 209)
#do move caspen $x $y
#Dreamer RO Helper coords : 155 210
#do talknpc 155 210 c r3 c r3 c r1 
}
}
}


automacro movetomachine {
exclusive 1
location cmd_in02
location not cmd_in02 182 106 191 99
zeny < 1990000000
call {
$x = @rand (183, 187)
$y = @rand (104, 106)
$x2 = @rand (182, 191)
$y2 = @rand (98, 99)
$randompos = @random ("$x $y", "$x2 $y2")
do move $randompos
}
}

automacro talknpc {
location cmd_in02 182 106 191 99
eval !%talk
timeout 3
hook AI_pre
call {
$talkcont = @config(autoTalkCont)
$machinenumber = @config(casino_machinenumber)
if ($talkcont == "0") {
do conf autoTalkCont 1
}
$npcid = @npc(/Slot Machine\#slot$machinenumber/i)
while ($npcid == -1) as loop
$x = @rand(1, 10)
$y = @rand(1, 10)
$npcid = @npc(/Slot Machine\#slot$x\-$y/i)
end loop
do talk $npcid
}
}

automacro selectplay {
console /(.*)?\d+\s+Play(.*)?/i
call {
do talk resp 0
}
}

automacro insertzeny {
console /.+Insert zeny to bet.+/i
call {
pause @rand(1, 2, 3)
$casinoamount = 2000000
do talk num $casinoamount
}
}

automacro antibot {
console /Slot Machine\#slot\d-\d\:\s.\s(.*)\s.+$/i
call {
do talk text $.lastMatch1
}
}

automacro zenys {
eval $char->inventory->size < 100
zeny >= 1990000000
exclusive 1
call {
pause 1
$y = @rand(186, 196)
do c @go 0
do move 180 $y
do talknpc 185 193 r3 r2 r2
pause 1
do c @storage
pause 1
$billionbag = @inventory(1Billion Money Bag)
do storage add $billionbag
pause 1
do storage close
pause 1
$x = @rand (183, 187)
$y = @rand (104, 106)
$x2 = @rand (182, 191)
$y2 = @rand (98, 99)
$randompos = @random ("$x $y", "$x2 $y2")
do c @warp cmd_in02 $randompos
pause 1
}
}
(Your character need to be inside casino map or in caspen)


#Not needed but : #
It prints the match result :

Code: Select all

######################################################    CASINO RESULTS    ######################################################
sub machineresult {
my ($a, $b, $c) = @_;
my %casinoresponses;
my $p = 0;
$p = 1 if ($a eq $b && $b eq $c && $c eq $a);
$casinoresponses{$a} = $a if (!$casinoresponses{$a} && $p ne 1);
$casinoresponses{$b} = $b if (!$casinoresponses{$b} && $p ne 1);
$casinoresponses{$c} = $c if (!$casinoresponses{$c} && $p ne 1);
my $total = keys %casinoresponses;
if ($total eq 3) {
$losses += 1;
warning "Losses +1 . now is $losses\n";
}
elsif ($total eq 2) {
$draw += 1;
warning "Draw +1 . now is $draw\n";
}
elsif ($total eq 1) {
$draw += 1;
warning "Draws +1 . now is $draw\n";
}
elsif ($total eq 0) {
$won += 1;
warning "Wins +1 . now is $won\n";
}
}   

automacro won {
console /Slot Machine#slot\d-\d\:(\s+)?.\s+(\w)\s+.\s+(\w)\s+.\s+(\w)\s+\s+.(.+)?/i
varvar draw unset
varvar won unset
varvar losses unset
varvar totallosses unset
call {
do eval machineresult($.lastMatch2, $.lastMatch3, $.lastMatch4);
}
}
Working good.

Image


Machine result :

Image
Learn rules

L4M3573R
Human
Human
Posts: 38
Joined: 24 Apr 2008, 16:15

Re: DreamerRO Casino macro

#2 Post by L4M3573R »

Thanks for this. Why not have the bot talk to the ATM machine in the casino instead of going to Caspen?

SkylorD
Moderators
Moderators
Posts: 1163
Joined: 16 Dec 2011, 02:53
Noob?: Yes
Location: Brazil

Re: DreamerRO Casino macro

#3 Post by SkylorD »

Make your change.

:D Sorry for this, but I have not seen the NPC. Hahaha.
And i do prefer walk through of prontera to check if any gm is on. '-' just to update some macros :roll:

And thanks for your post. ^^
Learn rules

genskull
Plain Yogurt
Plain Yogurt
Posts: 91
Joined: 10 Jul 2014, 09:16
Noob?: Yes

Re: DreamerRO Casino macro

#4 Post by genskull »

its very nice post sir skylord,
i want to learned how you do it,

$x = @rand (183, 187) --------------->> where did you get this?
$y = @rand (104, 106) --------------->> where did you get this?
$x2 = @rand (182, 191) --------------->> where did you get this?
$y2 = @rand (98, 99) --------------->> where did you get this?
$randompos = @random ("$x $y", "$x2 $y2")
do c @warp cmd_in02 $randompos
pause 1
#$x = @rand (151, 159) --------------->> where did you get this?
#$y = @rand (203, 209) --------------->> where did you get this?
#do move caspen $x $y
#Dreamer RO Helper coords : 155 210
#do talknpc 155 210 c r3 c r3 c r1
}
}
}

what if i want to play in another machine? and how about the location of the character?

i tested your macros sir skylord and its working fine.
thank you so much for posting this, i really appreciate it. a million of thanks, from the button of my heart.

genskull
Plain Yogurt
Plain Yogurt
Posts: 91
Joined: 10 Jul 2014, 09:16
Noob?: Yes

Re: DreamerRO Casino macro

#5 Post by genskull »

i tried put some 1 billion bag to my inventory but my bot doesnt do autostorage,

i've seen the money bag in my inventory like this:

Code: Select all

-- Non-Usable --
1    Unknown #20062 x 1 
and i do this to my item control:

Code: Select all

"20062" 0 1 0

#20062 0 1 0

20062 0 1 0
"1B" 0 1 0
but still nothing happened.

Image

telnex
Noob
Noob
Posts: 19
Joined: 22 Jul 2014, 10:13
Noob?: Yes

Re: DreamerRO Casino macro

#6 Post by telnex »

Add the name of this item in tables/items.txt

SkylorD
Moderators
Moderators
Posts: 1163
Joined: 16 Dec 2011, 02:53
Noob?: Yes
Location: Brazil

Re: DreamerRO Casino macro

#7 Post by SkylorD »

@offtopic:

tables/yourserverfolder/items.txt
Add 20062#1Billion Money Bag#

Code: Select all

automacro movetomachine {
exclusive 1
location cmd_in02
location not cmd_in02 164 106 191 99
zeny < 1990000000
call moveroute
}

automacro talknpc {
location cmd_in02 165 106 187 99
eval !%talk
timeout 3
hook AI_pre
call {
$talkcont = @config(autoTalkCont)
$machinenumber = @config(casino_machinenumber)
if ($talkcont == "0") {
do conf autoTalkCont 1
}
$npcid = @npc(/Slot Machine\#slot$machinenumber/i)
while ($npcid == -1) as loop
$x = @rand(1, 10)
$y = @rand(1, 10)
$npcid = @npc(/Slot Machine\#slot$x\-$y/i)
end loop
do talk $npcid
}
}

automacro selectplay {
console /(.*)?\d+\s+Play(.*)?/i
call {
do talk resp 0
}
}

automacro insertzeny {
console /.+Insert zeny to bet.+/i
call {
pause @rand(1, 2, 3)
$casinoamount = 2000000
do talk num $casinoamount
}
}

automacro storage {
eval $char->inventory->size < 100
zeny >= 1990000000
exclusive 1
call {
pause 1
$y = @random(109, 112)
$x = @random(177, 182)
do talknpc 183 111 r3 r2 r2
pause 1
do c @storage
pause 1
$billionbag = @inventory(1Billion Money Bag)
do storage add $billionbag
pause 1
do storage close
pause 1
call moveroute
}
}

automacro antibot {
console /Slot Machine\#slot\d-\d\:\s.\s(.*)\s.+$/i
call {
do talk text $.lastMatch1
}
}

macro moveroute {
if (@config(casino_side) == "RU") {
$x = @rand (183, 187)  
$y = @rand (104, 106)  
} elsif (@config(casino_side) == "RB") {
$x = @rand (182, 191) 
$y = @rand (98, 99)   
} elsif (@config(casino_side) == "LU") {
$x = @rand (165, 171)  
$y = @rand (104, 106)   
} elsif (@config(casino_side) == "LB") {
$x = @rand (166, 175) 
$y = @rand (98, 99)   
} else {
$x1 = @rand (183, 187)  #Right up 1-X
$xx1 = @rand (184, 186) #Right bottom 3-X
$x2 = @rand (165, 171)  #Left up 2-X
$xx2 = @rand (167, 173) #Left bottom 4-X
$y = @rand (104, 106)   #Side of chair
$y2 = @rand (98, 99)    #Sit in a chair
$randompos = @random ("$x $y", "$xx1 $y", "$xx2 $y", "$x $y2", "$xx1 $y2", "$xx2 $y2", "190 $y2")
do move $randompos
}
do move $x $y
}
Added option to choose the left or right side and to storage inside casino map

casino_machinenumber 3-4
casino_side RU

Image
RU or RB or LU or LB. If you don't set this line, it'll choose randomly.

@genskull

$x = @rand (183, 187) --------------->> where did you get this?
$y = @rand (104, 106) --------------->> where did you get this?
$x2 = @rand (182, 191) --------------->> where did you get this?
$y2 = @rand (98, 99) --------------->> where did you get this?


It is the RU and RB coords, respectively.

Be careful with GM's.
Learn rules

genskull
Plain Yogurt
Plain Yogurt
Posts: 91
Joined: 10 Jul 2014, 09:16
Noob?: Yes

Re: DreamerRO Casino macro

#8 Post by genskull »

thank you sir skylord, unfortunately i can't play casino anymore, because only hero now can be able to play in slot machine.

SkylorD
Moderators
Moderators
Posts: 1163
Joined: 16 Dec 2011, 02:53
Noob?: Yes
Location: Brazil

Re: DreamerRO Casino macro

#9 Post by SkylorD »

Learn rules

mashiroiro
Noob
Noob
Posts: 2
Joined: 01 Dec 2014, 15:01
Noob?: Yes

Re: DreamerRO Casino macro

#10 Post by mashiroiro »

Maybe you can help me or can you post the complete macro for that blackjack? ive had a hard time understanding what they were doing.. i mean, this post of yours was understood by me but not as hard as the black jack topic.. Thanks man..

Post Reply