Blackjack Dealer

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

Post Reply
patrikpatrik
Posts: 16
Joined: Wed Aug 03, 2016 8:43 am

Blackjack Dealer

Post by patrikpatrik » Mon Aug 22, 2016 11:39 am

Hello folks,

I thought I'd write a lua blackjack script just for fun. :D It took about 2 weeks to do and I think this version is better than the perl one I did. I went from 2000 lines of code there to 700 here which is a milestone for me to say the least.

The blackjack dealer is across gigglegibber in thundering steppes. His name is Phil and you can't miss him; His head is barely overlooking the poker table. He will shuffle a complete deck of 52 cards before each game. The first card is always 'burned' then deals and plays according to house edge rules.

He accepts anywhere from 1 gold, 10 gold, 50 gold, or 10 platinum and will pay out in scale. He will determine both dealer and player's current value and use logic for aces at any point during the hand.

Dealer does the following:
Must draw to 17.
Regular wins are paid out 1:1.
If a push occurs, you get your money back.
Dealer reveals hand upon bust etc..
In case of blackjack vs blackjack, it's a push.
Blackjack pays out 3 to 2.

Some things haven't been implemented yet
Splitting
Doubling down
Surrendering
Insurance upon dealer's ace showing

One downside is that uploading this to the eqemu2 server the suit symbols aren't showing up properly. It's giving ascii values instead but it's showing up fine on my test server. I think it has to do with submitting a script over php/html so I changed the symbols out to letter abbreviations instead but other than that it seems to be functioning. This is the 8th revision and could use more testing. If you have time, please try him out!

[update] added animations upon winning, losing, pushing, busting, and blackjack

User avatar
Scribble
Team Member
Posts: 157
Joined: Wed Jun 22, 2016 5:30 am
EQ2Emu Server: Norrath Reborn
Characters: Scribe
Location: East Coast , USA
Contact:

Re: Blackjack Dealer

Post by Scribble » Tue Aug 23, 2016 6:25 am

Looks like you're having fun!
Follow me at https://twitter.com/EqIIEmulator
Like to keep up with news via Discordapp chat?

Join eq2emulator public discord at https://discord.gg/sCR4fPZ
Check me out on Twtich at https://www.twitch.tv/scribbleeq23

patrikpatrik
Posts: 16
Joined: Wed Aug 03, 2016 8:43 am

Re: Blackjack Dealer

Post by patrikpatrik » Tue Aug 23, 2016 10:19 am

More to come :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests