Openkore.com

OpenKore Forums
It is currently 11 Dec 2019, 08:02

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: DreamerRO Casino macro
PostPosted: 10 Apr 2014, 22:31 
Offline
Moderators
Moderators
User avatar

Joined: 16 Dec 2011, 02:53
Posts: 1215
Location: Brazil
"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 :

Quote:
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" :

Quote:
$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 : viewtopic.php?f=33&t=196765&p=269158#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:
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:
######################################################    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

_________________
"'There are three things all wise men fear: the sea in storm, a night with no moon, and the anger of a gentle man.'" :P

viewtopic.php?f=10&t=16117

Thanks for this Eternal! =D <3<3


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 29 Jun 2014, 10:14 
Offline
Human
Human

Joined: 24 Apr 2008, 16:15
Posts: 38
Thanks for this. Why not have the bot talk to the ATM machine in the casino instead of going to Caspen?


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 29 Jun 2014, 13:04 
Offline
Moderators
Moderators
User avatar

Joined: 16 Dec 2011, 02:53
Posts: 1215
Location: Brazil
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. ^^

_________________
"'There are three things all wise men fear: the sea in storm, a night with no moon, and the anger of a gentle man.'" :P

viewtopic.php?f=10&t=16117

Thanks for this Eternal! =D <3<3


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 21 Aug 2014, 05:31 
Offline
Plain Yogurt
Plain Yogurt

Joined: 10 Jul 2014, 09:16
Posts: 95
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.


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 21 Aug 2014, 10:54 
Offline
Plain Yogurt
Plain Yogurt

Joined: 10 Jul 2014, 09:16
Posts: 95
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:
-- Non-Usable --
1    Unknown #20062 x 1


and i do this to my item control:


Code:
"20062" 0 1 0

#20062 0 1 0

20062 0 1 0
"1B" 0 1 0


but still nothing happened.

Image


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 21 Aug 2014, 17:27 
Offline
Noob
Noob

Joined: 22 Jul 2014, 10:13
Posts: 19
Add the name of this item in tables/items.txt


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 23 Sep 2014, 00:49 
Offline
Moderators
Moderators
User avatar

Joined: 16 Dec 2011, 02:53
Posts: 1215
Location: Brazil
@offtopic:

tables/yourserverfolder/items.txt
Add 20062#1Billion Money Bag#
Code:
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.

_________________
"'There are three things all wise men fear: the sea in storm, a night with no moon, and the anger of a gentle man.'" :P

viewtopic.php?f=10&t=16117

Thanks for this Eternal! =D <3<3


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 28 Sep 2014, 19:50 
Offline
Plain Yogurt
Plain Yogurt

Joined: 10 Jul 2014, 09:16
Posts: 95
thank you sir skylord, unfortunately i can't play casino anymore, because only hero now can be able to play in slot machine.


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 28 Sep 2014, 23:50 
Offline
Moderators
Moderators
User avatar

Joined: 16 Dec 2011, 02:53
Posts: 1215
Location: Brazil
viewtopic.php?f=32&t=209312

_________________
"'There are three things all wise men fear: the sea in storm, a night with no moon, and the anger of a gentle man.'" :P

viewtopic.php?f=10&t=16117

Thanks for this Eternal! =D <3<3


Top
 Profile  
 
 Post subject: Re: DreamerRO Casino macro
PostPosted: 01 Dec 2014, 15:07 
Offline
Noob
Noob

Joined: 01 Dec 2014, 15:01
Posts: 2
SkylorD wrote:
http://forums.openkore.com/viewtopic.php?f=32&t=209312


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..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group