Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.41 KB | None | 0 0
  1. def main():
  2.     w = open(type + "_" + name + ".mcfunction", "w+")
  3.  
  4.     if(type == "Class"):
  5.         w.write("replaceitem entity @s armor.feet minecraft:leather_boots{display:{Name:'{\"text\":" + Class + ,"color":"gold","italic\":false}'},Unbreakable:1b,AttributeModifiers:[{AttributeName:\"generic.maxHealth\",Name:\"generic.maxHealth\",Amount:" + str(end * 2) + ",Operation:0,UUIDLeast:921822,UUIDMost:239778,Slot:\"feet\"},{AttributeName:\"generic.knockbackResistance\",Name:\"generic.knockbackResistance\",Amount:" + str(end) + ",Operation:1,UUIDLeast:125491,UUIDMost:875035,Slot:\"feet\"},{AttributeName:\"generic.attackSpeed\",Name:\"generic.attackSpeed\",Amount:" + str(dex * 5) + ",Operation:1,UUIDLeast:880595,UUIDMost:667288,Slot:\"feet\"},{AttributeName:\"generic.movementSpeed\",Name:\"generic.movementSpeed\",Amount:" + str(dex * 5) + ",Operation:1,UUIDLeast:706354,UUIDMost:256231,Slot:\"feet\"},{AttributeName:\"generic.attackDamage\",Name:\"generic.attackDamage\",Amount:" + str(stre * 5) + ",Operation:1,UUIDLeast:234533,UUIDMost:416360,Slot:\"feet\"},{AttributeName:\"generic.luck\",Name:\"generic.luck\",Amount:" + str(luc) + ",Operation:2,UUIDLeast:356007,UUIDMost:241609,Slot:\"feet\"}]} 1")
  6.     elif(type == "Race"):
  7.         w.write("replaceitem entity @s armor.legs minecraft:leather_leggings{display:{Name:'{\"text\":" + Race + ,"color":"gold","italic\":false}'},Unbreakable:1b,AttributeModifiers:[{AttributeName:\"generic.maxHealth\",Name:\"generic.maxHealth\",Amount:" + str((end * 2)-5) + ",Operation:0,UUIDLeast:921822,UUIDMost:239778,Slot:\"legs\"},{AttributeName:\"generic.knockbackResistance\",Name:\"generic.knockbackResistance\",Amount:" + str((end)-5) + ",Operation:1,UUIDLeast:125491,UUIDMost:875035,Slot:\"legs\"},{AttributeName:\"generic.attackSpeed\",Name:\"generic.attackSpeed\",Amount:" + str((dex * 5)-5) + ",Operation:1,UUIDLeast:880595,UUIDMost:667288,Slot:\"legs\"},{AttributeName:\"generic.movementSpeed\",Name:\"generic.movementSpeed\",Amount:" + str(dex * 5) + ",Operation:1,UUIDLeast:706354,UUIDMost:256231,Slot:\"legs\"},{AttributeName:\"generic.attackDamage\",Name:\"generic.attackDamage\",Amount:" + str((stre * 5)-5) + ",Operation:1,UUIDLeast:234533,UUIDMost:416360,Slot:\"legs\"},{AttributeName:\"generic.luck\",Name:\"generic.luck\",Amount:" + str((luc)-5) + ",Operation:2,UUIDLeast:356007,UUIDMost:241609,Slot:\"legs\"}]} 1")
  8.     else:
  9.         print("ERROR")
  10.         w.write("ERROR")
  11.  
  12.     w.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement