1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Simple kitpvp upgrade menu and autokit equip on spawn

Discussion in 'Skript' started by ShadowFaite, Jan 31, 2021.

Thread Status:
Not open for further replies.
  1. ShadowFaite

    ShadowFaite Member

    Joined:
    Jul 2, 2018
    Messages:
    19
    Likes Received:
    0
    Hi, im looking for some help to create a simple GUI kitpvp menu where you can enable and disable autokit and also upgrade each piece of gear for money.
    can someone help me? i know how to make the GUI i just dont know how to make things upgradeable and make it so you equip your kit when spawning (autokit)
    Thanks

     
  2. Best Answer:
    Post #10 by FireRoz, Feb 1, 2021
  3. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Code (Text):
    1. variables:
    2.     {autokit%player%} = true
    3.  
    4. command /autokit [<text>]:
    5.     trigger:
    6.         if arg-1 is not "Enable" or "Disable":
    7.             send message "&cUsage: /autokit [Enable/Disable]" to player
    8.             stop
    9.         else:
    10.             if arg-1 is "Enable":
    11.                 set {autokit%player%} to true
    12.                 send message "&aAutoKit is Now Enabled" to player
    13.                 stop
    14.             else:
    15.                 if arg-1 is "Disable":
    16.                     set {autokit%player%} to false
    17.                     send message "&cAutoKit is Now Disabled" to player
    18.                     stop
    19.  
    20. on join:
    21.     if {autokit%player%} is true:
    22.         Put youre armor stuff here
    I havent tested it out but this should work fine!
     
  4. ShadowFaite

    ShadowFaite Member

    Joined:
    Jul 2, 2018
    Messages:
    19
    Likes Received:
    0
    Thank you!<3 <3 i will try it soon
    --- Double Post Merged, Feb 1, 2021, Original Post Date: Feb 1, 2021 ---
    How do i do the upgrading part?
     
  5. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Oh lol sorry didnt read that
    I'll make it in a bit
     
    • Friendly Friendly x 1
  6. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    6
    here is upgrade 1
    *Not tested*
    Code (Text):
    1. variables:
    2.   {gearlvl.%player%} = 0
    3.  
    4. command /upgradegear:
    5.   trigger:
    6.     if {gearlvl.%player%} is 0:
    7.       if player's balance is less than 20: # skript hooks up with vault so i used player's balance assuming ur using vault for economy
    8.         send "&4You don't have enough money to upgrade your gear. You need &6$&e20&c."
    9.       else if player's balance is greater or equal to 20:
    10.         set {gearlvl.%player%} to 1
    11.         send "&a&lYou've upgraded your gear. Re-equip your kit to get your upgraded gear."
    12.  
    13. on join:
    14.   if {autokit%player%} is true:
    15.     if {gearlvl.%player%} is 0:
    16.       # put armor on and ya im too lazy to do it
    17.     else if {gearlvl.%player%} is 1:
    18.       # ^^^^^^^^^
    @Marc i am tryna help people
    this is a war you skript export

    ALSOOO yeah just copy paste my code and setup prices as I didn't know wat u wanted it to be
     
    • Useful Useful x 1
  7. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    War it shall be!
     
  8. ShadowFaite

    ShadowFaite Member

    Joined:
    Jul 2, 2018
    Messages:
    19
    Likes Received:
    0
    Thank you guys very much!<3 i will try something out.
    also is it anyway possible to like make every single peice of gear upgradable? like you start with 8 arrows, the first upgrade 16 and so on with each piece?
     
  9. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Ofc it is! I just have no energy to write the code for it
     
  10. ShadowFaite

    ShadowFaite Member

    Joined:
    Jul 2, 2018
    Messages:
    19
    Likes Received:
    0
    can you give a small example of any sorts or is there any other posts helping with this so i can check it out. you guys helped me alot already and im very thankful! <3 <3 <3
     
  11. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    6
    im recovering from something so i canbt be asked to do more of these just doit by urself
    Code (Text):
    1. variables:
    2.   {arrowlvl.%player%} = 0
    3.   {bow.%player%} = 0
    4.   {armour.%player%} = 0
    5.   {sword.%player%} = 0
    6.   {all.%player%} = 0
    7.  
    8. command /upgradegear [<text>]:
    9.   trigger:
    10.     if arg-1 is not set:
    11.       send "&eUsage: &6/upgradegear &f<gear type, type list for the list of types>"
    12.     else:
    13.       if arg-1 is "list":
    14.         send "&6The ID is what you need to type into the command in order for this to work"
    15.         send "1) Arrow count &cID: &earrowcount"
    16.         send "2) Bow Power &cID: &ebow"
    17.         send "3) Armour &cID: &earmor"
    18.         send "4) Sword &cID: &eweapon"
    19.         send "&45) All &cID: &eall"
    20.       else if arg-1 is "arrowcount":
    21.         if {arrowlvl.%player%} is 0:
    22.           if player's balance is less than 20: # skript hooks up with vault so i used player's balance assuming ur using vault for economy
    23.             send "&4You don't have enough money to upgrade your gear. You need &6$&e20&c."
    24.         else if player's balance is greater or equal to 20:
    25.         set {arrowlvl.%player%} to 1
    26.         send "&a&lYou've upgraded your arrow count. Re-equip your kit to get your upgraded gear."
    27.  
    28. on join:
    29.   if {autokit%player%} is true:
    30.     if {arrowlvl.%player%} is 0:
    31.       # put armor on and ya im too lazy to do it
    32.     else if {arrowlvl.%player%} is 1:
    33.       # ^^^^^^^^^

    im sorry
     
    • Friendly Friendly x 1
  12. ShadowFaite

    ShadowFaite Member

    Joined:
    Jul 2, 2018
    Messages:
    19
    Likes Received:
    0
    Thank you soo much. you all have helped me so much<3
    have an amazing day
     
Thread Status:
Not open for further replies.

Share This Page

Loading...