Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This is just a basic example. More attributes would be added, of course
- from random import randint
- #the attributes. For each stat, the value would be randomized respectivley
- health = "+"+str(randint(1, 10))+" Health"
- regen = "+"+str(randint(1, 30))+" Regen"
- atkspd = "+"+str(randint(1, 5))+" Attack Speed"
- attlist = [health, regen, atkspd]
- #I could go on, but I don't want to be here all day, it's just a quick example, after all
- #Possible Names
- first = ["Cleaver", "Sword", "Longsword", "Greatsword", "Shortsword", "Mace"]
- #the second, third, and fourth would be prefaced by all different strings. second is prefaced by "of"
- second = ["power", "strength", "sharpness", "kings"]
- #Third is prefaced by "of the", like it is from somewhere
- third = ["Vale", "Throne", "Slain", "king", "protectors of the realm", "Elves", "Dwarves"]
- #fourth is chosen instead of the first one, and gives names like "Kingslayer" or "Brisingr". Named swords will be more powerful
- fourth = ["Kingslayer", "Knightsbane", "Heart Eater", "Brisingr", "Vol Gul Mai"]
- #Function to choose a name
- def name():
- output = ""
- x = randint(1, 3)
- if x==1:
- output = output + first[randint(0, len(first)-1)] + " of " + second[randint(0, len(second)-1)]
- elif x==2:
- output = output + first[randint(0, len(first)-1)] + " of the " + third[randint(0, len(third)-1)]
- elif x==3:
- output = output + fourth[randint(0, len(fourth)-1]
- return output
- def checklore(list, value):
- for x in list:
- if list[x] != value:
- return True
- else:
- return False
- def lore():
- output = []
- temp = ""
- random = randint(1, 10)
- #checks how many attributes the weapon will have
- for x in range(0, random):
- temp = randint[0, len(attlist)-1]
- if checklore(output, temp):
- output.append(temp)
- for b in output:
- output[b] = attlist[output[b]]
- return output
- #The weapons now!
- TOOL:
- name: name()
- lore: lore()
- chance: 50
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement