+- +-

+-Shoutbox

View Shout History

+-User

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

+-Stats ezBlock

Members
Total Members: 4
Latest: DeFi FL3X
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 20
Total Topics: 14
Most Online Today: 2
Most Online Ever: 143
(May 03, 2021, 07:40:22 am)
Users Online
Members: 0
Guests: 2
Total: 2

Author Topic: Gamble  (Read 1023 times)

MightyGod141

  • Moderator
  • Newbie
  • *****
  • Posts: 11
  • Everyone likes me I have my own total miner world
    • View Profile

  • Total Badges: 11
Gamble
« on: May 16, 2015, 06:48:25 am »
Script name: menu
//Starting the Gamble script in a menu
Menu[[Gamble 200 Coin][Gamble]]


Script name:Gamble

//This machine has 2 chances of getting something,
//But is infinitely expandable.
If
   HasInventory [player] [goldpieces] [=>] [200]
   IsRandom [5,100] //5% Percent chance of winning
Then
   Inventory [player] [take] [goldpieces] [200]
   Inventory [player] [add] [goldpieces] [5000]
   Notify [You won 5000 Coin! Jackpot!] [local]
   Script [menu]
   Script [Gamble] [cancel]
   //To ensure this was the only thing won, I put the cancel Script.
//Then, If the player didn't win, he would automatically be entered into another.
//This one is not as big as reward though.
Elseif
   HasInventory [player] [goldpieces] [=>] [200]
   IsRandom [10,100] //10% Percent chance of winning
Then
   Inventory [player] [take] [goldpieces] [200]
   Inventory [player] [add] [goldpieces] [1000]
   Notify [You won 1000 Coin!] [local]
   Script [menu]
   Script [Gamble] [cancel]
   //To ensure this was the only thing won, I put the cancel Script.
Else
   Inventory [player] [take] [golspieces] [200]
   Notify [You won nothing.] [local]
   //Now, Im starting the menu script.
   Script [menu]
Endif

« Last Edit: May 16, 2015, 06:51:43 am by MightyGod141 »

Share on Facebook Share on Twitter


 

+-Recent Topics

Gamble by MightyGod141
May 16, 2015, 06:48:25 am

Clan script by mightyspeed97
May 10, 2015, 01:34:07 pm

Update List by MightyGod141
May 05, 2015, 01:28:40 am

2 blocks mine by MightyGod141
April 29, 2015, 11:18:50 am

New Logo by MightyGod141
April 25, 2015, 03:18:04 am

ooi by MightyGod141
March 31, 2015, 05:48:06 am

Clear inventory by MightyGod141
March 31, 2015, 05:44:16 am

Sign animation by mightyspeed97
March 31, 2015, 05:43:56 am

Unlimited uranium by MightyGod141
March 31, 2015, 05:41:38 am

Ranks by MightyGod141
March 30, 2015, 03:17:28 pm