Author Topic: Games and Casino for Taverns, do you have?  (Read 407 times)

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
Games and Casino for Taverns, do you have?
« on: February 03, 2015, 01:23:12 am »


               

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?



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Games and Casino for Taverns, do you have?
« Reply #1 on: February 03, 2015, 07:57:37 am »


               

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
   



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
Games and Casino for Taverns, do you have?
« Reply #2 on: February 04, 2015, 03:19:06 am »


               

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?



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Games and Casino for Taverns, do you have?
« Reply #3 on: February 04, 2015, 08:24:10 am »


               

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
   



               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Games and Casino for Taverns, do you have?
« Reply #4 on: February 04, 2015, 11:36:54 am »


               

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.



               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Games and Casino for Taverns, do you have?
« Reply #5 on: February 09, 2015, 10:27:08 am »


               

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. '<img'>


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.