8 activator=Crossfire.WhoIsActivator()
9 activatorname=activator.Name
10 whoami=Crossfire.WhoAmI()
12 slotname=
'%s#%s' %(whoami.Name,whoami.Map.Path)
16 cointype =
"silvercoin"
22 slotlist = [
"Merchant",
"Coin",
"Diamond",
"Imp",
"Devil",
"JackPot"]
26 slotminor = [1, 2, 4, 5, 10, 20]
27 slotmajor = [.10, .15, .20, .30, .5, 1]
34 if (activator.PayAmount(cost)):
36 results = Slots.spin(spinners)
38 pot = Slots.checkslot()
39 activator.Write(
'%s' %results, 7)
42 if results.count(item) == spinners-1:
44 pay = slotminor[slotlist.index(item)]
47 activator.Write(
"%d %ss, a minor win!" %(spinners-1,item))
50 id = Crossfire.CreateObjectByName(cointype)
52 id.InsertInto(activator)
54 message =
"you win %d %s!" %(payoff,cointype)
56 message =
"You win %d %ss!!" %(payoff,cointype)
58 elif results.count(item) == spinners:
60 activator.Write(
'%d %ss, a Major win!' %(spinners,item))
62 pay = slotmajor[slotlist.index(item)]
67 id = Crossfire.CreateObjectByName(cointype)
69 id.InsertInto(activator)
71 message =
"you win %d %s!" %(payoff,cointype)
73 message =
"You win %d %ss!!" %(payoff,cointype)
76 message =
"Better luck next time!"
77 activator.Write(message)
78 activator.Write(
"%d in the Jackpot, Play again?" %Slots.checkslot())
80 activator.Write(
"Sorry, you do not have enough money")