Fix checking by adding template to IPO storage.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@18886 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
de60ca2d56
commit
e9217fa751
|
@ -1,14 +1,14 @@
|
||||||
arch map
|
arch map
|
||||||
name IPO storage room
|
name IPO Storage Room
|
||||||
difficulty 1
|
difficulty 1
|
||||||
region scorn
|
region creation
|
||||||
width 5
|
width 6
|
||||||
height 5
|
height 5
|
||||||
enter_x 2
|
enter_x 2
|
||||||
enter_y 2
|
enter_y 2
|
||||||
msg
|
msg
|
||||||
Created: 2005-09-29
|
Created: 2005-09-29
|
||||||
Modified: 2008-09-20 Rick Tanner
|
Modified: 2013-08-04 Kevin Zheng
|
||||||
endmsg
|
endmsg
|
||||||
end
|
end
|
||||||
arch grass
|
arch grass
|
||||||
|
@ -134,3 +134,29 @@ arch grass
|
||||||
x 4
|
x 4
|
||||||
y 4
|
y 4
|
||||||
end
|
end
|
||||||
|
arch checkbook
|
||||||
|
name check book
|
||||||
|
race gold and jewels
|
||||||
|
msg
|
||||||
|
This is your check book. Don't let your identity be stolen!
|
||||||
|
endmsg
|
||||||
|
x 5
|
||||||
|
type 122
|
||||||
|
value 0
|
||||||
|
identified 1
|
||||||
|
arch bankcard
|
||||||
|
name blank check
|
||||||
|
name_pl blank checks
|
||||||
|
msg
|
||||||
|
Pay to the order of:
|
||||||
|
endmsg
|
||||||
|
nrof 100
|
||||||
|
value 0
|
||||||
|
weight 1
|
||||||
|
identified 1
|
||||||
|
arch event_drop
|
||||||
|
title Python
|
||||||
|
slaying /python/IPO/checks.py
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -570,28 +570,27 @@ def cmd_checks():
|
||||||
bank.deposit(activatorname, 100)
|
bank.deposit(activatorname, 100)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Create an IPO package but don't mail it until we're ready.
|
# Create a check based on a template in the IPO storage map.
|
||||||
package = activator.Map.CreateObject('package', 1, 1)
|
checkbook = mailmap.ObjectAt(5, 0)
|
||||||
package.Name = "IPO-package F: The-Imperial-Bank-of-Skud T: %s" \
|
|
||||||
% activator.Name
|
|
||||||
|
|
||||||
# Create a check based on a template in the bank map.
|
if checkbook is None:
|
||||||
check = mailmap.ObjectAt(int(5), int(0))
|
|
||||||
|
|
||||||
if check is None:
|
|
||||||
whoami.Say("Hmm... I can't seem find my checkbook press... " \
|
whoami.Say("Hmm... I can't seem find my checkbook press... " \
|
||||||
"Your payment has been refunded.")
|
"Your payment has been refunded.")
|
||||||
bank.deposit(activatorname, 100)
|
bank.deposit(activatorname, 100)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Mail the package.
|
# Create and mail an IPO package to the player.
|
||||||
|
package = activator.Map.CreateObject('package', 1, 1)
|
||||||
|
package.Name = "IPO-package F: The-Imperial-Bank-of-Skud T: %s" \
|
||||||
|
% activator.Name
|
||||||
|
|
||||||
package.Teleport(mailmap, 2, 2)
|
package.Teleport(mailmap, 2, 2)
|
||||||
|
|
||||||
check.Name = str(activator.Name + "'s Checkbook")
|
checkbook.Name = activator.Name + "'s Checkbook"
|
||||||
cheques = check.CheckArchInventory('bankcard')
|
checks = checkbook.CheckArchInventory('bankcard')
|
||||||
cheques.Name = str(activator.Name + "'s Check")
|
checks.Name = activator.Name + "'s Check"
|
||||||
cheques.NamePl = str(activator.Name + "'s Checks")
|
checks.NamePl = activator.Name + "'s Checks"
|
||||||
chequenew = check.InsertInto(package)
|
chequenew = checkbook.InsertInto(package)
|
||||||
|
|
||||||
message = "Your checks have been mailed. Thank you!"
|
message = "Your checks have been mailed. Thank you!"
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue