diff --git a/unlinked/casino/CFGamble.py b/unlinked/casino/CFGamble.py new file mode 100755 index 000000000..febb31c70 --- /dev/null +++ b/unlinked/casino/CFGamble.py @@ -0,0 +1,49 @@ +#CFGamble +# Todd Mitchell +#The Python control file for Slot Machines and other such nonsense +#Please do not put CFPython functions in this file, +#but rather place these in the calling file +import os.path +import shelve +import random + +class SlotMachine: + #sets up the file that holds all the slotmachine jackpots + #make sure this points to your writable var/crossfire directory + #you can delete that file to reset all the slotmachine jackpots + slotfile = '/usr/local/CF/var/crossfire/SlotMachine_file' + slotdb = {} + def __init__(self,slotname,slotlist,minpot,maxpot): + slotdb = shelve.open(self.slotfile) + self.slotname = slotname + self.slotlist = slotlist + self.minpot = minpot + self.maxpot = maxpot + + def placebet(self,amount): + if not self.slotdb.has_key(self.slotname): + self.slotdb[self.slotname] = self.minpot+amount + else: + temp=self.slotdb[self.slotname] + self.slotdb[self.slotname]=temp+amount + + def payoff(self,amount): + temp=self.slotdb[self.slotname] + self.slotdb[self.slotname] = temp-amount + + def spin(self,slotnum): + result=[] + while slotnum >=1: + r = self.slotlist[random.randint(0,len(self.slotlist)-1)] + result.append(r) + slotnum=slotnum-1 + return result + + def checkslot(self): + limit = self.slotdb[self.slotname] + if limit >= self.maxpot: + self.slotdb[self.slotname] = self.maxpot + elif limit < self.minpot: + self.slotdb[self.slotname] = self.minpot + return self.slotdb[self.slotname] + diff --git a/unlinked/casino/README b/unlinked/casino/README new file mode 100755 index 000000000..0ce4e79d3 --- /dev/null +++ b/unlinked/casino/README @@ -0,0 +1,6 @@ +Casino (well so far only slotmachines) + +You will need the Python Plugin running (I've only tested on 2.1 or better however). +Copy CFGamble.py to your /maps/python directory +Make sure you change the path where it will write the jackpots to your /var/crossfire directory +Modify the map links of the slotmachines to point to where your slotmachine scripts are and your slotmachine scripts to point to CFGamble.py diff --git a/unlinked/casino/casino_infernal b/unlinked/casino/casino_infernal new file mode 100755 index 000000000..6e2959b75 --- /dev/null +++ b/unlinked/casino/casino_infernal @@ -0,0 +1,2752 @@ +arch map +name Casino Rama +msg +Creator: CF Java Map Editor +Date: 1/18/2003 +endmsg +width 20 +height 17 +end +arch dungeon_magic +end +arch woodfloor +end +arch awall_2_2_2 +end +arch dungeon_magic +y 1 +end +arch woodfloor +y 1 +end +arch awall_2_1_1 +y 1 +end +arch dungeon_magic +y 2 +end +arch woodfloor +y 2 +end +arch awall_2_1_1 +y 2 +end +arch dungeon_magic +y 3 +end +arch woodfloor +y 3 +end +arch awall_2_1_1 +y 3 +end +arch dungeon_magic +y 4 +end +arch woodfloor +y 4 +end +arch awall_2_1_1 +y 4 +end +arch dungeon_magic +y 5 +end +arch woodfloor +y 5 +end +arch awall_2_1_1 +y 5 +end +arch dungeon_magic +y 6 +end +arch woodfloor +y 6 +end +arch awall_2_1_1 +y 6 +end +arch dungeon_magic +y 7 +end +arch woodfloor +y 7 +end +arch awall_2_1_1 +y 7 +end +arch dungeon_magic +y 8 +end +arch woodfloor +y 8 +end +arch awall_2_1_1 +y 8 +end +arch dungeon_magic +y 9 +end +arch woodfloor +y 9 +end +arch awall_2_1_1 +y 9 +end +arch dungeon_magic +y 10 +end +arch woodfloor +y 10 +end +arch awall_2_1_1 +y 10 +end +arch dungeon_magic +y 11 +end +arch woodfloor +y 11 +end +arch awall_2_1_1 +y 11 +end +arch dungeon_magic +y 12 +end +arch woodfloor +y 12 +end +arch awall_2_1_1 +y 12 +end +arch dungeon_magic +y 13 +end +arch woodfloor +y 13 +end +arch awall_2_1_1 +y 13 +end +arch dungeon_magic +y 14 +end +arch woodfloor +y 14 +end +arch awall_2_1_1 +y 14 +end +arch dungeon_magic +y 15 +end +arch woodfloor +y 15 +end +arch awall_2_1_1 +y 15 +end +arch dungeon_magic +y 16 +end +arch woodfloor +y 16 +end +arch awall_2_2_1 +y 16 +end +arch dungeon_magic +x 1 +end +arch woodfloor +x 1 +end +arch awall_2_1_2 +x 1 +end +arch dungeon_magic +x 1 +y 1 +end +arch woodfloor +x 1 +y 1 +end +arch dungeon_magic +x 1 +y 2 +end +arch woodfloor +x 1 +y 2 +end +arch dungeon_magic +x 1 +y 3 +end +arch woodfloor +x 1 +y 3 +end +arch dungeon_magic +x 1 +y 4 +end +arch woodfloor +x 1 +y 4 +end +arch dungeon_magic +x 1 +y 5 +end +arch woodfloor +x 1 +y 5 +end +arch dungeon_magic +x 1 +y 6 +end +arch woodfloor +x 1 +y 6 +end +arch dungeon_magic +x 1 +y 7 +end +arch woodfloor +x 1 +y 7 +end +arch dungeon_magic +x 1 +y 8 +end +arch woodfloor +x 1 +y 8 +end +arch slotmachine3 +name #7 +msg +Drop a platinum coin to play. +endmsg +title Slot +event_apply_plugin Python +event_apply /unlinked/casino/platinumslots.py +x 1 +y 8 +end +arch dungeon_magic +x 1 +y 9 +end +arch woodfloor +x 1 +y 9 +end +arch dungeon_magic +x 1 +y 10 +end +arch woodfloor +x 1 +y 10 +end +arch slotmachine3 +name #4 +msg +Drop a gold coin to play. +endmsg +event_apply_plugin Python +event_apply /unlinked/casino/goldslots.py +title Slot +x 1 +y 10 +end +arch dungeon_magic +x 1 +y 11 +end +arch woodfloor +x 1 +y 11 +end +arch dungeon_magic +x 1 +y 12 +end +arch woodfloor +x 1 +y 12 +end +arch slotmachine3 +name #1 +msg +Drop a silver coin to play. +endmsg +title Slot +event_apply_plugin Python +event_apply /unlinked/casino/silverslots.py +x 1 +y 12 +end +arch dungeon_magic +x 1 +y 13 +end +arch woodfloor +x 1 +y 13 +end +arch dungeon_magic +x 1 +y 14 +end +arch woodfloor +x 1 +y 14 +end +arch dungeon_magic +x 1 +y 15 +end +arch woodfloor +x 1 +y 15 +end +arch booze_table +name serving booze (5 g.c @) +food 5 +x 1 +y 15 +end +arch dungeon_magic +x 1 +y 16 +end +arch woodfloor +x 1 +y 16 +end +arch awall_2_1_2 +x 1 +y 16 +end +arch dungeon_magic +x 2 +end +arch woodfloor +x 2 +end +arch awall_2_1_2 +x 2 +end +arch dungeon_magic +x 2 +y 1 +end +arch woodfloor +x 2 +y 1 +end +arch dungeon_magic +x 2 +y 2 +end +arch woodfloor +x 2 +y 2 +end +arch dungeon_magic +x 2 +y 3 +end +arch woodfloor +x 2 +y 3 +end +arch dungeon_magic +x 2 +y 4 +end +arch woodfloor +x 2 +y 4 +end +arch dungeon_magic +x 2 +y 5 +end +arch woodfloor +x 2 +y 5 +end +arch dungeon_magic +x 2 +y 6 +end +arch woodfloor +x 2 +y 6 +end +arch dungeon_magic +x 2 +y 7 +end +arch woodfloor +x 2 +y 7 +end +arch dungeon_magic +x 2 +y 8 +end +arch woodfloor +x 2 +y 8 +end +arch slotmachine2 +name #8 +msg +Drop a platinum coin to play. +endmsg +title Slot +event_apply_plugin Python +event_apply /unlinked/casino/platinumslots.py +x 2 +y 8 +end +arch dungeon_magic +x 2 +y 9 +end +arch woodfloor +x 2 +y 9 +end +arch dungeon_magic +x 2 +y 10 +end +arch woodfloor +x 2 +y 10 +end +arch slotmachine2 +name #5 +msg +Drop a gold coin to play. +endmsg +title Slot +event_apply_plugin Python +event_apply /unlinked/casino/goldslots.py +x 2 +y 10 +end +arch dungeon_magic +x 2 +y 11 +end +arch woodfloor +x 2 +y 11 +end +arch dungeon_magic +x 2 +y 12 +end +arch woodfloor +x 2 +y 12 +end +arch slotmachine2 +name #2 +msg +Drop a silver coin to play. +endmsg +title Slot +event_apply_plugin Python +event_apply /unlinked/casino/silverslots.py +x 2 +y 12 +end +arch dungeon_magic +x 2 +y 13 +end +arch woodfloor +x 2 +y 13 +end +arch dungeon_magic +x 2 +y 14 +end +arch woodfloor +x 2 +y 14 +end +arch dungeon_magic +x 2 +y 15 +end +arch woodfloor +x 2 +y 15 +end +arch booze_table +name serving booze (5 g.c @) +food 5 +x 2 +y 15 +end +arch dungeon_magic +x 2 +y 16 +end +arch woodfloor +x 2 +y 16 +end +arch awall_2_1_2 +x 2 +y 16 +end +arch dungeon_magic +x 3 +end +arch woodfloor +x 3 +end +arch awall_2_1_2 +x 3 +end +arch dungeon_magic +x 3 +y 1 +end +arch woodfloor +x 3 +y 1 +end +arch dungeon_magic +x 3 +y 2 +end +arch woodfloor +x 3 +y 2 +end +arch dungeon_magic +x 3 +y 3 +end +arch woodfloor +x 3 +y 3 +end +arch dungeon_magic +x 3 +y 4 +end +arch woodfloor +x 3 +y 4 +end +arch dungeon_magic +x 3 +y 5 +end +arch woodfloor +x 3 +y 5 +end +arch dungeon_magic +x 3 +y 6 +end +arch woodfloor +x 3 +y 6 +end +arch dungeon_magic +x 3 +y 7 +end +arch woodfloor +x 3 +y 7 +end +arch dungeon_magic +x 3 +y 8 +end +arch woodfloor +x 3 +y 8 +end +arch slotmachine1 +name #9 +msg +Drop a platinum coin to play. +endmsg +title Slot +event_apply_plugin Python +event_apply /unlinked/casino/platinumslots.py +x 3 +y 8 +end +arch dungeon_magic +x 3 +y 9 +end +arch woodfloor +x 3 +y 9 +end +arch dungeon_magic +x 3 +y 10 +end +arch woodfloor +x 3 +y 10 +end +arch slotmachine1 +name #6 +msg +Drop a gold coin to play. +endmsg +title Slot +event_apply_plugin Python +event_apply /unlinked/casino/goldslots.py +x 3 +y 10 +end +arch dungeon_magic +x 3 +y 11 +end +arch woodfloor +x 3 +y 11 +end +arch dungeon_magic +x 3 +y 12 +end +arch woodfloor +x 3 +y 12 +end +arch slotmachine1 +name #3 +msg +Drop a silver coin to play. +endmsg +title Slot +event_apply_plugin Python +event_apply /unlinked/casino/silverslots.py +x 3 +y 12 +end +arch dungeon_magic +x 3 +y 13 +end +arch woodfloor +x 3 +y 13 +end +arch dungeon_magic +x 3 +y 14 +end +arch woodfloor +x 3 +y 14 +end +arch dungeon_magic +x 3 +y 15 +end +arch woodfloor +x 3 +y 15 +end +arch dungeon_magic +x 3 +y 16 +end +arch woodfloor +x 3 +y 16 +end +arch awall_2_1_2 +x 3 +y 16 +end +arch dungeon_magic +x 4 +end +arch woodfloor +x 4 +end +arch awall_2_1_2 +x 4 +end +arch dungeon_magic +x 4 +y 1 +end +arch woodfloor +x 4 +y 1 +end +arch dungeon_magic +x 4 +y 2 +end +arch woodfloor +x 4 +y 2 +end +arch dungeon_magic +x 4 +y 3 +end +arch woodfloor +x 4 +y 3 +end +arch dungeon_magic +x 4 +y 4 +end +arch woodfloor +x 4 +y 4 +end +arch dungeon_magic +x 4 +y 5 +end +arch woodfloor +x 4 +y 5 +end +arch dungeon_magic +x 4 +y 6 +end +arch woodfloor +x 4 +y 6 +end +arch dungeon_magic +x 4 +y 7 +end +arch woodfloor +x 4 +y 7 +end +arch dungeon_magic +x 4 +y 8 +end +arch woodfloor +x 4 +y 8 +end +arch dungeon_magic +x 4 +y 9 +end +arch woodfloor +x 4 +y 9 +end +arch dungeon_magic +x 4 +y 10 +end +arch woodfloor +x 4 +y 10 +end +arch dungeon_magic +x 4 +y 11 +end +arch woodfloor +x 4 +y 11 +end +arch dungeon_magic +x 4 +y 12 +end +arch woodfloor +x 4 +y 12 +end +arch dungeon_magic +x 4 +y 13 +end +arch woodfloor +x 4 +y 13 +end +arch dungeon_magic +x 4 +y 14 +end +arch woodfloor +x 4 +y 14 +end +arch dungeon_magic +x 4 +y 15 +end +arch woodfloor +x 4 +y 15 +end +arch silver_converter +name convert silver into gold (11:1) +food 11 +x 4 +y 15 +end +arch dungeon_magic +x 4 +y 16 +end +arch woodfloor +x 4 +y 16 +end +arch awall_2_1_2 +x 4 +y 16 +end +arch dungeon_magic +x 5 +end +arch woodfloor +x 5 +end +arch awall_2_1_2 +x 5 +end +arch dungeon_magic +x 5 +y 1 +end +arch woodfloor +x 5 +y 1 +end +arch dungeon_magic +x 5 +y 2 +end +arch woodfloor +x 5 +y 2 +end +arch dungeon_magic +x 5 +y 3 +end +arch woodfloor +x 5 +y 3 +end +arch dungeon_magic +x 5 +y 4 +end +arch woodfloor +x 5 +y 4 +end +arch dungeon_magic +x 5 +y 5 +end +arch woodfloor +x 5 +y 5 +end +arch dungeon_magic +x 5 +y 6 +end +arch woodfloor +x 5 +y 6 +end +arch dungeon_magic +x 5 +y 7 +end +arch woodfloor +x 5 +y 7 +end +arch dungeon_magic +x 5 +y 8 +end +arch woodfloor +x 5 +y 8 +end +arch sign_w +msg +The Platinum Slots + +Cost: one platinum coin +endmsg +x 5 +y 8 +end +arch dungeon_magic +x 5 +y 9 +end +arch woodfloor +x 5 +y 9 +end +arch dungeon_magic +x 5 +y 10 +end +arch woodfloor +x 5 +y 10 +end +arch sign_w +msg +The Gold Slots + +Cost: one gold coin +endmsg +x 5 +y 10 +end +arch dungeon_magic +x 5 +y 11 +end +arch woodfloor +x 5 +y 11 +end +arch dungeon_magic +x 5 +y 12 +end +arch woodfloor +x 5 +y 12 +end +arch sign_w +msg +The Silver Slots + +Cost: 1 silver coin +endmsg +x 5 +y 12 +end +arch dungeon_magic +x 5 +y 13 +end +arch woodfloor +x 5 +y 13 +end +arch dungeon_magic +x 5 +y 14 +end +arch woodfloor +x 5 +y 14 +end +arch dungeon_magic +x 5 +y 15 +end +arch woodfloor +x 5 +y 15 +end +arch gold_converter +name convert gold into platinum (6:1) +food 6 +x 5 +y 15 +end +arch dungeon_magic +x 5 +y 16 +end +arch woodfloor +x 5 +y 16 +end +arch awall_2_1_2 +x 5 +y 16 +end +arch dungeon_magic +x 6 +end +arch woodfloor +x 6 +end +arch awall_2_1_2 +x 6 +end +arch dungeon_magic +x 6 +y 1 +end +arch woodfloor +x 6 +y 1 +end +arch slevel_2_2_2 +no_pass 1 +x 6 +y 1 +end +arch dungeon_magic +x 6 +y 2 +end +arch woodfloor +x 6 +y 2 +end +arch slevel_3_2 +no_pass 1 +x 6 +y 2 +end +arch dungeon_magic +x 6 +y 3 +end +arch woodfloor +x 6 +y 3 +end +arch slevel_2_2_1 +no_pass 1 +x 6 +y 3 +end +arch dungeon_magic +x 6 +y 4 +end +arch woodfloor +x 6 +y 4 +end +arch dungeon_magic +x 6 +y 5 +end +arch woodfloor +x 6 +y 5 +end +arch dungeon_magic +x 6 +y 6 +end +arch woodfloor +x 6 +y 6 +end +arch dungeon_magic +x 6 +y 7 +end +arch woodfloor +x 6 +y 7 +end +arch dungeon_magic +x 6 +y 8 +end +arch woodfloor +x 6 +y 8 +end +arch dungeon_magic +x 6 +y 9 +end +arch woodfloor +x 6 +y 9 +end +arch dungeon_magic +x 6 +y 10 +end +arch woodfloor +x 6 +y 10 +end +arch dungeon_magic +x 6 +y 11 +end +arch woodfloor +x 6 +y 11 +end +arch dungeon_magic +x 6 +y 12 +end +arch woodfloor +x 6 +y 12 +end +arch dungeon_magic +x 6 +y 13 +end +arch woodfloor +x 6 +y 13 +end +arch dungeon_magic +x 6 +y 14 +end +arch woodfloor +x 6 +y 14 +end +arch dungeon_magic +x 6 +y 15 +end +arch woodfloor +x 6 +y 15 +end +arch dungeon_magic +x 6 +y 16 +end +arch woodfloor +x 6 +y 16 +end +arch awall_2_1_2 +x 6 +y 16 +end +arch dungeon_magic +x 7 +end +arch woodfloor +x 7 +end +arch awall_2_1_2 +x 7 +end +arch dungeon_magic +x 7 +y 1 +end +arch woodfloor +x 7 +y 1 +end +arch slevel_3_3 +x 7 +y 1 +end +arch dungeon_magic +x 7 +y 2 +end +arch woodfloor +x 7 +y 2 +end +arch slevel_4 +x 7 +y 2 +end +arch dancing_girl +x 7 +y 2 +end +arch dungeon_magic +x 7 +y 3 +end +arch woodfloor +x 7 +y 3 +end +arch slevel_3_1 +no_pass 1 +x 7 +y 3 +end +arch dungeon_magic +x 7 +y 4 +end +arch woodfloor +x 7 +y 4 +end +arch dungeon_magic +x 7 +y 5 +end +arch woodfloor +x 7 +y 5 +end +arch dungeon_magic +x 7 +y 6 +end +arch woodfloor +x 7 +y 6 +end +arch dungeon_magic +x 7 +y 7 +end +arch woodfloor +x 7 +y 7 +end +arch dungeon_magic +x 7 +y 8 +end +arch woodfloor +x 7 +y 8 +end +arch dungeon_magic +x 7 +y 9 +end +arch woodfloor +x 7 +y 9 +end +arch dungeon_magic +x 7 +y 10 +end +arch woodfloor +x 7 +y 10 +end +arch dungeon_magic +x 7 +y 11 +end +arch woodfloor +x 7 +y 11 +end +arch dungeon_magic +x 7 +y 12 +end +arch woodfloor +x 7 +y 12 +end +arch dungeon_magic +x 7 +y 13 +end +arch woodfloor +x 7 +y 13 +end +arch dungeon_magic +x 7 +y 14 +end +arch woodfloor +x 7 +y 14 +end +arch dungeon_magic +x 7 +y 15 +end +arch woodfloor +x 7 +y 15 +end +arch diamond_converter +name drop platinum to buy diamonds (9:1) +slaying platinacoin +food 9 +x 7 +y 15 +end +arch dungeon_magic +x 7 +y 16 +end +arch woodfloor +x 7 +y 16 +end +arch awall_2_1_2 +x 7 +y 16 +end +arch dungeon_magic +x 8 +end +arch woodfloor +x 8 +end +arch awall_2_1_2 +x 8 +end +arch dungeon_magic +x 8 +y 1 +end +arch woodfloor +x 8 +y 1 +end +arch slevel_3_3 +x 8 +y 1 +end +arch dungeon_magic +x 8 +y 2 +end +arch woodfloor +x 8 +y 2 +end +arch slevel_4 +x 8 +y 2 +end +arch dungeon_magic +x 8 +y 3 +end +arch woodfloor +x 8 +y 3 +end +arch slevel_3_1 +no_pass 1 +x 8 +y 3 +end +arch dungeon_magic +x 8 +y 4 +end +arch woodfloor +x 8 +y 4 +end +arch dungeon_magic +x 8 +y 5 +end +arch woodfloor +x 8 +y 5 +end +arch dungeon_magic +x 8 +y 6 +end +arch woodfloor +x 8 +y 6 +end +arch dungeon_magic +x 8 +y 7 +end +arch woodfloor +x 8 +y 7 +end +arch dungeon_magic +x 8 +y 8 +end +arch woodfloor +x 8 +y 8 +end +arch dungeon_magic +x 8 +y 9 +end +arch woodfloor +x 8 +y 9 +end +arch dungeon_magic +x 8 +y 10 +end +arch woodfloor +x 8 +y 10 +end +arch dungeon_magic +x 8 +y 11 +end +arch woodfloor +x 8 +y 11 +end +arch dungeon_magic +x 8 +y 12 +end +arch woodfloor +x 8 +y 12 +end +arch dungeon_magic +x 8 +y 13 +end +arch woodfloor +x 8 +y 13 +end +arch dungeon_magic +x 8 +y 14 +end +arch woodfloor +x 8 +y 14 +end +arch dungeon_magic +x 8 +y 15 +end +arch woodfloor +x 8 +y 15 +end +arch dungeon_magic +x 8 +y 16 +end +arch woodfloor +x 8 +y 16 +end +arch awall_2_1_2 +x 8 +y 16 +end +arch dungeon_magic +x 9 +end +arch woodfloor +x 9 +end +arch awall_2_1_2 +x 9 +end +arch dungeon_magic +x 9 +y 1 +end +arch woodfloor +x 9 +y 1 +end +arch slevel_3_3 +x 9 +y 1 +end +arch dungeon_magic +x 9 +y 2 +end +arch woodfloor +x 9 +y 2 +end +arch slevel_4 +x 9 +y 2 +end +arch dungeon_magic +x 9 +y 3 +end +arch woodfloor +x 9 +y 3 +end +arch slevel_3_1 +no_pass 1 +x 9 +y 3 +end +arch dungeon_magic +x 9 +y 4 +end +arch woodfloor +x 9 +y 4 +end +arch dungeon_magic +x 9 +y 5 +end +arch woodfloor +x 9 +y 5 +end +arch dungeon_magic +x 9 +y 6 +end +arch woodfloor +x 9 +y 6 +end +arch dungeon_magic +x 9 +y 7 +end +arch woodfloor +x 9 +y 7 +end +arch dungeon_magic +x 9 +y 8 +end +arch woodfloor +x 9 +y 8 +end +arch dungeon_magic +x 9 +y 9 +end +arch woodfloor +x 9 +y 9 +end +arch dungeon_magic +x 9 +y 10 +end +arch woodfloor +x 9 +y 10 +end +arch dungeon_magic +x 9 +y 11 +end +arch woodfloor +x 9 +y 11 +end +arch dungeon_magic +x 9 +y 12 +end +arch woodfloor +x 9 +y 12 +end +arch dungeon_magic +x 9 +y 13 +end +arch woodfloor +x 9 +y 13 +end +arch dungeon_magic +x 9 +y 14 +end +arch woodfloor +x 9 +y 14 +end +arch dungeon_magic +x 9 +y 15 +end +arch woodfloor +x 9 +y 15 +end +arch dungeon_magic +x 9 +y 16 +end +arch woodfloor +x 9 +y 16 +end +arch awall_2_1_2 +x 9 +y 16 +end +arch dungeon_magic +x 10 +end +arch woodfloor +x 10 +end +arch awall_2_1_2 +x 10 +end +arch dungeon_magic +x 10 +y 1 +end +arch woodfloor +x 10 +y 1 +end +arch slevel_3_3 +x 10 +y 1 +end +arch dungeon_magic +x 10 +y 2 +end +arch woodfloor +x 10 +y 2 +end +arch slevel_4 +x 10 +y 2 +end +arch dancing_girl +x 10 +y 2 +end +arch dungeon_magic +x 10 +y 3 +end +arch woodfloor +x 10 +y 3 +end +arch slevel_3_1 +no_pass 1 +x 10 +y 3 +end +arch dungeon_magic +x 10 +y 4 +end +arch woodfloor +x 10 +y 4 +end +arch dungeon_magic +x 10 +y 5 +end +arch woodfloor +x 10 +y 5 +end +arch dungeon_magic +x 10 +y 6 +end +arch woodfloor +x 10 +y 6 +end +arch dungeon_magic +x 10 +y 7 +end +arch woodfloor +x 10 +y 7 +end +arch dungeon_magic +x 10 +y 8 +end +arch woodfloor +x 10 +y 8 +end +arch dungeon_magic +x 10 +y 9 +end +arch woodfloor +x 10 +y 9 +end +arch dungeon_magic +x 10 +y 10 +end +arch woodfloor +x 10 +y 10 +end +arch dungeon_magic +x 10 +y 11 +end +arch woodfloor +x 10 +y 11 +end +arch dungeon_magic +x 10 +y 12 +end +arch woodfloor +x 10 +y 12 +end +arch dungeon_magic +x 10 +y 13 +end +arch woodfloor +x 10 +y 13 +end +arch dungeon_magic +x 10 +y 14 +end +arch woodfloor +x 10 +y 14 +end +arch dungeon_magic +x 10 +y 15 +end +arch woodfloor +x 10 +y 15 +end +arch dungeon_magic +x 10 +y 16 +end +arch woodfloor +x 10 +y 16 +end +arch awall_2_1_2 +x 10 +y 16 +end +arch dungeon_magic +x 11 +end +arch woodfloor +x 11 +end +arch awall_2_1_2 +x 11 +end +arch dungeon_magic +x 11 +y 1 +end +arch woodfloor +x 11 +y 1 +end +arch slevel_2_2_3 +no_pass 1 +x 11 +y 1 +end +arch dungeon_magic +x 11 +y 2 +end +arch woodfloor +x 11 +y 2 +end +arch slevel_3_4 +no_pass 1 +x 11 +y 2 +end +arch dungeon_magic +x 11 +y 3 +end +arch woodfloor +x 11 +y 3 +end +arch slevel_2_2_4 +no_pass 1 +x 11 +y 3 +end +arch dungeon_magic +x 11 +y 4 +end +arch woodfloor +x 11 +y 4 +end +arch dungeon_magic +x 11 +y 5 +end +arch woodfloor +x 11 +y 5 +end +arch dungeon_magic +x 11 +y 6 +end +arch woodfloor +x 11 +y 6 +end +arch dungeon_magic +x 11 +y 7 +end +arch woodfloor +x 11 +y 7 +end +arch dungeon_magic +x 11 +y 8 +end +arch woodfloor +x 11 +y 8 +end +arch dungeon_magic +x 11 +y 9 +end +arch woodfloor +x 11 +y 9 +end +arch dungeon_magic +x 11 +y 10 +end +arch woodfloor +x 11 +y 10 +end +arch dungeon_magic +x 11 +y 11 +end +arch woodfloor +x 11 +y 11 +end +arch dungeon_magic +x 11 +y 12 +end +arch woodfloor +x 11 +y 12 +end +arch dungeon_magic +x 11 +y 13 +end +arch woodfloor +x 11 +y 13 +end +arch dungeon_magic +x 11 +y 14 +end +arch woodfloor +x 11 +y 14 +end +arch dungeon_magic +x 11 +y 15 +end +arch woodfloor +x 11 +y 15 +end +arch dungeon_magic +x 11 +y 16 +end +arch woodfloor +x 11 +y 16 +end +arch awall_2_1_2 +x 11 +y 16 +end +arch dungeon_magic +x 12 +end +arch woodfloor +x 12 +end +arch awall_2_1_2 +x 12 +end +arch dungeon_magic +x 12 +y 1 +end +arch woodfloor +x 12 +y 1 +end +arch dungeon_magic +x 12 +y 2 +end +arch woodfloor +x 12 +y 2 +end +arch dungeon_magic +x 12 +y 3 +end +arch woodfloor +x 12 +y 3 +end +arch dungeon_magic +x 12 +y 4 +end +arch woodfloor +x 12 +y 4 +end +arch dungeon_magic +x 12 +y 5 +end +arch woodfloor +x 12 +y 5 +end +arch dungeon_magic +x 12 +y 6 +end +arch woodfloor +x 12 +y 6 +end +arch dungeon_magic +x 12 +y 7 +end +arch woodfloor +x 12 +y 7 +end +arch dungeon_magic +x 12 +y 8 +end +arch woodfloor +x 12 +y 8 +end +arch dungeon_magic +x 12 +y 9 +end +arch woodfloor +x 12 +y 9 +end +arch dungeon_magic +x 12 +y 10 +end +arch woodfloor +x 12 +y 10 +end +arch dungeon_magic +x 12 +y 11 +end +arch woodfloor +x 12 +y 11 +end +arch dungeon_magic +x 12 +y 12 +end +arch woodfloor +x 12 +y 12 +end +arch dungeon_magic +x 12 +y 13 +end +arch woodfloor +x 12 +y 13 +end +arch dungeon_magic +x 12 +y 14 +end +arch woodfloor +x 12 +y 14 +end +arch dungeon_magic +x 12 +y 15 +end +arch woodfloor +x 12 +y 15 +end +arch dungeon_magic +x 12 +y 16 +end +arch woodfloor +x 12 +y 16 +end +arch awall_2_1_2 +x 12 +y 16 +end +arch dungeon_magic +x 13 +end +arch woodfloor +x 13 +end +arch awall_2_1_2 +x 13 +end +arch dungeon_magic +x 13 +y 1 +end +arch woodfloor +x 13 +y 1 +end +arch dungeon_magic +x 13 +y 2 +end +arch woodfloor +x 13 +y 2 +end +arch dungeon_magic +x 13 +y 3 +end +arch woodfloor +x 13 +y 3 +end +arch dungeon_magic +x 13 +y 4 +end +arch woodfloor +x 13 +y 4 +end +arch dungeon_magic +x 13 +y 5 +end +arch woodfloor +x 13 +y 5 +end +arch dungeon_magic +x 13 +y 6 +end +arch woodfloor +x 13 +y 6 +end +arch dungeon_magic +x 13 +y 7 +end +arch woodfloor +x 13 +y 7 +end +arch dungeon_magic +x 13 +y 8 +end +arch woodfloor +x 13 +y 8 +end +arch dungeon_magic +x 13 +y 9 +end +arch woodfloor +x 13 +y 9 +end +arch dungeon_magic +x 13 +y 10 +end +arch woodfloor +x 13 +y 10 +end +arch dungeon_magic +x 13 +y 11 +end +arch woodfloor +x 13 +y 11 +end +arch dungeon_magic +x 13 +y 12 +end +arch woodfloor +x 13 +y 12 +end +arch dungeon_magic +x 13 +y 13 +end +arch woodfloor +x 13 +y 13 +end +arch dungeon_magic +x 13 +y 14 +end +arch woodfloor +x 13 +y 14 +end +arch sign +name Welcome +msg +Welcome to the CASINO INFERNAL. +Please avail yourself of our fine gaming machines. + +To use the slotmachines just pull the handle, +the appropriate amount will be deducted from your +pockets by our fully bonded (and bound) +invisible imps. +Should you need to consolidate your winnings into +a more manageable denomination, we have all manner +of currency exchange (for a small surcharge). + +Refreshments are available for your edification +(for a small fee). + +Thank you and enjoy your stay at CASINO INFERNAL! +endmsg +x 13 +y 14 +end +arch dungeon_magic +x 13 +y 15 +end +arch woodfloor +x 13 +y 15 +end +arch dungeon_magic +x 13 +y 16 +end +arch woodfloor +x 13 +y 16 +end +arch awall_1_3 +x 13 +y 16 +end +arch dungeon_magic +x 14 +end +arch woodfloor +x 14 +end +arch awall_2_1_2 +x 14 +end +arch dungeon_magic +x 14 +y 1 +end +arch woodfloor +x 14 +y 1 +end +arch dungeon_magic +x 14 +y 2 +end +arch woodfloor +x 14 +y 2 +end +arch dungeon_magic +x 14 +y 3 +end +arch woodfloor +x 14 +y 3 +end +arch dungeon_magic +x 14 +y 4 +end +arch woodfloor +x 14 +y 4 +end +arch dungeon_magic +x 14 +y 5 +end +arch woodfloor +x 14 +y 5 +end +arch dungeon_magic +x 14 +y 6 +end +arch woodfloor +x 14 +y 6 +end +arch dungeon_magic +x 14 +y 7 +end +arch woodfloor +x 14 +y 7 +end +arch dungeon_magic +x 14 +y 8 +end +arch woodfloor +x 14 +y 8 +end +arch dungeon_magic +x 14 +y 9 +end +arch woodfloor +x 14 +y 9 +end +arch dungeon_magic +x 14 +y 10 +end +arch woodfloor +x 14 +y 10 +end +arch dungeon_magic +x 14 +y 11 +end +arch woodfloor +x 14 +y 11 +end +arch dungeon_magic +x 14 +y 12 +end +arch woodfloor +x 14 +y 12 +end +arch dungeon_magic +x 14 +y 13 +end +arch woodfloor +x 14 +y 13 +end +arch dungeon_magic +x 14 +y 14 +end +arch woodfloor +x 14 +y 14 +end +arch dungeon_magic +x 14 +y 15 +end +arch woodfloor +x 14 +y 15 +end +arch dungeon_magic +x 14 +y 16 +end +arch woodfloor +x 14 +y 16 +end +arch invis_exit +x 14 +y 16 +end +arch dungeon_magic +x 15 +end +arch woodfloor +x 15 +end +arch awall_2_1_2 +x 15 +end +arch dungeon_magic +x 15 +y 1 +end +arch woodfloor +x 15 +y 1 +end +arch dungeon_magic +x 15 +y 2 +end +arch woodfloor +x 15 +y 2 +end +arch dungeon_magic +x 15 +y 3 +end +arch woodfloor +x 15 +y 3 +end +arch dungeon_magic +x 15 +y 4 +end +arch woodfloor +x 15 +y 4 +end +arch dungeon_magic +x 15 +y 5 +end +arch woodfloor +x 15 +y 5 +end +arch dungeon_magic +x 15 +y 6 +end +arch woodfloor +x 15 +y 6 +end +arch dungeon_magic +x 15 +y 7 +end +arch woodfloor +x 15 +y 7 +end +arch dungeon_magic +x 15 +y 8 +end +arch woodfloor +x 15 +y 8 +end +arch dungeon_magic +x 15 +y 9 +end +arch woodfloor +x 15 +y 9 +end +arch dungeon_magic +x 15 +y 10 +end +arch woodfloor +x 15 +y 10 +end +arch dungeon_magic +x 15 +y 11 +end +arch woodfloor +x 15 +y 11 +end +arch dungeon_magic +x 15 +y 12 +end +arch woodfloor +x 15 +y 12 +end +arch dungeon_magic +x 15 +y 13 +end +arch woodfloor +x 15 +y 13 +end +arch dungeon_magic +x 15 +y 14 +end +arch woodfloor +x 15 +y 14 +end +arch dungeon_magic +x 15 +y 15 +end +arch woodfloor +x 15 +y 15 +end +arch dungeon_magic +x 15 +y 16 +end +arch woodfloor +x 15 +y 16 +end +arch awall_1_4 +x 15 +y 16 +end +arch dungeon_magic +x 16 +end +arch woodfloor +x 16 +end +arch awall_2_2_3 +x 16 +end +arch dungeon_magic +x 16 +y 1 +end +arch woodfloor +x 16 +y 1 +end +arch awall_2_1_1 +x 16 +y 1 +end +arch dungeon_magic +x 16 +y 2 +end +arch woodfloor +x 16 +y 2 +end +arch awall_2_1_1 +x 16 +y 2 +end +arch dungeon_magic +x 16 +y 3 +end +arch woodfloor +x 16 +y 3 +end +arch awall_2_1_1 +x 16 +y 3 +end +arch dungeon_magic +x 16 +y 4 +end +arch woodfloor +x 16 +y 4 +end +arch awall_2_1_1 +x 16 +y 4 +end +arch dungeon_magic +x 16 +y 5 +end +arch woodfloor +x 16 +y 5 +end +arch awall_2_1_1 +x 16 +y 5 +end +arch dungeon_magic +x 16 +y 6 +end +arch woodfloor +x 16 +y 6 +end +arch awall_2_1_1 +x 16 +y 6 +end +arch dungeon_magic +x 16 +y 7 +end +arch woodfloor +x 16 +y 7 +end +arch awall_2_1_1 +x 16 +y 7 +end +arch dungeon_magic +x 16 +y 8 +end +arch woodfloor +x 16 +y 8 +end +arch awall_2_1_1 +x 16 +y 8 +end +arch dungeon_magic +x 16 +y 9 +end +arch woodfloor +x 16 +y 9 +end +arch awall_2_1_1 +x 16 +y 9 +end +arch dungeon_magic +x 16 +y 10 +end +arch woodfloor +x 16 +y 10 +end +arch awall_2_1_1 +x 16 +y 10 +end +arch dungeon_magic +x 16 +y 11 +end +arch woodfloor +x 16 +y 11 +end +arch awall_2_1_1 +x 16 +y 11 +end +arch dungeon_magic +x 16 +y 12 +end +arch woodfloor +x 16 +y 12 +end +arch awall_2_1_1 +x 16 +y 12 +end +arch dungeon_magic +x 16 +y 13 +end +arch woodfloor +x 16 +y 13 +end +arch awall_2_1_1 +x 16 +y 13 +end +arch dungeon_magic +x 16 +y 14 +end +arch woodfloor +x 16 +y 14 +end +arch awall_2_1_1 +x 16 +y 14 +end +arch dungeon_magic +x 16 +y 15 +end +arch woodfloor +x 16 +y 15 +end +arch awall_2_1_1 +x 16 +y 15 +end +arch dungeon_magic +x 16 +y 16 +end +arch woodfloor +x 16 +y 16 +end +arch awall_2_2_4 +x 16 +y 16 +end +arch troll +name Benny +exp 0 +unaggressive 1 +sleep 0 +x 8 +y 1 +end diff --git a/unlinked/casino/goldslots.py b/unlinked/casino/goldslots.py new file mode 100755 index 000000000..487cab208 --- /dev/null +++ b/unlinked/casino/goldslots.py @@ -0,0 +1,91 @@ +#SlotMachine configuration file +#to make a new kind of slot machine, copy this file, change the settings and point the slotmachine to the new file. +# Standard type Gold Slots + +import CFPython +import sys +sys.path.append('/usr/local/CF/share/crossfire/maps/python') +import CFGamble + +activator=CFPython.WhoIsActivator() +activatorname=CFPython.GetName(activator) +whoami=CFPython.WhoAmI() +#gets slot name and adds map name for unique jackpot +slotname= '%s#%s' %(CFPython.GetName(whoami),CFPython.GetMapPath(CFPython.GetMap(whoami))) +x=CFPython.GetXPosition(activator) +y=CFPython.GetYPosition(activator) + +cointype = "goldcoin" #What type of coin is this slotmachine using? +minpot = 100 #Minimum slot jackpot size +maxpot = 50000 #Maxiumum slot jackpot size +cost = 1 #Price of usage + +#Change the items on the slot spinner or the number of items. +slotlist = ["Club", "Staff", "Shield", "Sword", "Wand", "Scroll", "JackPot"] + +spinners = 4 #How many spinners on the slotmachine? + + +Slots=CFGamble.SlotMachine(slotname,slotlist,minpot,maxpot) + +if (CFPython.PayAmount(activator, cost*10)):#goldcoin + Slots.placebet(cost) + results = Slots.spin(spinners) + pay = 0 + pot = Slots.checkslot() + CFPython.Write('%s' %results, activator, 7) + for item in results: + #match all but one - pays out by coin e.g 3 to 1 or 4 to 1 + if results.count(item) == spinners-1: + if item == "Club": + pay = 1 + elif item == "Staff": + pay = 2 + elif item == "Shield": + pay = 3 + elif item == "Sword": + pay = 4 + elif item == "Wand": + pay = 5 + elif item == "Scroll": + pay = 10 + elif item == "JackPot": + pay = 20 + else: + break + CFPython.Write("%d %ss, a minor win!" %(spinners-1,item),activator) + payoff = cost*pay + Slots.payoff(payoff) + id = CFPython.CreateObject(cointype, (x, y)) + CFPython.SetQuantity(id, payoff) + message = "you win %d %s!" %(payoff,cointype) + break + elif results.count(item) == spinners: + #all match - pays out as percent of pot + CFPython.Write('%d %ss, a Major win!' %(spinners,item),activator) + if item == "Club": + pay = .10 + elif item == "Staff": + pay = .15 + elif item == "Shield": + pay = .25 + elif item == "Sword": + pay = .25 + elif item == "Wand": + pay = .35 + elif item == "Scroll": + pay = .50 + elif item == "JackPot": + pay = 1 + payoff = pot*pay + Slots.payoff(payoff) + id = CFPython.CreateObject(cointype, (x, y)) + CFPython.SetQuantity(id, payoff) + message = "you win %d %s!!" %(payoff,cointype) + break + else: + message = "Better luck next time!" + CFPython.Write(message,activator) + CFPython.Write("%d in the Jackpot, Play again?" %Slots.checkslot(),activator) +else: + CFPython.Write("Sorry, you do not have enough money",activator) diff --git a/unlinked/casino/platinumslots.py b/unlinked/casino/platinumslots.py new file mode 100755 index 000000000..8f672bcba --- /dev/null +++ b/unlinked/casino/platinumslots.py @@ -0,0 +1,95 @@ +#SlotMachine configuration file +#to make a new kind of slot machine, copy this file, change the settings and point the slotmachine to the new file. +# Standard type Platinum Slots + +import CFPython +import sys +sys.path.append('/usr/local/CF/share/crossfire/maps/python') +import CFGamble + +activator=CFPython.WhoIsActivator() +activatorname=CFPython.GetName(activator) +whoami=CFPython.WhoAmI() +#gets slot name and adds map name for unique jackpot +slotname= '%s#%s' %(CFPython.GetName(whoami),CFPython.GetMapPath(CFPython.GetMap(whoami))) +x=CFPython.GetXPosition(activator) +y=CFPython.GetYPosition(activator) + +cointype = "platinacoin" #What type of coin is this slotmachine using? +minpot = 300 #Minimum slot jackpot size +maxpot = 100000 #Maxiumum slot jackpot size +cost = 1 #Price of usage + +#Change the items on the slot spinner or the number of items. +slotlist = ["Jester", "Lord", "Lady", "Prince", "Princess", "King", "Queen", "JackPot"] + +spinners = 4 #How many spinners on the slotmachine? + + +Slots=CFGamble.SlotMachine(slotname,slotlist,minpot,maxpot) + +if (CFPython.PayAmount(activator, cost*50)):#platinumcoin + Slots.placebet(cost) + results = Slots.spin(spinners) + pay = 0 + pot = Slots.checkslot() + CFPython.Write('%s' %results, activator, 7) + for item in results: + #match all but one - pays out by coin e.g 3 to 1 or 4 to 1 + if results.count(item) == spinners-1: + if item == "Jester": + pay = 1 + elif item == "Lord": + pay = 2 + elif item == "Lady": + pay = 3 + elif item == "Prince": + pay = 4 + elif item == "Princess": + pay = 5 + elif item == "Queen": + pay = 10 + elif item == "King": + pay = 20 + elif item == "Jackpot": + pay = 25 + else: + break + CFPython.Write("%d %ss, a minor win!" %(spinners-1,item),activator) + payoff = cost*pay + Slots.payoff(payoff) + id = CFPython.CreateObject(cointype, (x, y)) + CFPython.SetQuantity(id, payoff) + message = "you win %d %s!" %(payoff,cointype) + break + elif results.count(item) == spinners: + #all match - pays out as percent of pot + CFPython.Write('%d %ss, a Major win!' %(spinners,item),activator) + if item == "Jester": + pay = .1 + elif item == "Lord": + pay = .15 + elif item == "Lady": + pay = .25 + elif item == "Prince": + pay = .3 + elif item == "Princess": + pay = .4 + elif item == "Queen": + pay = .5 + elif item == "King": + pay = .6 + elif item == "JackPot": + pay = 1 + payoff = pot*pay + Slots.payoff(payoff) + id = CFPython.CreateObject(cointype, (x, y)) + CFPython.SetQuantity(id, payoff) + message = "you win %d %s!!" %(payoff,cointype) + break + else: + message = "Better luck next time!" + CFPython.Write(message,activator) + CFPython.Write("%d in the Jackpot, Play again?" %Slots.checkslot(),activator) +else: + CFPython.Write("Sorry, you do not have enough money",activator) diff --git a/unlinked/casino/silverslots.py b/unlinked/casino/silverslots.py new file mode 100755 index 000000000..ab614ccd3 --- /dev/null +++ b/unlinked/casino/silverslots.py @@ -0,0 +1,90 @@ +#SlotMachine configuration file +#to make a new kind of slot machine, copy this file, change the settings and point the slotmachine to the new file. + +import CFPython +import sys +sys.path.append('/usr/local/CF/share/crossfire/maps/python') +import CFGamble + +activator=CFPython.WhoIsActivator() +activatorname=CFPython.GetName(activator) +whoami=CFPython.WhoAmI() +#gets slot name and adds map name for unique jackpot +slotname= '%s#%s' %(CFPython.GetName(whoami),CFPython.GetMapPath(CFPython.GetMap(whoami))) +x=CFPython.GetXPosition(activator) +y=CFPython.GetYPosition(activator) + +cointype = "silvercoin" #What type of coin is this slotmachine using? +minpot = 100 #Minimum slot jackpot size +maxpot = 50000 #Maxiumum slot jackpot size +cost = 1 #Price of usage + +#Change the items on the slot spinner or the number of items. +slotlist = ["Maid", "Merchant", "Coin", "Diamond", "Imp", "Devil", "JackPot"] + +spinners = 4 #How many spinners on the slotmachine? + + +Slots=CFGamble.SlotMachine(slotname,slotlist,minpot,maxpot) + +if (CFPython.PayAmount(activator, cost)):#silvercoin + Slots.placebet(cost) + results = Slots.spin(spinners) + pay = 0 + pot = Slots.checkslot() + CFPython.Write('%s' %results, activator, 7) + for item in results: + #match all but one - pays out by coin e.g 3 to 1 or 4 to 1 + if results.count(item) == spinners-1: + if item == "Maid": + pay = 1 + elif item == "Merchant": + pay = 2 + elif item == "Coin": + pay = 3 + elif item == "Diamond": + pay = 4 + elif item == "Imp": + pay = 5 + elif item == "Devil": + pay = 10 + elif item == "JackPot": + pay = 20 + else: + break + CFPython.Write("%d %ss, a minor win!" %(spinners-1,item),activator) + payoff = cost*pay + Slots.payoff(payoff) + id = CFPython.CreateObject(cointype, (x, y)) + CFPython.SetQuantity(id, payoff) + message = "you win %d %s!" %(payoff,cointype) + break + elif results.count(item) == spinners: + #all match - pays out as percent of pot + CFPython.Write('%d %ss, a Major win!' %(spinners,item),activator) + if item == "Maid": + pay = .10 + elif item == "Merchant": + pay = .15 + elif item == "Coin": + pay = .25 + elif item == "Diamond": + pay = .25 + elif item == "Imp": + pay = .35 + elif item == "Devil": + pay = .50 + elif item == "JackPot": + pay = 1 + payoff = pot*pay + Slots.payoff(payoff) + id = CFPython.CreateObject(cointype, (x, y)) + CFPython.SetQuantity(id, payoff) + message = "you win %d %s!!" %(payoff,cointype) + break + else: + message = "Better luck next time!" + CFPython.Write(message,activator) + CFPython.Write("%d in the Jackpot, Play again?" %Slots.checkslot(),activator) +else: + CFPython.Write("Sorry, you do not have enough money",activator)