Author Topic: [Scripts] How to make a slots script  (Read 164 times)

0 Members and 1 Guest are viewing this topic.

BeerWolfe44

  • Fresh Meat
  • *
  • Posts: 4
  • Currently building a town RPG
    • View Profile
    • Awards
  • Xbox: BeerWolfe44
[Scripts] How to make a slots script
« on: December 05, 2016, 06:53:59 PM »
I haven't seen these on the forum and I found out how to make it.
Here it is:


First script
If
HasInventory (player) (goldpieces) (>=) (whatever amount of money or item)
Then
Script(script name)
Inventory (player) (take) (gold pieces) (amount needed)
Else
Notify(your poor) (local)


Second Script
If
Is random (1:3)
Then
Inventory (player) (add) (gold pieces) (100)
Notify (You won $100) (local)
Else if
Is random (1:5)
Then
Inventory (player) (add) (gold pieces) (250)
Notify (You Won $250) (local)
Else
Notify (you lost!) (local)


« Last Edit: December 07, 2016, 01:48:42 PM by BeerWolfe44 »

TheDestinedCrab

  • Legendary Member
  • *****
  • Posts: 1277
  • Did you see that? Me neither.
  • Awards 3 years on site+600 posts Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
Re: How to make a slots script
« Reply #1 on: December 06, 2016, 01:46:54 AM »
I haven't seen these on the forum and I found out how to make it.
Here it is:


First script
If
HasInventory [player] (goldpieces) (>=) (whatever amount of money or item)
Then
Script(script name)
Inventory [player] (take) (gold pieces) (amount needed)
Else
Notify(your poor) (local)


Second Script
If
Is random (1:3)
Then
Inventory [player] (add) (gold pieces) (100)
Else if
Is random (1:5)
Then
Inventory [player] (add) (gold pieces) (250)
Else if
Then
Is random (1:5)
Else

Notify (you lost!) (local)
You might want to correct that to

ElseIf
IsRandom [1:5]
Then
Inventory [player] [add] [goldpieces] [500]

And then just add in the yellow.
Thanks Gold Knight for the amazing sig!

crazytater94

  • Supreme Member
  • *****
  • Posts: 2556
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members Members who have unlocked the robotic avatar 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: How to make a slots script
« Reply #2 on: December 06, 2016, 07:40:56 PM »
Me and Sora1kg made a slot script a few no this ago, where it used HUDs to draw out the reels and machine. It broke because of some script changes with the last few updates, and I've been to busy to fix it...

I should though