10 activator=Crossfire.WhoIsActivator()
11 activatorname=activator.Name
12 whoami=Crossfire.WhoAmI()
14 slotname=
'%s#%s' %(whoami.Name,whoami.Map.Path)
24 slotlist = [
"Silver",
"Gold",
"Platinum",
"Sapphire",
"Emerald",
"Ruby",
"Diamond",
"JackPot"]
27 slotminor = [1, 2, 3, 4, 5, 6, 10, 15]
28 slotmajor = [.1, .15, .25, .30, .40, .50, .60, 1]
34 object = activator.CheckInventory(cointype)
35 if (object)
and not object.Unpaid:
39 results = Slots.spin(spinners)
41 pot = Slots.checkslot()
42 activator.Write(
'%s' %results, 7)
45 if results.count(item) == spinners-1:
47 pay = slotminor[slotlist.index(item)]
50 activator.Write(
"%d %ss, a minor win!" %(spinners-1,item))
53 id = Crossfire.CreateObjectByName(cointype)
55 id.InsertInto(activator)
57 message =
"you win %d %s!" %(payoff,cointype)
59 message =
"You win %d %ss!!" %(payoff,cointype)
61 elif results.count(item) == spinners:
63 activator.Write(
'%d %ss, a Major win!' %(spinners,item))
65 pay = slotmajor[slotlist.index(item)]
70 id = Crossfire.CreateObjectByName(cointype)
72 id.InsertInto(activator)
74 message =
"you win %d %s!" %(payoff,cointype)
76 message =
"You win %d %ss!!" %(payoff,cointype)
79 message =
"Better luck next time!"
80 activator.Write(message)
81 activator.Write(
"%d in the Jackpot, Play again?" %Slots.checkslot())
83 activator.Write(
"Sorry, you do not have enough %ss" %(cointype))
85 activator.Write(
"Sorry, you do not have any %ss" %(cointype))