I neeed help pls

Discussion in 'Skript help' started by SearchBar, Jul 9, 2018.

  1. SearchBar

    SearchBar New Member

    Joined:
    Jul 9, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Gender:
    Male
    I can’t code properly but is it possible that u can make an Practice skirpt?

    Like when right clicked on iron sword brings up an menu which u can select an duel like arcane?

    Pls reply
     
  2. diamondpumpkin

    diamondpumpkin PSL Owner/Administrator Staff Member

    Joined:
    May 1, 2016
    Messages:
    671
    Likes Received:
    46
    Trophy Points:
    28
    Gender:
    Male
    Occupation:
    PSL
    Location:
    Places, Ukraine
    Home Page:
    Hello,
    something as such would be super easy,

    Code:
    on rightclick with iron sword: 
      open chest with 2 rows named "&Arena Match" to player
      wait a tick
      set {_num} to 0
      loop all players:
          set slot {_num} of player's current inventory to 1 grass block named "&7Fight:" with lore "%loop-player%"
     
    on inventory click:
      if inventory name of player's current inventory is "&8Arena Match":
          set {_tempitemtype} to clicked item
          if {_tempitemtype} is not air:
              cancel event
              set {_itemname} to name of clicked item
              set {_itemlore} to lore of clicked item
              if {_itemname} is "&7Fight:":
                  set {_itemlore} to {_playetf} parsed as player
                  send "&7%player% Challenges you to a fight!" to {_playetf}
     
      #
      #You'd have to add some variables to the challenged player so if they accept/deny the plugin will act accordingly
      #
      #You will also have to add the arena plugin itself, I don't know if you have one already or not. I may have some spare time later, I could make it for ya.
      #
    
    So far this will require SkQuery and Skellett for this to work properly.