Aller au contenu

Photo

Games and Casino for Taverns, do you have?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

Hello builders, scripters, DMs, players and whatever

 

I would like a multiplayer entertainment system to my tavern. Something that players could bet your GPs and have some fun.

 

Do you know of a game system?



#2
Proleric

Proleric
  • Members
  • 2 359 messages

For example:

 

http://neverwinterva...rch/node/casino

 

There are probably others.

 

If you can't find an out-of-the box solution, the area "Alba - Jolly Roger's" in Enigma Island 3 includes 4 games - Find The Lady shell game, Monty Haul shell game, Hazard (a medieval version of craps dice) and Wheel of Fortune (medieval roulette). You're welcome to adapt them, though they're single player, and the scripting is embedded in a more general system, which is probably over-complicated for your purposes.

 

Spoiler

  • WhiteTiger aime ceci

#3
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

For example:

http://neverwinterva...rch/node/casino

There are probably others. [...]


No, I can't find on there.
 

[...] the area "Alba - Jolly Roger's" in Enigma Island 3 includes 4 games - Find The Lady shell game, Monty Haul shell game, Hazard (a medieval version of craps dice) and Wheel of Fortune (medieval roulette). You're welcome to adapt them, though they're single player, and the scripting is embedded in a more general system, which is probably over-complicated for your purposes.
 

Spoiler

 
Pretty nice yours Modules, Proleric. great hits to play single.
 
About casino games, I take one look in your casino room and I like one of 4 games. The game you play two dice, but I quite dont understand as well how it works. Could you tell me?



#4
Proleric

Proleric
  • Members
  • 2 359 messages

The Hazard game has the following rules : The player rolls 2d6.  If the score is 7, they win. Any other score is called the main, and they have to roll the dice again. After that, the main wins; 7 loses and any other score rolls again.

 

Examples: player rolls 7 (wins). Player rolls 6, 3, 6 (wins). Player rolls 6, 3, 7 (loses).

 

The player decides how much to bet before the first roll. If they win, they get twice the stake, otherwise they lose it.

 

Medieval rules were more complicated:

 

http://en.wikipedia....i/Hazard_(game)

 

The game is in the conversation croupier_hazard. It's embedded in my monolithic scripting system, which probably won't interest you, but you can break out the logic from the following into conventional condition / action scripts.

 

The condition scripts corresponding to check options 1-5 are

Spoiler

This could simply be five conditional scripts. The hazard function is

 

Spoiler

 

The Action Taken scripts are

 

Spoiler

  • WhiteTiger aime ceci

#5
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

I've been wanting to do a slot machine script for a long time and since you brought it up I figured what the heck. Might as well give it a go. Just one script to put in the "OnUsed" event of whatever you want to use for your slot machine.

 

 

////////////////////////////////////////
//One Armed Bandit (Slot Machine) Script
////////////////////////////////////////

//This is based off the original Liberty Bell slot machine created in the late
//1800s

//How much you want each pull to cost. The payout will be multiplied using this.
const int COST_TO_PLAY = 5;

void main()
{
    object oPC = GetLastUsedBy();
    int iGold = GetGold(oPC);

    if (iGold < COST_TO_PLAY)
    {
        //SendMessageToPC(oPC, "You don't have enough gold to play.");
        FloatingTextStringOnCreature("I don't have enough gold to play.", oPC);
        return;
    }

    SetUseableFlag(OBJECT_SELF, FALSE);
    TakeGoldFromCreature(COST_TO_PLAY, oPC, TRUE);

    int iReel1 = Random(5);
    int iReel2 = Random(5);
    int iReel3 = Random(5);
    string sReel1;
    string sReel2;
    string sReel3;
    int iPayout = 0;

    switch (iReel1)
    {
        case 0: sReel1 = "Bell"     ;break;
        case 1: sReel1 = "Horseshoe";break;
        case 2: sReel1 = "Diamond"  ;break;
        case 3: sReel1 = "Spade"    ;break;
        case 4: sReel1 = "Heart"    ;break;
    }
    switch (iReel2)
    {
        case 0: sReel2 = "Bell"     ;break;
        case 1: sReel2 = "Horseshoe";break;
        case 2: sReel2 = "Diamond"  ;break;
        case 3: sReel2 = "Spade"    ;break;
        case 4: sReel2 = "Heart"    ;break;
    }
    switch (iReel3)
    {
        case 0: sReel3 = "Bell"     ;break;
        case 1: sReel3 = "Horseshoe";break;
        case 2: sReel3 = "Diamond"  ;break;
        case 3: sReel3 = "Spade"    ;break;
        case 4: sReel3 = "Heart"    ;break;
    }
    if (sReel1 == "Horseshoe" && sReel2 == "Horseshoe" && sReel3 != "Horseshoe")
    iPayout = COST_TO_PLAY;
    if (sReel1 == "Horseshoe" && sReel2 != "Horseshoe" && sReel3 == "Horseshoe")
    iPayout = COST_TO_PLAY;
    if (sReel1 != "Horseshoe" && sReel2 == "Horseshoe" && sReel3 == "Horseshoe")
    iPayout = COST_TO_PLAY;
    if (sReel1 == "Horseshoe" && sReel2 == "Horseshoe" && sReel3 == "Horseshoe")
    iPayout = COST_TO_PLAY * 2;
    if (sReel1 == "Spade" && sReel2 == "Spade" && sReel3 == "Spade")
    iPayout = COST_TO_PLAY * 4;
    if (sReel1 == "Heart" && sReel2 == "Heart" && sReel3 == "Heart")
    iPayout = COST_TO_PLAY * 6;
    if (sReel1 == "Diamond" && sReel2 == "Diamond" && sReel3 == "Diamond")
    iPayout = COST_TO_PLAY * 8;
    if (sReel1 == "Bell" && sReel2 == "Bell" && sReel3 == "Bell")
    iPayout = COST_TO_PLAY * 10;

    PlaySound("as_sw_lever1");
    DelayCommand(1.5, PlaySound("gui_dm_alert"));
    DelayCommand(1.5, FloatingTextStringOnCreature(sReel1, oPC));
    DelayCommand(3.0, PlaySound("gui_dm_alert"));
    DelayCommand(3.0, FloatingTextStringOnCreature(sReel2, oPC));
    DelayCommand(4.5, PlaySound("gui_dm_alert"));
    DelayCommand(4.5, FloatingTextStringOnCreature(sReel3, oPC));

    if (iPayout != 0)
    {
        DelayCommand(5.0, GiveGoldToCreature(oPC, iPayout));
        DelayCommand(5.0, PlaySound("it_jewelry"));
        DelayCommand(5.1, AssignCommand(oPC, PlayAnimation(ANIMATION_FIREFORGET_VICTORY2)));
        DelayCommand(5.1, PlayVoiceChat(VOICE_CHAT_CHEER, oPC));
    }

    DelayCommand(5.0, SetUseableFlag(OBJECT_SELF, TRUE));

}

 

 

Hope you can use it.


  • WhiteTiger aime ceci

#6
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

I updated the script above to give the slot machine a slight better payout. 2 horseshoes now gives a payout *1 (you get your money back). This was more in line with the original slot machine as well. And even though over time the odds are that you will still put in more than you get out, this way you at least feel like a winner more often. ;)

I also made a really simple bar game a long time ago and called it "Rolln' 20". Basically just a d20 roll and if you get 20 you win. But the NPC would say something silly for each number you rolled. Calling you a loser, begging you to play again, taunting you, etc. With a one in twenty chance you can make your payout whatever you want so long as it still favors the house. Bet 10 win 50 I think is what I did.


  • WhiteTiger aime ceci