Page 2 of 3

Re: DreamerRO Casino macro

Posted: 03 Dec 2014, 09:11
by mashiroiro
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 :
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

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

Re: DreamerRO Casino macro

Posted: 06 Dec 2014, 00:55
by -Saint Seiya-
encounter this when opening macro. sorry is there any thing else which i need to add in or?

Code: Select all

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?

Re: DreamerRO Casino macro

Posted: 17 May 2015, 02:52
by SkylorD
-Saint Seiya- wrote:encounter this when opening macro. sorry is there any thing else which i need to add in or?

Code: Select all

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.

Re: DreamerRO Casino macro

Posted: 26 May 2015, 14:07
by iamjoelrivera
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

Re: DreamerRO Casino macro

Posted: 06 Feb 2016, 04:55
by hueyyy
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

Re: DreamerRO Casino macro

Posted: 11 Mar 2016, 21:05
by SkylorD
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!

Re: DreamerRO Casino macro

Posted: 22 Apr 2016, 01:42
by ivan243
Sir can i ask ? what is the meaning of this "\d-\d\:\s.\s(.*)\s.+$/i" thanks!

Re: DreamerRO Casino macro

Posted: 27 Apr 2016, 16:11
by allanon256
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.

Re: DreamerRO Casino macro

Posted: 13 May 2016, 03:16
by raven24
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

Re: DreamerRO Casino macro

Posted: 15 May 2016, 15:50
by SkylorD
surely your serverType is wrong. you should search on forum about PEEK, follow the master tutorial of 4ept, read until the end.