Heres a better EShop ive been working on, its based on the original one by @ALEXMINERPRO, ive expanded it and added lots of enchants (tried to do ones that are commonly used, and the prices are for RP Economy, not Survival/Factions =/)
(code is in 3 posts, as its so long, sorry for any inconveniences)
Click for Part 2
Click for Part 3
(code is in 3 posts, as its so long, sorry for any inconveniences)
Code:
cmd create eshop Enchantment Shop
cmd add eshop %player% = %p%
cmd add eshop if varset(%args%[1]) then let %player% = %args%[1]
cmd add eshop %gui%[\"type\"] = \"form\"
cmd add eshop %gui%[\"title\"] = \"§b§lεηcнαηтмεηт sнσρ§r\"
cmd add eshop %gui%[\"content\"] = \"§e§lsεℓεcт αη εηcнαηтмεηт§r\"
cmd add eshop %opt0%[\"text\"] = \"§c§lCancel§r\"
cmd add eshop %opt1%[\"text\"] = \"§6§lFire Protection§r\"
cmd add eshop %opt2%[\"text\"] = \"§8§lBlast Protection§r\"
cmd add eshop %opt3%[\"text\"] = \"§e§lProjectile Protection§r\"
cmd add eshop %opt4%[\"text\"] = \"§b§lUnbreaking§r\"
cmd add eshop %opt5%[\"text\"] = \"§l§aKnockback§r\"
cmd add eshop %opt6%[\"text\"] = \"§d§lProtection§r\"
cmd add eshop %opt7%[\"text\"] = \"§4§lSmite§r\"
cmd add eshop %opt8%[\"text\"] = \"§6§lPunch§r\"
cmd add eshop %opt9%[\"text\"] = \"§a§lPower§r\"
cmd add eshop %opt10%[\"text\"] = \"§c§lFire §6Aspect§r\"
cmd add eshop %opt11%[\"text\"] = \"§e§lEfficiency§r\"
cmd add eshop %buttons%[] = %opt0%
cmd add eshop %buttons%[] = %opt1%
cmd add eshop %buttons%[] = %opt2%
cmd add eshop %buttons%[] = %opt3%
cmd add eshop %buttons%[] = %opt4%
cmd add eshop %buttons%[] = %opt5%
cmd add eshop %buttons%[] = %opt6%
cmd add eshop %buttons%[] = %opt7%
cmd add eshop %buttons%[] = %opt8%
cmd add eshop %buttons%[] = %opt9%
cmd add eshop %buttons%[] = %opt10%
cmd add eshop %buttons%[] = %opt11%
cmd add eshop %gui%[\"buttons\"] = %buttons%
cmd add eshop %response% = dialog(%player%, %gui%)
cmd add eshop if varset(%response%) = %false% then exit
cmd add eshop if %response% = 0 then exit
cmd add eshop if %response% = 1 then goto 100
cmd add eshop if %response% = 2 then goto 200
cmd add eshop if %response% = 3 then goto 300
cmd add eshop if %response% = 4 then goto 400
cmd add eshop if %response% = 5 then goto 500
cmd add eshop if %response% = 6 then goto 600
cmd add eshop if %response% = 7 then goto 700
cmd add eshop if %response% = 8 then goto 800
cmd add eshop if %response% = 9 then goto 900
cmd add eshop if %response% = 10 then goto 1000
cmd add eshop if %response% = 11 then goto 1100
cmd add eshop exit
cmd insert eshop 100 %gui1%[\"type\"] = \"form\"
cmd add eshop %gui1%[\"title\"] = \"§6§lFire Protection§r\"
cmd add eshop %gui1%[\"content\"] = \"§lSelect a Level§r\"
cmd add eshop %cancel%[\"text\"] = \"§c§lCancel§r\"
cmd add eshop %level1%[\"text\"] = \"§6§lFire Protection Level IV §r- §fFree§r\"
cmd add eshop %levels1%[] = %cancel%
cmd add eshop %levels1%[] = %level1%
cmd add eshop %gui1%[\"buttons\"] = %levels1%
cmd add eshop %response1% = dialog(%player%, %gui1%)
cmd add eshop if varset(%response1%) = %false% then exit
cmd add eshop if %response1% = 0 then exit
cmd add eshop if %response1% = 1 then goto 125
cmd add eshop exit
cmd insert eshop 125 ascon /enchant %p% fire_protection 4
cmd add eshop exit
cmd insert eshop 200 %gui2%[\"type\"] = \"form\"
cmd add eshop %gui2%[\"title\"] = \"§8§lBlast Protection§r\"
cmd add eshop %gui2%[\"content\"] = \"§lSelect a Level§r\"
cmd add eshop %cancel%[\"text\"] = \"§c§lCancel§r\"
cmd add eshop %level1%[\"text\"] = \"§8§lBlast Protection Level IV §r- §fFree§r\"
cmd add eshop %levels2%[] = %cancel%
cmd add eshop %levels2%[] = %level1%
cmd add eshop %gui2%[\"buttons\"] = %levels2%
cmd add eshop %response2% = dialog(%player%, %gui2%)
cmd add eshop if varset(%response2%) = %false% then exit
cmd add eshop if %response2% = 0 then exit
cmd add eshop if %response2% = 1 then goto 225
cmd add eshop exit
cmd insert eshop 225 ascon /enchant %p% blast_protection 4
cmd add eshop exit
cmd insert eshop 300 %gui3%[\"type\"] = \"form\"
cmd add eshop %gui3%[\"title\"] = \"§e§lProjectile Protection§r\"
cmd add eshop %gui3%[\"content\"] = \"§lChoose a Level§r\"
cmd add eshop %cancel%[\"text\"] = \"§c§lCancel§r\"
cmd add eshop %level1%[\"text\"] = \"§e§lProjectile Protection Level IV §r- §fFree§r\"
cmd add eshop %levels3%[] = %cancel%
cmd add eshop %levels3%[] = %level1%
cmd add eshop %gui3%[\"buttons\"] = %levels3%
cmd add eshop %response3% = dialog(%player%, %gui3%)
cmd add eshop if varset(%response3%) = %false% then exit
cmd add eshop if %response3% = 0 then exit
cmd add eshop if %response3% = 1 then goto 325
cmd add eshop exit
cmd add eshop ascon /enchant %p% projectile_protection 4
cmd add eshop exit
cmd insert eshop 400 %gui4%[\"type\"] = \"form\"
cmd add eshop %gui4%[\"title\"] = \"§b§lUnbreaking§r\"
cmd add eshop %gui4%[\"content\"] = \"§lChoose a Level§r\"
cmd add eshop %cancel%[\"text\"] = \"§c§lCancel§r\"
cmd add eshop %level1%[\"text\"] = \"§b§lUnbreaking Level I §r- §fFree§r\"
cmd add eshop %level2%[\"text\"] = \"§b§lUnbreaking Level II §r- §f$50§r\"
cmd add eshop %level3%[\"text\"] = \"§b§lUnbreaking Level III §r- §f$100§r\"
cmd add eshop %levels4%[] = %cancel%
cmd add eshop %levels4%[] = %level1%
cmd add eshop %levels4%[] = %level2%
cmd add eshop %levels4%[] = %level3%
cmd add eshop %gui4%[\"buttons\"] = %levels4%
cmd add eshop %response4% = dialog(%player%, %gui4%)
cmd add eshop if varset(%response4%) = %false% then exit
cmd add eshop if %response4% = 0 then exit
cmd add eshop if %response4% = 1 then goto 425
cmd add eshop if %response4% = 2 then goto 450
cmd add eshop if %response4% = 3 then goto 475
cmd add eshop exit
cmd insert eshop 425 ascon /enchant %p% unbreaking 1
cmd add eshop exit
cmd insert eshop 450 %money% = playerbalance(%p%)
cmd add eshop if %money% < 50 then message %p% §fYou need at least $50 for this enchant.
cmd add eshop if %money% < 50 then exit
cmd add eshop ascon /rca %p% pay ATskullXD5 50
cmd add eshop ascon /enchant %p% unbreaking 2
cmd add eshop exit
cmd insert eshop 475 %money% = playerbalance(%p%)
cmd add eshop if %money% < 100 then message %p% §fYou need at least $100 for this enchant.
cmd add eshop if %money% < 100 then exit
cmd add eshop ascon /rca %p% pay ATskullXD5 100
cmd add eshop ascon /enchant %p% unbreaking 3
cmd add eshop exit
Click for Part 3
Last edited by a moderator: