Skip to content

Instantly share code, notes, and snippets.

@claytonflesher
Created October 19, 2014 02:32
Show Gist options
  • Save claytonflesher/a8f4f7e2aa1677b86dc1 to your computer and use it in GitHub Desktop.
Save claytonflesher/a8f4f7e2aa1677b86dc1 to your computer and use it in GitHub Desktop.
gold = ["260", "550", "800", "1,150", "1,550", "2,000", "2,600", "3,350", "4,250", "5,450", "7,000", "9,000", "11,600", "15,000", "19,500", "25,000", "32,000", "41,000", "53,000", "67,000"]
community = ["Thorp", "Hamlet", "Village", "Small town", "Large town", "Small city", "Large city", "Metropolis"]
combsval = ["50 gp", "200 gp", "500 gp", "1,000 gp", "2,000 gp", "4,000 gp", "8,000 gp", "16,000 gp"]
magicitem = [arm&shld, wpn, pot, ring, rod, scrl, stv, wnd, wond]
arm&shld = ["+1 shield", "+1 armor", "+2 shield", "+2 armor", "+3 shield", "+3 armor", "+4 shield", "+4 armor", "+5 shield", "+5 armor", "Specific armor", "Specific shield", "Special ability and roll again"]
armspec = "Glamored", "Fortification, light", "Slck", "Shadow", "Spell resistance (13)", "Slick, improved", "Shadow, improved", "Energy resistance", "Ghost touch", "Invulnerability", "Fortification, moderate", "Spell resistance (15)", "Wild", "Slick, greater", "Shadow, greater", "Energy reistance, improved", "Spell resistance (17)", "Etherealness", "Undead controlling", "Fortification, heavy", "Spell resistance (19)", "Energy resistance, greater", "Roll twice again"]
shldspec = ["Arrow catching", "Bashing", "Blinding", "Fortification, light", "Arrow deflection", "Animated", "Spell resistance (13)", "Energy resistance", "Ghost touch", "Fortification, moderate", "Spell reistance (15)", "Wild", "Energy resistance, improved", "Spell resistance (17)", "Undead controlling", "Fortification, heavy", "Reflecting", "Spell resistance (19)", "Energy resistance, greater", "Roll twice again"]
specificarm = ["Mithral shirt", "Dragonhide plate", "Elven chain", "Rhino hide", "Adamantine breastplate", "Dwarven plate", "Banded mail of luck", "Celestial armor", "Plate armor of the deep", "Breastplate of command", "Mithral full plate of speed", "Demon armor"]
specificshld = ["Darkwood buckler", "Darkwoon shield", "Mithral heavy shield", "Caster's shield", "Spined shield", "Lion's shield", "Winged shield", "Absorbing shield"]
wpn = ["+1", "+2", "+3", "+4", "+5", "Specific Weapon", "Special ability and roll again"]
meleeabil = ["Bane", "Defending", "Flaming", "Frost", "Shock", "Ghost touch", "Keen", "Ki focus", "Merciful", "Mighty cleaving", "Spell storing", "Throwing", "Thundering", "Vicious", "Anarchic", "Axiomatic", "Disruption", "Flaming burst", "Icy burst", "Holy", "Shockingburst", "Unholy", "Wounding", "Speed", "Brilliant energy", "Dancing", "Vorpal", "Roll again twice"]
rangeabil = ["Bane", "Distance", "Flaming", "Frost", "Merciful", "Returning", "Shock", "Seeking", "Thundering", "Anarchic", "Axiomatic", "Flaming burst", "Holy", "Icy burst", "Shocking burst", "Unholy", "Speed", "Brilliant energy", "Roll again tice"]
bane = ["Aberrations", "Animals", "Constructs", "Dragons", "Fey", "Humanoids (pick one subtype)", "Magical beasts", "Monstrous humanoids", "Oozes", "Outsiders (pick one subtype)", "Plants", "Undead", "Vermin"]
specificwpn = ["Sleep arrow", "Screaming bolt", "Silver dagger, masterwork", "Cold iron longsword, masterwork", "Javelin of lightning", "Slaying arrow", "Adamantine dagger", "Adamantine battleaxe", "Slaying arrow (greater)", "Shatterspike", "Dagger of venom", "Trident of warning", "Assassin's dagger", "Shifter's sorrow", "Trident of fish command", "Flame tongue", "Luck blade (o wishes)", "Sword of sublety", "Sword of the planes", "Nine lives stealer", "Oathbow", "Sword of life stealing", "Mace of terror", "Life-drinker", "Sylvan scimitar", "Rapier of puncturing", "Sun blade", "Frost brand", "Dwarven thrower", "Luck blade (1 wish)", "Holy avenger", "Luck blade (3 wishes)"]
pot = ["0", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th"]
ring = ["Protection +1", "Feather falling", "Sustenance", "Climbing", "Jumping", "Swimming", "Counterspells", "Mind shielding", "Protection +2", "Force shield", "the Ram", "Improved Climbing", "Improved Jumping", "Improved Swimming", "Animal friendship", "Minor energy resistance", "Chameleon power", "Water walking", "Protection +3", "Minor spell storing", "Invisibility", "Wizardry (I)", "Evasion", "X-ray vision", "Blinking", "Major energy resistance", "Protection +4", "Wizardry (II)", "Freedom of movement", "Greater energy resistance", "Friend shield (pair)", "Protection +5", "Shooting stars", "Spell storing", "Wizardry (III)", "Telekinesis", "Regeneration", "Spell turning", "Wizardry (IV)", "Three wishes", "Djinni calling", "Elemental command (air)", "Elemental command (earth)", "Elemental command (fire)", "Elemental command (water)", "Major spell storing"]
stv = ["Charming", "Fire", "Swarming insects", "Size alteration", "Healing", "Frost", "Illumination", "Defense", "Abjuration", "Conjuration", "Divination", "Enchantment", "Evocation", "Illusion", "Necromancy", "Transmutation", "Earth and stone", "Woodlands", "Life", "Passage", "Power"]
wondmin = ["Feather token, anchor", "Universal solvent", "Elixir of love", "Unguent of timelessness", "Feather token, fan", "Dust of tracelessness", "Elixir of hiding", "Elixir of tumbling", "Elixir of swimming", "Elixir of vision", "Silversheen", "Feather token, bird", "Feather token, tree", "Feather token, swan boat", "Elixir of truth", "Feather token, whip", "Dust of dryness", "Hand of the mage", "Bracers of armor +1", "Cloak of resistance +1", "Pearl of power, 1st-level spell", "Phylactery of faithfulness", "Salve of slipperiness", "Elixir of fire breath", "Pipes of the sewers", "Dust of illusion", "Brooch of shielding", "Necklace of fireballs type I", "Dust of appearance", "Hat of disguise", "Pipes of sounding", "Efficient quiver", "Amulet of natural armor +1", "Handy haversack", "Horn o fog", "Elemental gem", "Robe of bones", "Sovereign glue", "Bag of holding, type I", "Boots of elvinkind", "Candle of truth", "Cloak of elvenkind", "Eyes of the eagle", "Goggles of minute seeing", "Scarab, golembane", "Necklace of fireballs type II", "Stone of alarm", "Bead of force", "Chime of opening", "Horseshoes of speed", "Rope of climbing", "Bag of tricks, gray", "Dust of disappearance", "Lens of detection", "Vestment, druid's", "Figurine of wondrous power, silver raven", "Belt of giant strength +2", "Belt of incredible dexterity +2", "Belt of mighty constitution +2", "Bracers of armor +2", "Cloak of resistance +2", "Gloves of arrow snaring", "Headband of alluring charisma +2", "Headband of inspired wisdom +2", "Headband of vast intelligence +2", "Ioun stone, clear spindle", "Restorative ointment", "Marvelous pigments", "Pearl of power, 2nd-level spell", "Stone salve", "Necklace of fireballs type III", "Circlet of persuasion", "Slippers of spider climbing", "Incense of meditation", "Amulet of mighty fists +1", "Bag of holding type II", "Bracers of archery, lesser", "Ioun stone, dusty rose prism", "Helm of comprehend languages and read magic", "Vest of escape", "Eversmoking bottle", "Sustaining spoon", "Necklace of fireballs type IV", "Boots of striding and springing", "Wind fan", "Necklace of fireballs type V", "Horseshoes of a zephyr", "Pipes of haunting", "Gloves of swimming and climbing", "Crown of blasting, minor", "Horn of goodness/evil", "Robe of useful items", "Boat, folding", "Cloak of the manta ray", "Bottle of air", "Bag of holding, type III", "Periapt of health", "Boots of levitation", "Harp of charming"]
wondmed = ["Amulet of natural armor +2", "Golem manual, flesh", "Hand of glory", "Ioun stone, deep red sphere", "Ioun stone, incandescent blue sphere", "Ioun stone, pale blue rhomboid", "Ioun stone, pink and green sphere", "Ioun stone, pink rhomboid", "Ioun stone, scarlet and blue sphere", "Deck of illusions", "Necklace of fireballs type VI", "Candle of invocation", "Robe of blending", "Bag of tricks, rust", "Necklace of fireballs type VII", "Bracers of armor +3", "Cloak of resistance +3", "Decanter of endless water", "Necklace of adaptation", "Pearl of power, 3rd-level spell", "Figurine of wondrous power, serpentine owl", "Strand of prayer beads, lesser", "Bag of holding type IV", "Belt of physical might +2", "Figurine of wondrous power, bronze griffon", "Figurine of wondrous power, ebony fly", "Gloves of storing", "Headband of mental prowess +2", "Ioun stone, dark blue rhomboid", "Cape of the mountebank", "Phylactery of negative channeling", "Phylactery of positive channeling", "Guantlet of rust", "Boots of speed", "Goggles of night", "Golem manuel, clay", "Medallion of thoughts", "Blessed book", "Gem of brightness", "Lyre of building", "Robe, Monk's", "Cloak of arachnida", "Belt of dwarvenkind", "Periapt of wound closure", "Pearl of the sirines", "Figurine of wondrous power, onyx dog", "Bag of tricks, tan", "Belt of giant strength +4", "Belt of incredible dexterity +4", "Belt of mighty constitution +4", "Belt of physical perfection +2", "Boots, winged", "Bracers of armor +4", "Cloak of resistance +4", "Headband of alluring charisma +4", "Headband of inspired wisdom +4", "Headband of mental superiority +2", "Headband of vast intelligence +4", "Pearl of power, 4th-level spell", "Scabbard of keen edges", "Figurine of wondrous power, golden lions", "Chime of interruption", "Broom of flying", "Figurie of wondrous power, marble elephant", "Amulet of natural armor +3", "Ioun stone, iridescent spindle", "Bracelet of friends", "Amulet of mighty fists +2", "Carpet of flying, 5 ft. by 5ft.", "Horn of blasting", "Ioun stone, pale lavender ellipsoid", "Ioun stone, pearly white spindle", "Portable hole", "Stone of good luck (luckstone)", "Figurine of wondrous power, ivory goats", "Rope of entanglement", "Golem manual, stone", "Mask of the skull", "Mattock of the titans", "Crown of blasting, major", "Cloak of displacement, minor", "Helm of underwater action", "Bracers of archery, greater", "Bracers of armor +5", "Cloak of resistance +5", "Eyes of doom", "Pearl of power, 5th-level spell", "Maul of the titans", "Cloak of the bat", "Iron bands of binding", "Cube of frost resistance", "Helm of telepathy", "Periapt of proof against poison", "Robe of scintillating colors", "Manual of bodily health +1", "Manual of gainful exercise +1", "Manual of quickness in action +1", "Tome of clear thought +1", "Tome of leadership and influence +1", "Tome of understanding +1"]
wondmaj = ["Dimensional shackles", "Figurine of wondrous power, obsidian steed", "Drums of panic", "Ioun stone, orange prism", "Ioun stone, pale green prism", "Lantern of revealing", "Amulet of natural armor +4", "Amulet of proof against detection and locations", "Carpet of flying, 5 ft. by 10 ft.", "Golem manual, iron", "Belt of giant strength +6", "Belt of incredible dexterity +6", "Belt of mighty constitution +6", "Bracers of armor +6", "Headband of alluring charisma +6", "Headband of inspired wisdom +6", "Headband of vast intelligence +6", "Ioun stone, vibrant purple prism", "Pearl of power, 6th-level spell", "Scarab of protection", "Belt of physical might +4", "Headband of mental prowess +4", "Ioun stone, lavender and green ellipsoid", "Ring gates", "Crystal ball", "Golem manual, stone guardian", "Amulet of mighty fists +3", "Strand of prayer beads", "Orb of storms", "Boots of teleportation", "Bracers of armor +7", "Pearl of power, 7th-level spell", "Amulet of natural armor +5", "Cloak of displacement, major", "Crystal ball with see invisibility", "Horn of Valhalla", "Crystal ball with detect thoughts", "Wings of flying", "Cloak of etherealness", "Instant fortress", "Manual of bodily health +2", "Manual of gainful exercise +2", "Manual of quickness in action +2", "Tome of clear thought +2", "Tome of leadership and influence +2", "Tome of understanding +2", "Eyes of charming", "Robe of stars", "Carpet of flying, 10 ft. by 10 ft.", "Darkskull", "Cube of force", "Belt of physical perfection +4", "Bracers of armor +8", "Headband of mental superiority +4", "Pearl of power, 8th-level spell", "Crystal ball with telepathy", "Horn of blasting, greater", "Pearl of power, two spells", "Helm of teleportation", "Gem of seeing", "Robe of the archmagi", "Mantle of faith", "Amulet of mighty fists +4", "Crystal ball with true seeing", "Pearl of power, 9th level spell", "Well of many worlds", "Manual of bodily health +3", "Manual of quickness in action +3", "Tome of clear thought +3", "Tome of leadership and influence +3", "Tome of understanding +3", "Apparatus of the crab", "Belt of physical might +6", "Headband of mental prowess +6", "Mantle of spell resistance", "Mirror of opposition", "Strand of prayer beads, greater", "Manual of bodily health +4", "Manual of gainful exercise +4", "Manual of quickness in action +4", "Tome of clear thought +4", "Tome of leadership and influence +4", "Tome of understanding +4", "Amulet of th planes", "Robe of eyes", "Amulet of mighty fists +5", "Helm of brilliance", "Manual of bodily health +5", "Manual of gainful exercise +5", "Manual of quickness in action +5", "Tome of clear thought +5", "Tome of leadership and influence +5", "Tome of understanding +5", "Belt of physical perfection +6", "Headband of mental superiority +6", "Efreeti bottle", "Cubic gate", "Iron flask", "Mirror of life trapping"]
wondmaj = ["Dimensional shackles", "Figurine of wondrous power, obsidian steed", "Drums of panic", "Ioun stone, orange prism", "Ioun stone, pale green prism", "Lantern of revealing", "Amulet of natural armor +4", "Amulet of proof against detection and locations", "Carpet of flying, 5 ft. by 10 ft.", "Golem manual, iron", "Belt of giant strength +6", "Belt of incredible dexterity +6", "Belt of mighty constitution +6", "Bracers of armor +6", "Headband of alluring charisma +6", "Headband of inspired wisdom +6", "Headband of vast intelligence +6", "Ioun stone, vibrant purple prism", "Pearl of power, 6th-level spell", "Scarab of protection", "Belt of physical might +4", "Headband of mental prowess +4", "Ioun stone, lavender and green ellipsoid", "Ring gates", "Crystal ball", "Golem manual, stone guardian", "Amulet of mighty fists +3", "Strand of prayer beads", "Orb of storms", "Boots of teleportation", "Bracers of armor +7", "Pearl of power, 7th-level spell", "Amulet of natural armor +5", "Cloak of displacement, major", "Crystal ball with see invisibility", "Horn of Valhalla", "Crystal ball with detect thoughts", "Wings of flying", "Cloak of etherealness", "Instant fortress", "Manual of bodily health +2", "Manual of gainful exercise +2", "Manual of quickness in action +2", "Tome of clear thought +2", "Tome of leadership and influence +2", "Tome of understanding +2", "Eyes of charming", "Robe of stars", "Carpet of flying, 10 ft. by 10 ft.", "Darkskull", "Cube of force", "Belt of physical perfection +4", "Bracers of armor +8", "Headband of mental superiority +4", "Pearl of power, 8th-level spell", "Crystal ball with telepathy", "Horn of blasting, greater", "Pearl of power, two spells", "Helm of teleportation", "Gem of seeing", "Robe of the archmagi", "Mantle of faith", "Amulet of mighty fists +4", "Crystal ball with true seeing", "Pearl of power, 9th level spell", "Well of many worlds", "Manual of bodily health +3", "Manual of quickness in action +3", "Tome of clear thought +3", "Tome of leadership and influence +3", "Tome of understanding +3", "Apparatus of the crab", "Belt of physical might +6", "Headband of mental prowess +6", "Mantle of spell resistance", "Mirror of opposition", "Strand of prayer beads, greater", "Manual of bodily health +4", "Manual of gainful exercise +4", "Manual of quickness in action +4", "Tome of clear thought +4", "Tome of leadership and influence +4", "Tome of understanding +4", "Amulet of th planes", "Robe of eyes", "Amulet of mighty fists +5", "Helm of brilliance", "Manual of bodily health +5", "Manual of gainful exercise +5", "Manual of quickness in action +5", "Tome of clear thought +5", "Tome of leadership and influence +5", "Tome of understanding +5", "Belt of physical perfection +6", "Headband of mental superiority +6", "Efreeti bottle", "Cubic gate", "Iron flask", "Mirror of life trapping"]
i = 0
d = [ ]
while
i < 3
d << rand(1..4)
i = i+1
end
minoramt = d[0] + d[1] + d[2]
i = 0
d1 = [ ]
while
i < 2
d1 << rand(1..4)
i = i +1
end
medamt = d1[0] + d1[1]
majamt = rand(1..4)
i = 0
a = [ ]
while i < minoramt
a << rand(1..100)
i = i+1
end
i = 0
while i < minoramt
dice = rand(1..100)
if a[i] < 5
if dice < 61
puts "#{arm&shld[0]}"
end
if dice > 60 and dice < 81
puts "#{arm&shld[1]}"
end
if dice > 80 and dice < 86
puts "#{arm&shld[2]}"
end
if dice == 86 or dice == 87
puts "#{arm&shld[3]}"
end
if dice == 88 or dice == 89
puts "#{arm&shld[4]}"
r = rand(1..100)
if r < 51
puts "#{specificarm[0]}"
end
if r > 50 and r < 81
puts "#{specificarm[1]}"
end
if r > 80
puts "#{specificarm[2]}"
end
end
if dice == 90 or dice == 91
r = rand(1..100)
if r < 31
puts "#{specificshld[0]}"
end
if r > 30 and r < 81
puts "#{specificshld[1]}"
end
if r > 80 and r < 96
puts "#{specificshld[2]}"
end
if r > 95
puts "#{specificshld[3]}"
end
end
if dice > 91
puts "#{arm&shld[6]}"
end
end
if a[i] > 4 and a[i] < 10
if dice < 71
puts "Weapon bonus +1"
end
if dice > 70 and dice < 86
puts "Weapon bonus +2"
end
if dice > 85 and dice < 91
puts "Specific Weapon:"
r = rand (1..100)
if r < 16
puts "#{specificwpn[0]}"
end
if r > 15 and r < 26
puts "#{specificwpn[1]}"
end
if r > 25 and r < 46
puts "#{specificwpn[2]}"
end
if r > 45 and r < 66
puts "#{specificwpn[3]}"
end
if r > 65 and r < 76
puts "#{specificwpn[4]}"
end
if r > 75 and r < 81
puts "#{specificwpn[5]}"
end
if r > 80 and r < 91
puts "#{specificwpn[6]}"
end
if r > 90
puts "#{specificwpn[7]}"
end
end
if dice > 90
puts "Special ability and roll again"
end
end
if a[i] > 9 and a[i] < 45
puts "Potion spell level:"
if dice < 21
puts "#{pot[0]}"
end
if dice > 20 and dice < 61
puts "#{pot[1]}"
end
if dice > 60
puts "#{pot[2]}"
end
end
if a[i] = 45 or a[i] = 46
puts "Ring of..."
r = rand(1..100)
if r < 19
puts "#{ring[0]}"
end
if r > 18 and r < 29
puts "#{ring[1]}"
end
if r > 28 and r < 37
puts "#{ring[2]}"
end
if r > 36 and r < 45
puts "#{ring[3]}"
end
if r > 46 and r < 53
puts "#{ring[4]}"
end
if r > 52 and r < 61
puts "#{ring[5]}"
end
if r > 60 and r < 71
puts "#{ring[6]}"
end
if r > 70 and r < 76
puts "#{ring[7]}"
end
if r > 75 and r < 81
puts "#{ring[8]}"
end
if r > 80 and r < 86
puts "#{ring[9]}"
end
if r > 85 and r < 91
puts "#{ring[10]}"
end
if r > 90 and r < 94
puts "#{ring[14]}"
end
if r > 93 and r < 97
puts "#{ring[15]}"
end
if r = 97 or r = 98
puts "#{ring[16]}"
end
if r > 98
puts "#{ring[17]}"
end
end
if a[i] > 46 and a[i] < 82
puts "Scroll of magic level..."
r = rand(1..100)
if r < 6
puts "#{pot[0]}"
end
if r > 5 and r < 51
puts "#{pot[1]}"
end
if r > 50 and r < 96
puts "#{pot[2]}"
end
if r > 95
puts "#{pot[3]}"
end
end
if a[i] > 81 and a[i] < 92
puts "Wand of spell level..."
r = rand(1..100)
if r < 6
puts "#{pot[0]}"
end
if r > 5 and r < 61
puts "#{pot[1]}"
end
if r > 60
puts "#{pot[2]}"
end
end
if a[i] > 91
r = rand(1..100)
puts "#{wondmin[r]}"
end
i = i + 1
end
i = 0
b = [ ]
while i < medamt
b << rand(1..100)
i = i + 1
end
i = 0
c = [ ]
while i < majamt
c << rand(1..100)
i = i + 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment