Advertisement
Guest User

VOID-CmdGen-Source

a guest
Nov 11th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set empty to ""
  2. tell application "System Events"
  3.     set Description1 to the text returned of (display dialog "Description Line 1" default answer "")
  4.     set Description2 to the text returned of (display dialog "Description Line 2" default answer "")
  5.     set Description3 to the text returned of (display dialog "Description Line 3" default answer "")
  6.     set Description4 to the text returned of (display dialog "Description Line 4" default answer "")
  7.     set Description5 to the text returned of (display dialog "Description Line 5" default answer "")
  8.     if Description2 is not empty then
  9.         set NDesc1 to "\"§7" & Description1 & "\","
  10.     else
  11.         set NDesc1 to "\"§7" & Description1 & "\""
  12.     end if
  13.     if Description3 is not empty then
  14.         if Description2 is not empty then
  15.             set NDesc2 to "\"§7" & Description2 & "\","
  16.         else
  17.             set NDesc2 to ""
  18.         end if
  19.     else
  20.         if Description2 is not empty then
  21.             set NDesc2 to "\"§7" & Description2 & "\""
  22.         else
  23.             set NDesc2 to ""
  24.         end if
  25.     end if
  26.     if Description4 is not empty then
  27.         if Description3 is not empty then
  28.             set NDesc3 to "\"§7" & Description3 & "\","
  29.         else
  30.             set NDesc3 to ""
  31.         end if
  32.     else
  33.         if Description3 is not empty then
  34.             set NDesc3 to "\"§7" & Description3 & "\""
  35.         else
  36.             set NDesc3 to ""
  37.         end if
  38.     end if
  39.     if Description5 is not empty then
  40.         if Description4 is not empty then
  41.             set NDesc4 to "\"§7" & Description4 & "\","
  42.         else
  43.             set NDesc4 to ""
  44.         end if
  45.     else
  46.         if Description4 is not empty then
  47.             set NDesc4 to "\"§7" & Description4 & "\""
  48.         else
  49.             set NDesc4 to ""
  50.         end if
  51.     end if
  52.     if Description5 is not empty then
  53.         set NDesc5 to "\"§7" & Description5 & "\""
  54.     else
  55.         set NDesc5 to ""
  56.     end if
  57.     set FullDesc to NDesc1 & NDesc2 & NDesc3 & NDesc4 & NDesc5
  58.    
  59. end tell
  60. set PresetType to ¬
  61.     choose from list {"Cosmetic - Shield", "Cosmetic - Hat", "Cosmetic - Head"} ¬
  62.         with title ¬
  63.         "PIFCG" with prompt ¬
  64.         "Select a Preset" OK button name ¬
  65.         "Proceed" cancel button name ¬
  66.         "Exit" without multiple selections allowed
  67.  
  68. set genericCmdStart to "execute Lord_Pundus ~ ~ ~ /setblock ~ ~ ~ minecraft:command_block 0 replace {Command:/give @a[tag="
  69. set typeShield to "minecraft:shield"
  70. set typePlrHead to "minecraft:skull"
  71. set displayTag to ",display:{Name:\"§a"
  72.  
  73. if PresetType is false then
  74.     error number -128
  75. else if PresetType contains "Cosmetic - Shield" then
  76.     tell application "System Events"
  77.         set ItemName to text returned of (display dialog "Item Name" default answer "Shield")
  78.         set ItemID to text returned of (display dialog "Item ID" default answer "DecShield")
  79.         set ItemLevel to the text returned of (display dialog "Item Level" default answer "Level")
  80.         set ItemQty to the text returned of (display dialog "Item Quantity" default answer "Qty")
  81.         set ItemDmg to the text returned of (display dialog "Item Damage" default answer "Dmg")
  82.         set BlockEntityTag to the text returned of (display dialog "BlockEntityTag" default answer "{Base:15,Patterns:[{Patt...r:15}]}")
  83.         set QtyDmg to " " & ItemQty & " " & ItemDmg & " "
  84.         set compID to ItemID & "] "
  85.         set FullCMD to genericCmdStart & compID & typeShield & QtyDmg & "{BlockEntityTag:" & BlockEntityTag & displayTag & ItemName & "\",Lore:[\"§7Level " & ItemLevel & " Decorative Shield\"," & FullDesc & "]},RepairCost:9999,HideFlags:63},TrackOutput:0}"
  86.         delay 3
  87.         keystroke FullCMD
  88.     end tell
  89. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement