So since eoserv has been really good to me I've decided to release one of my quest's to the community. It's a casino where players can bet "gold" an either win or lose.
In order to use this quest you will need to edit it. Since my server doesn't use "gold" to bet it uses "game tokens" you'll want to replace where you find "73" with "1" so that the game will use "gold" or you can make your own "game token" system an use that I more then likely won't share that as
it's kinda buggy right now but it's fairly easy to get working if you know how to use EO+ :) anyways without further info here is the quest.
**Can someone please put this in a code format I am unsure how to do it**
//Casino Royal
main
{
questname "Casino Royal"
version 1.0
}
state begin
{
desc "Casino Royal"
Action AddNpcText ( 6, "Hello there! I am the Casino Royal game master!");
Action AddNpcText ( 6, "In order to play you will need at a minimum of 100 Game Tokens to place bets");
Action AddNpcText ( 6, "Do you have 100 Game Tokens?");
Action AddNpcInput ( 6, 1, "Yes");
Action AddNpcInput ( 6, 2, "No");
rule InputNpc (1) goto Yes
rule InputNpc (2) goto No
}
state Yes
{
desc "Casino Royal"
rule GotItems (73, 100) goto Yes2
rule LostItems(73, 100) goto NotEnough
}
state NotEnough
{
desc "Casino Royal"
Action ShowHint ("You don't have enough gold come back when you do!");
Action reset();
}
state No
{
desc "Casino Royal"
Action ShowHint ("You have aborted betting");
Action Reset();
}
state Yes2
{
desc "Casino Royal"
Action AddNpcText ( 6, "Great! You have enough Game Tokens to place a minumum bet!");
Action AddNpcText ( 6, "How much would you like to bet?");
Action AddNpcInput ( 6, 1, "100gt");
Action AddNpcInput ( 6, 2, "200gt");
Action AddNpcInput ( 6, 3, "300gt");
rule InputNpc (1) goto Bet100
rule InputNpc (2) goto Bet200
rule InputNpc (3) goto Bet300
}
state Bet100
{
rule GotItems(1, 100) goto rollbet1
rule LostItems(1, 100) reset()
}
state Bet200
{
rule GotItems (73, 200) goto rollbet2
rule LostItems(73, 200) reset()
}
state Bet300
{
rule GotItems (73, 300) goto rollbet3
rule LostItems(73, 300) reset()
}
state rollbet1
{
desc "Casino Royal: Betting 100g"
Action RemoveItem(73, 100);
Action roll(4)
rule rolled(1) goto Lose
rule rolled(2) goto Winsmall
rule rolled(3) goto Lose
rule rolled(4) goto Lose
}
state rollbet2
{
desc "Casino Royal: Betting 200g"
Action RemoveItem(73, 200);
Action roll(4)
rule rolled(1) goto Lose
rule rolled(2) goto Lose
rule rolled(3) goto Winsmall
rule rolled(4) goto Lose
}
state rollbet3
{
desc "Casino Royal: Betting 300g"
Action RemoveItem(73, 300);
Action roll(4)
rule rolled(1) goto Winsmall
rule rolled(2) goto Lose
rule rolled(3) goto WinBig
rule rolled(4) goto Lose
}
state Winsmall
{
desc "You've won 10g!"
Action GiveItem(73, 70)
Action AddNpcText( 6, "You won 70gt! Congrats!");
Action AddNpcInput ( 6, 1, "Play Again");
Action AddNpcInput ( 6, 2, "Thanks");
rule InputNpc(1) goto begin
rule InputNpc (2) reset()
}
state Lose
{
desc "You've lost!"
Action AddNpcText ( 6, "Sorry you didn't win anything");
Action AddNpcInput ( 6, 1, "Play Again");
Action AddNpcInput ( 6, 2, "Thanks");
rule InputNpc(1) goto begin
rule InputNpc (2) reset()
}
state Winbig
{
desc "You won 400g!"
Action AddNpcText ( 6, "You've won the jackpot!!");
Action GiveItem(73, 1000);
Action AddNpcInput ( 6, 1, "Play Again");
Action AddNpcInput ( 6, 2, "Thanks");
rule InputNpc(1) goto begin
rule InputNpc (2) reset()
}
Please also be aware that if your going to use this I ask for some credit any issues please let me know I'll help if I can :)