RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Gambler NPC - 2D/3D version *updated*

Status
Not open for further replies.

lordomega

Wanderer
Something I've noticed, if you get disconnected while playing it won't allow anyone to continue the game. Is there you could implement a check for this perhaps, or maybe a reset button that resets the entire dealer? Any help would be appreciative, nice script!
 

Zulu

Wanderer
Is there a script or some way to determine if a player has disconnected?? Any help would be great.

New Updates
- I also added a fix for poker to determine a straight.
- Changed the words from Keep to Hold.
- I added a command reset that will remove the busy flag.
- In poker, the check mark is gone when game is over.

Click here to download
 

Zulu

Wanderer
mikemaz, the info only appears at the bottom of the gump in green text. If the game is over, it will have a message game over, or Dealer wins.

In poker, it will say something like 3 of a kind. The zuluhotel at the bottom of the gump changes, that is the message text area.
 

lordomega

Wanderer
How difficult would it be to make the gambler context-menu based (or as an option) rather than text command based? I haven't messed too much with context menus to be honest.
 

Zulu

Wanderer
I've had a request to have the script use tolkens. Is there any interest? How many tolkens will an average player have 20? 2000?

I will have a new version later today that will automatically go un-busy if a player is disconnected.

lordomega, that can be done. I have not done anything with context-menu's on RUNUO, but I've done lots on POL. Another thing, if a player double click on the npc, have it open a gump to pick blackjack or poker AND keep the text based stuff. Just some ideas.
 

lordomega

Wanderer
Yeah I've seen the double-click method done, all it requires is a gump call. The context menu area though I haven't touched. Perhaps someone that has been there can shed a little light, if not I'll go mosey through a few current distro scripts and see if I can find anything helpful.
 
A little exploit:

Had the chance of playing some poker (didn't try blackjack since the update) but here's a little thing that might need fixed before a player starts making money off it.

1) start a game of poker
2) deal with a bet of 100
3) instead of picking what cards to hold now press the bet button

The bets will cycle from 100 to 500 and back again but since you already dealt with bet 100 only 100 gold was substracted from your backpack.

Additionally the cards get 're-dealt' every time you hit the bet button.

So make a bet at 100 and keep hitting the bet button till you find a favorable (2x 10 or 3 of a kind) deal at a high bet.

Hold the correct cards and *poof* your meager investment of 100 gold yields 500 or more gold as winnings.


Don't know if it works for blackjack I ran out of time to test it (am rendering some heavy duty graphics for work so it takes up tons of memory on my test server pc)



Added: about the tokens, the more common scripts here use very small amounts of tokens therefore anything more than 10 would probably cause balancing issues. Not really your problem though since it is not your responsibility to balance other people's shards hehe.
 

Zulu

Wanderer
Captain The First, thanks for your message. I did find that error and fixed in the previous update. The current version works: everyone time you click on deal, it takes away 100 gold (or what ever your bet is).

New updates
I just posted a new update that has my first attempt at auto disconnect. I am unable to test this at the office. Let me know how it works.

The current player can now type blackjack or poker during the game and it will automatically switch to the other game without quitting.

This script is done, unless there are bugs or errors found.

In the works
I am working on my auction script for RUNUO right now. This version is intergraded with the shard's website. It's an online auction system that allows players to view and bid on items in the auction. They will log in with their account username and password and right from the web browser, and can get into the fun.

There is also banner program that is like a stock ticker that runs on a players computer that displays current pricing on the auction. This only runs on windoze based computers. This program automatically updates itself and has current prices.
 
must be just the newest one... have a previous one where the problem I described earlier still exists and no real problems.

I assume Zulu can fix it hehe
 

Justin Time

Wanderer
I also had a shard hang when I was testing it with my staff char. It happened when I was playing blackjack but I am not sure exatly what caused it. CPU for runuo process went to 100% and I had to restart it to gain control. I wasnt able to get a crash log because I just had to reboot it to clear the problem.

I do think this was maybe your second or third public revision of the script, so I am not sure if you have already corrected the issue.
 

Zulu

Wanderer
I put up the new version with the automatic timeout system removed from it. I will have to do more tests and figure out how to write it. Let me know if there are problems with this. I have done tests and I have not had it hang or cause cpu 100%
 

Justin Time

Wanderer
My hanging problem occured yesterday before you added the automatic timeout. I wish I was paying better attention to what caused the hang, but I was having too much fun playing blackjack :).
 

Zulu

Wanderer
I had the same problem from yesterday. It was in the script to calculate card values, it had a loop in it.

If you download the new version that will fix it.
 

Zulu

Wanderer
Captain The First, I finally found the problem you were discussing. I have made a fix for it. you can no longer keep using the bet button to find a 'good' hand.

raistlinm, download and try the updated version and let us know how it works.

Updated version online now.

ALL links will download the new version.
 
Excellent work Zulu...

Your script will definitely be added to my shard once it reaches finishing stages (+- 6 months) hope that runuo will be ripened enough then to make updating not as important.

Excellent work... any more where that came from? hehehe

I think I will have some gambling addicts... actually decent money if you play carefully on both poker and blackjack (so far the odds seem to favor blackjack for me :p)
 

neimen

Wanderer
tested with one of my GMs last night

killed it when he lost too much money :/

lol

have to see how he fares at poker

great script
 
Status
Not open for further replies.
Top