Openkore.com

OpenKore Forums
It is currently 15 Dec 2018, 05:58

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [DarkRO] Blackjack Dealer Bot
PostPosted: 04 May 2015, 06:52 
Offline
Noob
Noob

Joined: 17 Nov 2013, 01:26
Posts: 8
You have to change #indexOfNPC to the index of the blackjack dealer when you type 'nl'
Other than that, it's good to go

You can change the strategy at the do automacro
dealer hand value is $dhvalue while player hand value is $phvalue

$phvalue will always be the soft value, if possible
Code:
macro startbj {
   do talk #indexOfNPC
   pause 1
   do talk cont
   do talk resp 1
   $start = 1
   $count = 0
}

macro stopbj {
   $start = 0
   $count = 0
}

automacro counter {
   var start == 1
   priority 10
   call {
      $count++
   }
   timeout 2
}

automacro botfilter {
   var count >= 3
   call {
      $count = 0
      do talk cont
   }
   timeout 8
}

automacro dhvalue {
   console /The DEALER has: (\d+)/
   call {
      $dhvalue = @eval($.lastMatch1)
      $count = 0
   }
}

automacro phvalue {
   priority 2
   console /YOU have: (\d+)/
   call {
      pause 1
      $count = 0
      $phvalue = @eval($.lastMatch1)
      do talk cont
   }
}

automacro phvalues {
   console /You have: (\d+)/
   call {
      pause 1
      $count = 0
      $phvalue = @eval($.lastMatch1)
      do talk cont
   }
}

3-14, double down
15 to 16, stay if dealer's hand is 16 and below; else hit
17-21, stay

automacro do {
   console /Stay/
   call {
      pause 1
      $count = 0
      if ($phvalue >= 17) {
         do talk resp 1
      } elsif ($phvalue <= 16 && $phvalue >= 15) {
         if ($dhvalue <= 16) {
            do talk resp 1
         } else {
            do talk resp 0
         }
      } else {
         do talk resp 2
      }
   }
}

automacro dealer {
   console /The Dealer is/
   call {
      $count = 0
      do talk cont
   }
}

automacro dealer stay {
   console /The Dealer stays/
   call {
      $count = 0
      do talk cont
   }
}

automacro deal {
   console /the cards are being dealt/
   call {
      $count = 0
      do talk cont
   }
}

automacro prebet {
   console /Please place your bets.../
   call {
      $count = 0
      do talk cont
   }
}

automacro bet {
   console /1,000,000z/
   call {
      pause 1
      $count = 0
      do talk resp 5
   }
}

automacro ddown {
   console /chosen to Double Down/
   call {
      $count = 0
      do talk cont
   }
}

automacro notenuf {
   console /You must pull/
   call {
      $count = 0
      do talk cont
   }
}

automacro lose {
   console /sorry but/
   call {
      $count = 0
      $dhvalue = 0
      $phvalue = 0
      do talk cont
   }
}

automacro win {
   console /you've won/
   call {
      $count = 0
      $dhvalue = 0
      $phvalue = 0
      do talk cont
   }
}

automacro push {
   console /You tied with/
   call {
      $count = 0
      $dhvalue = 0
      $phvalue = 0
      do talk cont
   }
}


Top
 Profile  
 
 Post subject: Re: [DarkRO] Blackjack Dealer Bot
PostPosted: 04 May 2015, 15:42 
Offline
Noob
Noob

Joined: 04 May 2015, 14:40
Posts: 11
Sir Pahingi naman po ng mismong bot sa dark ung server.text po sana or kung pwede buong bot napo maraming salamat po godbless


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

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