[DarkRO] Blackjack Dealer Bot

Moderator: Moderators

Message
Author
coarse
Noob
Noob
Posts: 8
Joined: 17 Nov 2013, 01:26
Noob?: No

[DarkRO] Blackjack Dealer Bot

#1 Post by coarse »

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: Select all

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

Jenjuro
Noob
Noob
Posts: 11
Joined: 04 May 2015, 14:40
Noob?: No

Re: [DarkRO] Blackjack Dealer Bot

#2 Post by Jenjuro »

Sir Pahingi naman po ng mismong bot sa dark ung server.text po sana or kung pwede buong bot napo maraming salamat po godbless

Post Reply