Openkore.com
http://forums.openkore.com/

DreamerRO Casino macro
http://forums.openkore.com/viewtopic.php?f=33&t=196765
Page 2 of 3

Author:  mashiroiro [ 03 Dec 2014, 09:11 ]
Post subject:  Re: DreamerRO Casino macro

SkylorD wrote:
"The game consists of score 3 consecutive letters."

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.

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



what if i want my bot to just stay still? what should i put?

Author:  -Saint Seiya- [ 06 Dec 2014, 00:55 ]
Post subject:  Re: DreamerRO Casino macro

encounter this when opening macro. sorry is there any thing else which i need to add in or?

Code:
control\macros.txt: ignoring '}' (munch, munch, strange food)
control\macros.txt: ignoring '$npcid = @npc(/Slot Machine\#slot$machinenumber/i)' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring 'while ($npcid == -1) as loop' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring '$x = @rand(1, 10)' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring '$y = @rand(1, 10)' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring '$npcid = @npc(/Slot Machine\#slot$x\-$y/i)' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring 'end loop' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring 'do talk $npcid' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring '}' (munch, munch, strange food)


does this affect anything?

Author:  SkylorD [ 17 May 2015, 02:52 ]
Post subject:  Re: DreamerRO Casino macro

-Saint Seiya- wrote:
encounter this when opening macro. sorry is there any thing else which i need to add in or?

Code:
control\macros.txt: ignoring '}' (munch, munch, strange food)
control\macros.txt: ignoring '$npcid = @npc(/Slot Machine\#slot$machinenumber/i)' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring 'while ($npcid == -1) as loop' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring '$x = @rand(1, 10)' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring '$y = @rand(1, 10)' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring '$npcid = @npc(/Slot Machine\#slot$x\-$y/i)' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring 'end loop' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring 'do talk $npcid' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring '}' (munch, munch, strange food)


does this affect anything?


Surely. 40%.

What've you did? Try copying the macro again. If does not work post your code here. I can't reproduce this. It's still working here.

Author:  iamjoelrivera [ 26 May 2015, 14:07 ]
Post subject:  Re: DreamerRO Casino macro

sir can you please teach me how to bot in dreamerro ! with black jack npc please :( i want to make zenny there i hope i wil lget response

Author:  hueyyy [ 06 Feb 2016, 04:55 ]
Post subject:  Re: DreamerRO Casino macro

sir how do i get a macro? and how to configure this? because i have here openkore only. and dont know how to configure it to casino macro please help me

Author:  SkylorD [ 11 Mar 2016, 21:05 ]
Post subject:  Re: DreamerRO Casino macro

hueyyy wrote:
sir how do i get a macro? and how to configure this? because i have here openkore only. and dont know how to configure it to casino macro please help me


http://openkore.com/index.php/Macro_plugin

1 - Download Macro Plugin
2 - Extract only the Macro folder and the macro.pl file, in other words, don't extract the trunk file inside the rar file.
3 - Create a folder called plugins in your openkore folder and then paste that files there.
4 - Now open your notepad, paste the macro, save it in anywhere and change the format to UTF-8, save the filename as 'macros'
5 - Move this to your openkore/control folder.

Run normally and success!

Author:  ivan243 [ 22 Apr 2016, 01:42 ]
Post subject:  Re: DreamerRO Casino macro

Sir can i ask ? what is the meaning of this "\d-\d\:\s.\s(.*)\s.+$/i" thanks!

Author:  allanon256 [ 27 Apr 2016, 16:11 ]
Post subject:  Re: DreamerRO Casino macro

ivan243 wrote:
Sir can i ask ? what is the meaning of this "\d-\d\:\s.\s(.*)\s.+$/i" thanks!


That is a regular expression, which translates to: a number, then a dash, then a number, then a colon, then a space, then one character (anything!), then a space, then any sequence of characters, then a space, then any sequence of at least one character.

For example, it would match "0-0: ! (anything goes here!) at_least_one_character_here".

The parentheses in the regular expression capture the "(anything goes here!)" part of my example.

Google finds some great resources on regular expressions. They can be very complicated sometimes - this one is pretty simple.

Author:  raven24 [ 13 May 2016, 03:16 ]
Post subject:  Re: DreamerRO Casino macro

i dont know what did i do wrong but these came up send help .. thanks did try all the packets extractor and didnt work at all please skylord help

Attachments:
3.JPG
3.JPG [ 15.96 KiB | Viewed 4173 times ]
File comment: upon changing some recvpackets from internet
1.JPG
1.JPG [ 28.3 KiB | Viewed 4177 times ]
Capture.JPG
Capture.JPG [ 37.64 KiB | Viewed 4190 times ]

Author:  SkylorD [ 15 May 2016, 15:50 ]
Post subject:  Re: DreamerRO Casino macro

surely your serverType is wrong. you should search on forum about PEEK, follow the master tutorial of 4ept, read until the end.

Page 2 of 3 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/