Fix slot machines.

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@5546 282e977c-c81d-0410-88c4-b93c2d0d6712
master
ryo_saeba 2007-02-15 20:15:53 +00:00
parent b45de565e6
commit bc8bf40ba3
5 changed files with 30 additions and 20 deletions

View File

@ -50,8 +50,9 @@ if (object):
activator.Write("%d %ss, a minor win!" %(spinners-1,item))
payoff = cost*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:
@ -66,8 +67,9 @@ if (object):
break
payoff = pot*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:

View File

@ -48,8 +48,9 @@ if (activator.PayAmount(cost*10)):#goldcoin
activator.Write("%d %ss, a minor win!" %(spinners-1,item))
payoff = cost*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:
@ -64,8 +65,9 @@ if (activator.PayAmount(cost*10)):#goldcoin
break
payoff = pot*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:

View File

@ -51,8 +51,9 @@ if (object):
activator.Write("%d %ss, a minor win!" %(spinners-1,item))
payoff = cost*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:
@ -67,8 +68,9 @@ if (object):
break
payoff = pot*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:

View File

@ -48,8 +48,9 @@ if (activator.PayAmount(cost*50)):#platinumcoin
activator.Write("%d %ss, a minor win!" %(spinners-1,item))
payoff = cost*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:
@ -64,8 +65,9 @@ if (activator.PayAmount(cost*50)):#platinumcoin
break
payoff = pot*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:

View File

@ -47,8 +47,9 @@ if (activator.PayAmount(cost)):#silvercoin
activator.Write("%d %ss, a minor win!" %(spinners-1,item))
payoff = cost*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else:
@ -63,8 +64,9 @@ if (activator.PayAmount(cost)):#silvercoin
break
payoff = pot*pay
Slots.payoff(payoff)
id = activator.Map.CreateObject(cointype, x, y)
CFItemBroker.Item(id).add(payoff)
id = Crossfire.CreateObjectByName(cointype)
id.Quantity = payoff
id.InsertInto(activator)
if payoff == 1:
message = "you win %d %s!" %(payoff,cointype)
else: