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.

PlaceholderAPI and skript

Discussion in 'Skript' started by Joseph, Apr 27, 2022.

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

    Joseph New Member

    Joined:
    May 1, 2019
    Messages:
    5
    Likes Received:
    0
    I basicly have this skript that adds classes to the game and I wanted to make the variable that says in which class I am into a placeholder. How can I do it?

    Here is my skript:
    Code (Text):
    1. command /classes:
    2.     trigger:
    3.         make player execute command "/warp classes"
    4.  
    5. options:
    6. #flash
    7.     Flash1Enabled: true
    8.     Flash2Enabled: true
    9.     Flash3Enabled: true
    10.     Flash4Enabled: true
    11.     Flash5Enabled: true
    12.     Flash6Enabled: true
    13.     Flash7Enabled: true
    14.     Flash8Enabled: true
    15.     Flash9Enabled: true
    16.     Flash10Enabled: true
    17. #healer
    18.     Healer1Enabled: true
    19.     Healer2Enabled: true
    20.     Healer3Enabled: true
    21.     Healer4Enabled: true
    22.     Healer5Enabled: true
    23.     Healer6Enabled: true
    24.     Healer7Enabled: true
    25.     Healer8Enabled: true
    26.     Healer9Enabled: true
    27.     Healer10Enabled: true
    28. #magician
    29.     Magician1Enabled: true
    30.     Magician2Enabled: true
    31.     Magician3Enabled: true
    32.     Magician4Enabled: true
    33.     Magician5Enabled: true
    34.     Magician6Enabled: true
    35.     Magician7Enabled: true
    36.     Magician8Enabled: true
    37.     Magician9Enabled: true
    38.     Magician10Enabled: true
    39.    
    40.     Magician1SelectedMessage: &aMagician Level 1 Selected
    41.     Magician1DeselectedMessage: &cMagician Level 1 Deselected
    42.     Magician2SelectedMessage: &aMagician Level 2 Selected
    43.     Magician2DeselectedMessage: &cMagician Level 2 Deselected
    44.     Magician3SelectedMessage: &aMagician Level 3 Selected
    45.     Magician3DeselectedMessage: &cMagician Level 3 Deselected
    46.     Magician4SelectedMessage: &aMagician Level 4 Selected
    47.     Magician4DeselectedMessage: &cMagician Level 4 Deselected
    48.     Magician5SelectedMessage: &aMagician Level 5 Selected
    49.     Magician5DeselectedMessage: &cMagician Level 5 Deselected
    50.     Magician6SelectedMessage: &aMagician Level 6 Selected
    51.     Magician6DeselectedMessage: &cMagician Level 6 Deselected
    52.     Magician7SelectedMessage: &aMagician Level 7 Selected
    53.     Magician7DeselectedMessage: &cMagician Level 7 Deselected
    54.     Magician8SelectedMessage: &aMagician Level 8 Selected
    55.     Magician8DeselectedMessage: &cMagician Level 8 Deselected
    56.     Magician9SelectedMessage: &aMagician Level 9 Selected
    57.     Magician9DeselectedMessage: &cMagician Level 9 Deselected
    58.     Magician10SelectedMessage: &aMagician Level 10 Selected
    59.     Magician10DeselectedMessage: &cMagician Level 10 Deselected
    60. #murderer
    61.     Murderer1Enabled: true
    62.     Murderer2Enabled: true
    63.     Murderer3Enabled: true
    64.     Murderer4Enabled: true
    65.     Murderer5Enabled: true
    66.     Murderer6Enabled: true
    67.     Murderer7Enabled: true
    68.     Murderer8Enabled: true
    69.     Murderer9Enabled: true
    70.     Murderer10Enabled: true
    71.  
    72. variables:
    73.     {basestrength} == 0
    74.  
    75. on damage:
    76.     if {basestrength} is 0:
    77.         increase damage by 0%
    78.     if {basestrength} is 1:
    79.         increase damage by 1
    80.     if {basestrength} is 2:
    81.         increase damage by 1.5
    82.     if {basestrength} is 3:
    83.         increase damage by 2
    84.     if {basestrength} is 4:
    85.         increase damage by 2.5
    86.     if {basestrength} is 5:
    87.         increase damage by 3
    88.     if {basestrength} is 6:
    89.         increase damage by 3.5
    90.     if {basestrength} is 7:
    91.         increase damage by 4
    92.     if {basestrength} is 8:  
    93.         increase damage by 4.5
    94.     if {basestrength} is 9:
    95.         increase damage by 5
    96.     if {basestrength} is 10:
    97.         increase damage by 5.5
    98.     if {basestrength} is greater than 10:
    99.         increase damage by 5.5
    100.  
    101. command /classestoggle [<text>] [<text>]:
    102.     trigger:
    103.         if arg 1 is not set:
    104.             send "You must chose a classe (/classestoggle <classe> <on/off>" to player
    105.             stop
    106.         if arg 2 is not set:
    107.             send "You must chose a on or off (/classestoggle <classe> <on/off>" to player
    108.             stop
    109.         if arg 1 is "flash":
    110.             if {healer.%player%.active} is not set:
    111.                 if {magician.%player%.active} is not set:
    112.                     if {murderer.%player%.active} is not set:
    113.                         set {_c} to 0
    114.                         loop 10 times:
    115.                             if player has permission "classes.flash%loop-value%":
    116.                                 add 1 to {_c}
    117.                         if {_c} == 0:
    118.                             send "/classes to claim this class" to player
    119.                             stop
    120.                         if arg 2 is "on":
    121.                             if {@Flash1Enabled} is true:
    122.                                 if player has permission "classes.flash1":
    123.                                     set {effects.%player%.flash1} to true
    124.                                     apply swiftness 1 without any particles to player for 9999 days
    125.                                     set {flash.%player%.active} to true
    126.                                     set {classe.%player%} to "flash"
    127.                             if {@Flash2Enabled} is true:
    128.                                 if player has permission "classes.flash2":
    129.                                     set {effects.%player%.flash2} to true
    130.                                     apply swiftness 2 without any particles to player for 9999 days
    131.                                     set {flash.%player%.active} to true
    132.                                     set {classe.%player%} to "flash"
    133.                             if {@Flash3Enabled} is true:
    134.                                 if player has permission "classes.flash3":
    135.                                     set {effects.%player%.flash3} to true
    136.                                     apply swiftness 3 without any particles to player for 9999 days
    137.                                     set {flash.%player%.active} to true
    138.                                     set {classe.%player%} to "flash"
    139.                             if {@Flash4Enabled} is true:
    140.                                 if player has permission "classes.flash4":
    141.                                     set {effects.%player%.flash4} to true
    142.                                     apply swiftness 4 without any particles to player for 9999 days
    143.                                     set {flash.%player%.active} to true
    144.                                     set {classe.%player%} to "flash"
    145.                             if {@Flash5Enabled} is true:
    146.                                 if player has permission "classes.flash5":
    147.                                     set {effects.%player%.flash5} to true
    148.                                     apply swiftness 5 without any particles to player for 9999 days
    149.                                     set {flash.%player%.active} to true
    150.                                     set {classe.%player%} to "flash"
    151.                             if {@Flash6Enabled} is true:
    152.                                 if player has permission "classes.flash6":
    153.                                     set {effects.%player%.flash6} to true
    154.                                     apply swiftness 6 without any particles to player for 9999 days
    155.                                     set {flash.%player%.active} to true
    156.                                     set {classe.%player%} to "flash"
    157.                             if {@Flash7Enabled} is true:
    158.                                 if player has permission "classes.flash7":
    159.                                     set {effects.%player%.flash7} to true
    160.                                     apply swiftness 6 without any particles to player for 9999 days
    161.                                     apply haste 1 without any particles to player for 9999 days
    162.                                     set {flash.%player%.active} to true
    163.                                     set {classe.%player%} to "flash"
    164.                             if {@Flash8Enabled} is true:
    165.                                 if player has permission "classes.flash8":
    166.                                     set {effects.%player%.flash8} to true
    167.                                     apply swiftness 6 without any particles to player for 9999 days
    168.                                     apply haste 2 without any particles to player for 9999 days
    169.                                     set {flash.%player%.active} to true
    170.                                     set {classe.%player%} to "flash"
    171.                             if {@Flash9Enabled} is true:
    172.                                 if player has permission "classes.flash9":
    173.                                     set {effects.%player%.flash9} to true
    174.                                     apply swiftness 6 without any particles to player for 9999 days
    175.                                     apply haste 3 without any particles to player for 9999 days
    176.                                     set {flash.%player%.active} to true
    177.                                     set {classe.%player%} to "flash"
    178.                             if {@Flash10Enabled} is true:
    179.                                 if player has permission "classes.flash10":
    180.                                     set {effects.%player%.flash10} to true
    181.                                     apply swiftness 6 without any particles to player for 9999 days
    182.                                     apply haste 4 without any particles to player for 9999 days
    183.                                     set {flash.%player%.active} to true
    184.                                     set {classe.%player%} to "flash"
    185.                         if arg 2 is "off":
    186.                             if player has permission "classes.flash1":
    187.                                 if {effects.%player%.flash1} is true:
    188.                                     remove swiftness from the player
    189.                                     delete {effects.%player%.flash1}
    190.                                     delete {flash.%player%.active}
    191.                                     set {classe.%player%} to "none"
    192.                             if player has permission "classes.flash2":
    193.                                 if {effects.%player%.flash2} is true:
    194.                                     remove swiftness from the player
    195.                                     delete {effects.%player%.flash2}
    196.                                     delete {flash.%player%.active}
    197.                                     set {classe.%player%} to "none"
    198.                             if player has permission "classes.flash3":
    199.                                 if {effects.%player%.flash3} is true:
    200.                                     remove swiftness from the player
    201.                                     delete {effects.%player%.flash3}
    202.                                     delete {flash.%player%.active}
    203.                                     set {classe.%player%} to "none"
    204.                             if player has permission "classes.flash4":
    205.                                 if {effects.%player%.flash4} is true:
    206.                                     remove swiftness from the player
    207.                                     delete {effects.%player%.flash4}
    208.                                     delete {flash.%player%.active}
    209.                                     set {classe.%player%} to "none"
    210.                             if player has permission "classes.flash5":
    211.                                 if {effects.%player%.flash5} is true:
    212.                                     remove swiftness from the player
    213.                                     delete {effects.%player%.flash5}
    214.                                     delete {flash.%player%.active}
    215.                                     set {classe.%player%} to "none"
    216.                             if player has permission "classes.flash6":
    217.                                 if {effects.%player%.flash6} is true:
    218.                                     remove swiftness from the player
    219.                                     delete {effects.%player%.flash6}
    220.                                     delete {flash.%player%.active}
    221.                                     set {classe.%player%} to "none"
    222.                             if player has permission "classes.flash7":
    223.                                 if {effects.%player%.flash7} is true:
    224.                                     remove swiftness from the player
    225.                                     remove haste from the player
    226.                                     delete {effects.%player%.flash7}
    227.                                     delete {flash.%player%.active}
    228.                                     set {classe.%player%} to "none"
    229.                             if player has permission "classes.flash8":
    230.                                 if {effects.%player%.flash8} is true:
    231.                                     remove swiftness from the player
    232.                                     remove haste from the player
    233.                                     delete {effects.%player%.flash8}
    234.                                     delete {flash.%player%.active}
    235.                                     set {classe.%player%} to "none"
    236.                             if player has permission "classes.flash9":
    237.                                 if {effects.%player%.flash9} is true:
    238.                                     remove swiftness from the player
    239.                                     remove haste from the player
    240.                                     delete {effects.%player%.flash9}
    241.                                     delete {flash.%player%.active}
    242.                                     set {classe.%player%} to "none"
    243.                             if player has permission "classes.flash10":
    244.                                 if {effects.%player%.flash10} is true:
    245.                                     remove swiftness from the player
    246.                                     remove haste from the player
    247.                                     delete {effects.%player%.flash10}
    248.                                     delete {flash.%player%.active}
    249.                                     set {classe.%player%} to "none"
    250.                     else:
    251.                         send "You are already murderer, turn it off to change !" to player
    252.                 else:
    253.                     send "You are already magician, turn it off to change !" to player
    254.             else:
    255.                 send "You are already healer, turn it off to change !" to player
    256.         if arg 1 is "healer":
    257.             if {flash.%player%.active} is not set:
    258.                 if {magician.%player%.active} is not set:
    259.                     if {murderer.%player%.active} is not set:
    260.                         set {_c} to 0
    261.                         loop 10 times:
    262.                             if player has permission "classes.healer%loop-value%":
    263.                                 add 1 to {_c}
    264.                         if {_c} == 0:
    265.                             send "/classes to claim this class" to player
    266.                             stop
    267.                         if arg 2 is "on":
    268.                             if {@Healer1Enabled} is true:
    269.                                 if player has permission "classes.healer1":
    270.                                     set {effects.%player%.healer1} to true
    271.                                     set the maximum health of the player to 11
    272.                                     set {healer.%player%.active} to true
    273.                                     set {classe.%player%} to "healer"
    274.                                 # else:
    275.                                     # send "/classes to claim this class" to player
    276.                             if {@Healer2Enabled} is true:
    277.                                 if player has permission "classes.healer2":
    278.                                     set {effects.%player%.healer2} to true
    279.                                     set the maximum health of the player to 12
    280.                                     set {healer.%player%.active} to true
    281.                                     set {classe.%player%} to "healer"
    282.                             if {@Healer3Enabled} is true:
    283.                                 if player has permission "classes.healer3":
    284.                                     set {effects.%player%.healer3} to true
    285.                                     set the maximum health of the player to 13
    286.                                     set {healer.%player%.active} to true
    287.                                     set {classe.%player%} to "healer"
    288.                             if {@Healer4Enabled} is true:
    289.                                 if player has permission "classes.healer4":
    290.                                     set {effects.%player%.healer4} to true
    291.                                     set the maximum health of the player to 14
    292.                                     set {healer.%player%.active} to true
    293.                                     set {classe.%player%} to "healer"
    294.                             if {@Healer5Enabled} is true:
    295.                                 if player has permission "classes.healer5":
    296.                                     set {effects.%player%.healer5} to true
    297.                                     set the maximum health of the player to 15
    298.                                     set {healer.%player%.active} to true
    299.                                     set {classe.%player%} to "healer"
    300.                             if {@Healer6Enabled} is true:
    301.                                 if player has permission "classes.healer6":
    302.                                     set {effects.%player%.healer6} to true
    303.                                     set the maximum health of the player to 16
    304.                                     set {healer.%player%.active} to true
    305.                                     set {classe.%player%} to "healer"
    306.                             if {@Healer7Enabled} is true:
    307.                                 if player has permission "classes.healer7":
    308.                                     set {effects.%player%.healer7} to true
    309.                                     set the maximum health of the player to 17
    310.                                     set {healer.%player%.active} to true
    311.                                     set {classe.%player%} to "healer"
    312.                             if {@Healer8Enabled} is true:
    313.                                 if player has permission "classes.healer8":
    314.                                     set {effects.%player%.healer8} to true
    315.                                     set the maximum health of the player to 18
    316.                                     set {healer.%player%.active} to true
    317.                                     set {classe.%player%} to "healer"
    318.                             if {@Healer9Enabled} is true:
    319.                                 if player has permission "classes.healer9":
    320.                                     set {effects.%player%.healer9} to true
    321.                                     set the maximum health of the player to 19
    322.                                     set {healer.%player%.active} to true
    323.                                     set {classe.%player%} to "healer"
    324.                             if {@Healer10Enabled} is true:
    325.                                 if player has permission "classes.healer10":
    326.                                     set {effects.%player%.healer10} to true
    327.                                     set the maximum health of the player to 20
    328.                                     set {healer.%player%.active} to true
    329.                                     set {classe.%player%} to "healer"
    330.                         if arg 2 is "off":
    331.                             if player has permission "classes.healer1":
    332.                                 if {effects.%player%.healer1} is true:
    333.                                     set the maximum health of the player to 10
    334.                                     delete {effects.%player%.healer1}
    335.                                     delete {healer.%player%.active}
    336.                                     set {classe.%player%} to "none"
    337.                             if player has permission "classes.healer2":
    338.                                 if {effects.%player%.healer2} is true:
    339.                                     set the maximum health of the player to 10
    340.                                     delete {effects.%player%.healer2}
    341.                                     delete {healer.%player%.active}
    342.                                     set {classe.%player%} to "none"
    343.                             if player has permission "classes.healer3":
    344.                                 if {effects.%player%.healer3} is true:
    345.                                     set the maximum health of the player to 10
    346.                                     delete {effects.%player%.healer3}
    347.                                     delete {healer.%player%.active}
    348.                                     set {classe.%player%} to "none"
    349.                             if player has permission "classes.healer4":
    350.                                 if {effects.%player%.healer4} is true:
    351.                                     set the maximum health of the player to 10
    352.                                     delete {effects.%player%.healer4}
    353.                                     delete {healer.%player%.active}
    354.                                     set {classe.%player%} to "none"
    355.                             if player has permission "classes.healer5":
    356.                                 if {effects.%player%.healer5} is true:
    357.                                     set the maximum health of the player to 10
    358.                                     delete {effects.%player%.healer5}
    359.                                     delete {healer.%player%.active}
    360.                                     set {classe.%player%} to "none"
    361.                             if player has permission "classes.healer6":
    362.                                 if {effects.%player%.healer6} is true:
    363.                                     set the maximum health of the player to 10
    364.                                     delete {effects.%player%.healer6}
    365.                                     delete {healer.%player%.active}
    366.                                     set {classe.%player%} to "none"
    367.                             if player has permission "classes.healer7":
    368.                                 if {effects.%player%.healer7} is true:
    369.                                     set the maximum health of the player to 10
    370.                                     delete {effects.%player%.healer7}
    371.                                     delete {healer.%player%.active}
    372.                                     set {classe.%player%} to "none"
    373.                             if player has permission "classes.healer8":
    374.                                 if {effects.%player%.healer8} is true:
    375.                                     set the maximum health of the player to 10
    376.                                     delete {effects.%player%.healer8}
    377.                                     delete {healer.%player%.active}
    378.                                     set {classe.%player%} to "none"
    379.                             if player has permission "classes.healer9":
    380.                                 if {effects.%player%.healer9} is true:
    381.                                     remove jump boost from the player
    382.                                     set the maximum health of the player to 10
    383.                                     delete {effects.%player%.healer9}
    384.                                     delete {healer.%player%.active}
    385.                                     set {classe.%player%} to "none"
    386.                             if player has permission "classes.healer10":
    387.                                 if {effects.%player%.healer10} is true:
    388.                                     set the maximum health of the player to 10
    389.                                     delete {effects.%player%.healer10}
    390.                                     delete {healer.%player%.active}
    391.                                     set {classe.%player%} to "none"
    392.                     else:
    393.                         send "You are already murderer, turn it off to change !" to player
    394.                 else:
    395.                     send "You are already magician, turn it off to change !" to player
    396.             else:
    397.                 send "You are already flash, turn it off to change !" to player
    398.         if arg 1 is "magician":
    399.             if {flash.%player%.active} is not set:
    400.                 if {healer.%player%.active} is not set:
    401.                     if {murderer.%player%.active} is not set:
    402.                         set {_c} to 0
    403.                         loop 10 times:
    404.                             if player has permission "classes.magician%loop-value%":
    405.                                 add 1 to {_c}
    406.                         if {_c} == 0:
    407.                             send "/classes to claim this class" to player
    408.                             stop
    409.                         if arg 2 is "on":
    410.                             if {@Magician1Enabled} is true:
    411.                                 if player has permission "classes.magician1":
    412.                                     set {effects.%player%.magician1} to true
    413.                                     apply jump boost 1 without any particles to player for 9999 days
    414.                                     set {magician.%player%.active} to true
    415.                                     set {classe.%player%} to "magician"
    416.                                 # else:
    417.                                     # send "/classes to claim this class" to player
    418.                             if {@Magician2Enabled} is true:
    419.                                 if player has permission "classes.magician2":
    420.                                     set {effects.%player%.magician2} to true
    421.                                     apply jump boost 2 without any particles to player for 9999 days
    422.                                     set {magician.%player%.active} to true
    423.                                     set {classe.%player%} to "magician"
    424.                             if {@Magician3Enabled} is true:
    425.                                 if player has permission "classes.magician3":
    426.                                     set {effects.%player%.magician3} to true
    427.                                     apply jump boost 3 without any particles to player for 9999 days
    428.                                     set {magician.%player%.active} to true
    429.                                     set {classe.%player%} to "magician"
    430.                             if {@Magician4Enabled} is true:
    431.                                 if player has permission "classes.magician4":
    432.                                     set {effects.%player%.magician4} to true
    433.                                     apply jump boost 3 without any particles to player for 9999 days
    434.                                     apply luck 1 without any particles to player for 9999 days
    435.                                     set {magician.%player%.active} to true
    436.                                     set {classe.%player%} to "magician"
    437.                             if {@Magician5Enabled} is true:
    438.                                 if player has permission "classes.magician5":
    439.                                     set {effects.%player%.magician5} to true
    440.                                     apply jump boost 3 without any particles to player for 9999 days
    441.                                     apply luck 2 without any particles to player for 9999 days
    442.                                     set {magician.%player%.active} to true
    443.                                     set {classe.%player%} to "magician"
    444.                             if {@Magician6Enabled} is true:
    445.                                 if player has permission "classes.magician6":
    446.                                     set {effects.%player%.magician6} to true
    447.                                     apply jump boost 3 without any particles to player for 9999 days
    448.                                     apply luck 3 without any particles to player for 9999 days
    449.                                     set {magician.%player%.active} to true
    450.                                     set {classe.%player%} to "magician"
    451.                             if {@Magician7Enabled} is true:
    452.                                 if player has permission "classes.magician7":
    453.                                     set {effects.%player%.magician7} to true
    454.                                     apply jump boost 3 without any particles to player for 9999 days
    455.                                     apply luck 4 without any particles to player for 9999 days
    456.                                     set {magician.%player%.active} to true
    457.                                     set {classe.%player%} to "magician"
    458.                             if {@Magician8Enabled} is true:
    459.                                 if player has permission "classes.magician8":
    460.                                     set {effects.%player%.magician8} to true
    461.                                     apply jump boost 3 without any particles to player for 9999 days
    462.                                     apply luck 5 without any particles to player for 9999 days
    463.                                     set {magician.%player%.active} to true
    464.                                     set {classe.%player%} to "magician"
    465.                             if {@Magician9Enabled} is true:
    466.                                 if player has permission "classes.magician9":
    467.                                     set {effects.%player%.magician9} to true
    468.                                     apply jump boost 3 without any particles to player for 9999 days
    469.                                     apply luck 5 without any particles to player for 9999 days
    470.                                     apply night vision 1 without any particles to player for 9999 days
    471.                                     set {magician.%player%.active} to true
    472.                                     set {classe.%player%} to "magician"
    473.                             if {@Magician10Enabled} is true:
    474.                                 if player has permission "classes.magician10":
    475.                                     set {effects.%player%.magician10} to true
    476.                                     apply jump boost 3 without any particles to player for 9999 days
    477.                                     apply luck 5 without any particles to player for 9999 days
    478.                                     apply night vision 1 without any particles to player for 9999 days
    479.                                     apply water breathing 1 without any particles to player for 9999 days
    480.                                     set {magician.%player%.active} to true
    481.                                     set {classe.%player%} to "magician"
    482.                         if arg 2 is "off":
    483.                             if player has permission "classes.magician1":
    484.                                 if {effects.%player%.magician1} is true:
    485.                                     remove jump boost from the player
    486.                                     delete {effects.%player%.magician1}
    487.                                     delete {magician.%player%.active}
    488.                                     set {classe.%player%} to "none"
    489.                             if player has permission "classes.magician2":
    490.                                 if {effects.%player%.magician2} is true:
    491.                                     remove jump boost from the player
    492.                                     delete {effects.%player%.magician2}
    493.                                     delete {magician.%player%.active}
    494.                                     set {classe.%player%} to "none"
    495.                             if player has permission "classes.magician3":
    496.                                 if {effects.%player%.magician3} is true:
    497.                                     remove jump boost from the player
    498.                                     delete {effects.%player%.magician3}
    499.                                     delete {magician.%player%.active}
    500.                                     set {classe.%player%} to "none"
    501.                             if player has permission "classes.magician4":
    502.                                 if {effects.%player%.magician4} is true:
    503.                                     remove jump boost from the player
    504.                                     remove luck from the player
    505.                                     delete {effects.%player%.magician4}
    506.                                     delete {magician.%player%.active}
    507.                                     set {classe.%player%} to "none"
    508.                             if player has permission "classes.magician5":
    509.                                 if {effects.%player%.magician5} is true:
    510.                                     remove jump boost from the player
    511.                                     remove luck from the player
    512.                                     delete {effects.%player%.magician5}
    513.                                     delete {magician.%player%.active}
    514.                                     set {classe.%player%} to "none"
    515.                             if player has permission "classes.magician6":
    516.                                 if {effects.%player%.magician6} is true:
    517.                                     remove jump boost from the player
    518.                                     remove luck from the player
    519.                                     delete {effects.%player%.magician6}
    520.                                     delete {magician.%player%.active}
    521.                                     set {classe.%player%} to "none"
    522.                             if player has permission "classes.magician7":
    523.                                 if {effects.%player%.magician7} is true:
    524.                                     remove jump boost from the player
    525.                                     remove luck from the player
    526.                                     delete {effects.%player%.magician7}
    527.                                     delete {magician.%player%.active}
    528.                                     set {classe.%player%} to "none"
    529.                             if player has permission "classes.magician8":
    530.                                 if {effects.%player%.magician8} is true:
    531.                                     remove jump boost from the player
    532.                                     remove luck from the player
    533.                                     delete {effects.%player%.magician8}
    534.                                     delete {magician.%player%.active}
    535.                                     set {classe.%player%} to "none"
    536.                             if player has permission "classes.magician9":
    537.                                 if {effects.%player%.magician9} is true:
    538.                                     remove jump boost from the player
    539.                                     remove luck from the player
    540.                                     remove night vision from the player
    541.                                     delete {effects.%player%.magician9}
    542.                                     delete {magician.%player%.active}
    543.                                     set {classe.%player%} to "none"
    544.                             if player has permission "classes.magician10":
    545.                                 if {effects.%player%.magician10} is true:
    546.                                     remove jump boost from the player
    547.                                     remove luck from the player
    548.                                     remove night vision from the player
    549.                                     remove water breathing from the player
    550.                                     delete {effects.%player%.magician10}
    551.                                     delete {magician.%player%.active}
    552.                                     set {classe.%player%} to "none"
    553.                     else:
    554.                         send "You are already murderer, turn it off to change !" to player
    555.                 else:
    556.                     send "You are already healer, turn it off to change !" to player
    557.             else:
    558.                 send "You are already flash, turn it off to change !" to player
    559.         if arg 1 is "murderer":
    560.             if {flash.%player%.active} is not set:
    561.                 if {healer.%player%.active} is not set:
    562.                     if {magician.%player%.active} is not set:
    563.                         set {_c} to 0
    564.                         loop 10 times:
    565.                             if player has permission "classes.murderer%loop-value%":
    566.                                 add 1 to {_c}
    567.                         if {_c} == 0:
    568.                             send "/classes to claim this class" to player
    569.                             stop
    570.                         if arg 2 is "on":
    571.                             if {@Murderer1Enabled} is true:
    572.                                 if player has permission "classes.murderer1":
    573.                                     set {effects.%player%.murderer1} to true
    574.                                     set {basestrength} to 1
    575.                                     set {murderer.%player%.active} to true
    576.                                     set {classe.%player%} to "murderer"
    577.                                 # else:
    578.                                     # send "/classes to claim this class" to player
    579.                             if {@Murderer2Enabled} is true:
    580.                                 if player has permission "classes.murderer2":
    581.                                     set {effects.%player%.murderer2} to true
    582.                                     set {basestrength} to 2
    583.                                     set {murderer.%player%.active} to true
    584.                                     set {classe.%player%} to "murderer"
    585.                             if {@Murderer3Enabled} is true:
    586.                                 if player has permission "classes.murderer3":
    587.                                     set {effects.%player%.murderer3} to true
    588.                                     set {basestrength} to 3
    589.                                     set {murderer.%player%.active} to true
    590.                                     set {classe.%player%} to "murderer"
    591.                             if {@Murderer4Enabled} is true:
    592.                                 if player has permission "classes.murderer4":
    593.                                     set {effects.%player%.murderer4} to true
    594.                                     set {basestrength} to 4
    595.                                     set {murderer.%player%.active} to true
    596.                                     set {classe.%player%} to "murderer"
    597.                             if {@Murderer5Enabled} is true:
    598.                                 if player has permission "classes.murderer5":
    599.                                     set {effects.%player%.murderer5} to true
    600.                                     set {basestrength} to 5
    601.                                     set {murderer.%player%.active} to true
    602.                                     set {classe.%player%} to "murderer"
    603.                             if {@Murderer6Enabled} is true:
    604.                                 if player has permission "classes.murderer6":
    605.                                     set {effects.%player%.murderer6} to true
    606.                                     set {basestrength} to 6
    607.                                     set {murderer.%player%.active} to true
    608.                                     set {classe.%player%} to "murderer"
    609.                             if {@Murderer7Enabled} is true:
    610.                                 if player has permission "classes.murderer7":
    611.                                     set {effects.%player%.murderer7} to true
    612.                                     set {basestrength} to 7
    613.                                     set {murderer.%player%.active} to true
    614.                                     set {classe.%player%} to "murderer"
    615.                             if {@Murderer8Enabled} is true:
    616.                                 if player has permission "classes.murderer8":
    617.                                     set {effects.%player%.murderer8} to true
    618.                                     set {basestrength} to 8
    619.                                     set {murderer.%player%.active} to true
    620.                                     set {classe.%player%} to "murderer"
    621.                             if {@Murderer9Enabled} is true:
    622.                                 if player has permission "classes.murderer9":
    623.                                     set {effects.%player%.murderer9} to true
    624.                                     set {basestrength} to 9
    625.                                     set {murderer.%player%.active} to true
    626.                                     set {classe.%player%} to "murderer"
    627.                             if {@Murderer10Enabled} is true:
    628.                                 if player has permission "classes.murderer10":
    629.                                     set {effects.%player%.murderer10} to true
    630.                                     set {basestrength} to 10
    631.                                     set {murderer.%player%.active} to true
    632.                                     set {classe.%player%} to "murderer"
    633.                         if arg 2 is "off":
    634.                             if player has permission "classes.murderer1":
    635.                                 if {effects.%player%.murderer1} is true:
    636.                                     set {basestrength} to 0
    637.                                     delete {effects.%player%.murderer1}
    638.                                     delete {murderer.%player%.active}
    639.                                     set {classe.%player%} to "none"
    640.                             if player has permission "classes.murderer2":
    641.                                 if {effects.%player%.murderer2} is true:
    642.                                     set {basestrength} to 0
    643.                                     delete {effects.%player%.murderer2}
    644.                                     delete {murderer.%player%.active}
    645.                                     set {classe.%player%} to "none"
    646.                             if player has permission "classes.murderer3":
    647.                                 if {effects.%player%.murderer3} is true:
    648.                                     set {basestrength} to 0
    649.                                     delete {effects.%player%.murderer3}
    650.                                     delete {murderer.%player%.active}
    651.                                     set {classe.%player%} to "none"
    652.                             if player has permission "classes.murderer4":
    653.                                 if {effects.%player%.murderer4} is true:
    654.                                     set {basestrength} to 0
    655.                                     delete {effects.%player%.murderer4}
    656.                                     delete {murderer.%player%.active}
    657.                                     set {classe.%player%} to "none"
    658.                             if player has permission "classes.murderer5":
    659.                                 if {effects.%player%.murderer5} is true:
    660.                                     set {basestrength} to 0
    661.                                     delete {effects.%player%.murderer5}
    662.                                     delete {murderer.%player%.active}
    663.                                     set {classe.%player%} to "none"
    664.                             if player has permission "classes.murderer6":
    665.                                 if {effects.%player%.murderer6} is true:
    666.                                     set {basestrength} to 0
    667.                                     delete {effects.%player%.murderer6}
    668.                                     delete {murderer.%player%.active}
    669.                                     set {classe.%player%} to "none"
    670.                             if player has permission "classes.murderer7":
    671.                                 if {effects.%player%.murderer7} is true:
    672.                                     set {basestrength} to 0
    673.                                     delete {effects.%player%.murderer7}
    674.                                     delete {murderer.%player%.active}
    675.                                     set {classe.%player%} to "none"
    676.                             if player has permission "classes.murderer8":
    677.                                 if {effects.%player%.murderer8} is true:
    678.                                     set {basestrength} to 0
    679.                                     delete {effects.%player%.murderer8}
    680.                                     delete {murderer.%player%.active}
    681.                                     set {classe.%player%} to "none"
    682.                             if player has permission "classes.murderer9":
    683.                                 if {effects.%player%.murderer9} is true:
    684.                                     remove jump boost from the player
    685.                                     set {basestrength} to 0
    686.                                     delete {effects.%player%.murderer9}
    687.                                     delete {murderer.%player%.active}
    688.                                     set {classe.%player%} to "none"
    689.                             if player has permission "classes.murderer10":
    690.                                 if {effects.%player%.murderer10} is true:
    691.                                     set {basestrength} to 0
    692.                                     delete {effects.%player%.murderer10}
    693.                                     delete {murderer.%player%.active}
    694.                                     set {classe.%player%} to "none"
    695.                     else:
    696.                         send "You are already magician, turn it off to change !" to player
    697.                 else:
    698.                     send "You are already healer, turn it off to change !" to player
    699.             else:
    700.                 send "You are already flash, turn it off to change !" to player
    701.  
    702. command /mergeclasses [<text>]:
    703.     trigger:
    704.         if player has permission "classes.murderer10":
    705.             if player has permission "classes.magician10":
    706.                 if player has permission "classes.healer10":
    707.                     if player has permission "classes.flash10":
    708.                         if arg 1 is not set:
    709.                             send "/mergeclasses <on/off>" to player
    710.                             stop
    711.                         if arg 1 is "on":
    712.                             if {mergeclasses.%player%.active} is not set:
    713.                                 set {basestrength} to 10
    714.                                 apply jump boost 3 without any particles to player for 9999 days
    715.                                 apply luck 5 without any particles to player for 9999 days
    716.                                 apply night vision 1 without any particles to player for 9999 days
    717.                                 apply water breathing 1 without any particles to player for 9999 days
    718.                                 set the maximum health of the player to 20
    719.                                 apply swiftness 6 without any particles to player for 9999 days
    720.                                 apply haste 4 without any particles to player for 9999 days
    721.                                 set {mergeclasses.%player%.active} to true
    722.                                 set {classe.%player%} to "merge"
    723.                         if arg 1 is "off":
    724.                             if {mergeclasses.%player%.active} is true:
    725.                                 set {basestrength} to 0
    726.                                 remove jump boost from the player
    727.                                 remove luck from the player
    728.                                 remove night vision from the player
    729.                                 remove water breathing from the player
    730.                                 set the maximum health of the player to 10
    731.                                 remove swiftness from the player
    732.                                 remove haste from the player
    733.                                 delete {mergeclasses.%player%.active}
    734.                                 set {classe.%player%} to "none"
    735.                     else:
    736.                         send "You need to have all classes at level 10 to merge all classes" to player
    737.                 else:
    738.                     send "You need to have all classes at level 10 to merge all classes" to player
    739.             else:
    740.                 send "You need to have all classes at level 10 to merge all classes" to player
    741.         else:
    742.             send "You need to have all classes at level 10 to merge all classes" to player
    743.  
    744.  
    745. on tab complete of "/mergeclasses":
    746.     set tab completions for position 1 to "On" and "Off"
    747.  
    748. on tab complete of "/classestoggle":
    749.     set tab completions for position 1 to "Magician", "Flash", "Healer" and "Murderer"
    750.     set tab completions for position 2 to "On" and "Off"
    And the variable I wanted to turn into placeholder is {classe.%player%}.

    Thanks
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Use functions and list variables. This is one of the most horrible scripts I've seen in years
     
  3. Joseph

    Joseph New Member

    Joined:
    May 1, 2019
    Messages:
    5
    Likes Received:
    0
    I know it looks terrible, I am new to skript. But how can I make the variable I talked before acessible by PlaceholerAPI skript extension?
     
  4. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
  5. Joseph

    Joseph New Member

    Joined:
    May 1, 2019
    Messages:
    5
    Likes Received:
    0
    Well, I have no clue how to do it xD. Well, I think you misunderstood what I meant, I wanted placeholder API to be able to get the value of "{classe.%player%}" variable on skript.
    --- Double Post Merged, Apr 28, 2022, Original Post Date: Apr 28, 2022 ---
    from skript*
     
  6. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Yeah... And I sent exactly what you wanted
     
Thread Status:
Not open for further replies.

Share This Page

Loading...