-Skript- please help me I'm a bit stuck!

Discussion in 'Plugin Development' started by Elderblock, Apr 15, 2014.

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

    Elderblock

    I have been working on a script in Skript a plugin made by Njol, I need help with my coding and am looking for advice:
    This is my script, it is a script that add's potion effect's to a (player) and removes them from the (player) that has taken fall damage/ any sort of damage and subsequently taken a "drug" to revive them.
    -Skript- (.sk) files:
    ____________________________________________________________________________________________
    on join:
    set {blood.%player%} to 0
    set {burn.%player%} to 0
    set {blister.%player%} to 0
    set {oxygen.%player%} to 10
    set {leg.%player%} to 0
    set {arm.%player%} to 0
    set {back.%player%} to 0
    set {slowness.%player%} to 0
    on damage:
    if attacker is an entity:
    message victim "" You get a blood wound and need to bandage it up ""
    apply nausea 2 to the victim
    set victim {blood.%player%} to 1
    stop
    if victim is burning:
    apply nausea 2 to the victim
    apply slowness 1 to the victim
    set victim {burn.%player%} to 1
    message victim "" You get burnt badly ,you need to take Morphine ""
    stop
    if block east, west, south, north, above, or below victim is lava:
    message victim "" You get 3rd degree burns, the only way is to wait! ""
    apply slowness 5 to the victim for 3 days
    apply wither 1 to the victim for 1 real minute
    apply nausea 2 to the victim for 2 days
    set victim {blister.%player%} to 1
    stop
    if block east, west, south, north, above, or below victim is water:
    message victim "" You are drowning, you need oxygen! ""
    apply slowness 1 to the victim for 50 real minutes
    apply nausea 5 to the victim for 10 real minutes
    subtract 1 from victim {oxygen.%player%}
    stop
    if block east, west, south, north, above, or below victim is cactus:
    message victim "" Watch out, don't get pricked again! ""
    stop
    if y-coordinate of victim is below 0:
    message victim " Well done, you fell out of the world :| "
    stop
    else:
    chance of 40%:
    message victim "" <Red>You broke your legs! ""
    apply slowness 20 to the victim
    set victim {leg.%player%} to 1
    stop
    chance of 40%:
    message victim "" <Red>You broke your arm... don't worry you have another one! w""
    apply nausea 1 to the victim for 5 real minutes
    set victim {arm.%player%} to 1
    stop
    chance of 20%:
    message victim "" <Red>You broke your back, your paralysed! ""
    set victim {slowness.%player%} for the victim to 50
    set victim {back.%player%} to 1
    stop
    on consume of water bottle:
    if name of player's tool is "<reset>Morphine":
    if {blood.%player%} is 1:
    remove nausea from the player
    remove slowness 1 from the player
    message player "" You have been healed by morphine for nausea and slowness! ""
    set {blood.%player%} to 0
    stop
    else:
    message player "" What a waste of morphine! ""
    stop
    if name of player's tool is "<reset>O2-repo":
    if {oxygen.%player%} is less than 10:
    remove slowness 1 from the player
    remove nausea 5 from the player
    set {oxygen.%player%} to 10
    message player "" Oxygen levels have been restored! ""
    stop
    else:
    message player "" What a waste of oxygen repo! ""
    stop
    on right click on air holding paper:
    if name of player's tool is "<reset>ArmBrase":
    if {arm.%player%} is 1:
    remove nausea 1 from the player
    set {arm.%player%} to 0
    stop
    else:
    message player "" What a waste of an ArmBrase! ""
    stop
    on right click on air holding stick:
    if name of player's tool is "<reset>Splint":
    if {leg.%player%} is 1:
    remove slowness 20 from the player
    set {leg.%player%} to 0
    stop
    else:
    message player "" What a waste! ""
    stop
    on right click on air holding bed:
    if name of player's tool is "<reset>Electro-stimulant":
    if {back.%player%} is 1:
    subtract 2 from {slowness.%player%}
    message player "" <red><bold> NEVER TAKE ELECTRO-STIMULANT'S WITHOUT PRESCRIPTION! ""
    message player "" You can now move a new part of your body! ""
    stop
    else:
    message player "" <red><bold> NEVER TAKE ELECTRO-STIMULANT'S WITHOUT PRESCRIPTION! ""
    apply swiftness 10 to the player for 10 real minutes
    apply nausea 5 to the player for 15 real minutes
    message player " You feel sick and unstable "
    stop

    every 1 real second:
    if {slowness.%player%} is more than 0:
    apply slowness {slowness.%player%} to the player
    stop
    __________________________________________________________________________________________________________
    I keep getting an error:
    The error , I believe is to do with how I am setting it out and the syntax... I code with .bat and have no knowledge of how to code in .java , so I decided to use .skript instead. It works but can someone please help me with this script? You will need the file with all the error information is, here:
    _____________________________________________________________________________________________
    [20:27:58] [Server thread/WARN]: [Skript] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (damageandmedicalsystem.sk, line 75: else:')
    [20:27:58] [Server thread/ERROR]: [Skript] indentation error: expected 4 tabs, but found 3 tabs (damageandmedicalsystem.sk, line 89: if {leg.%player%} is 1:')
    [20:27:58] [Server thread/ERROR]: [Skript] indentation error: expected 4 tabs, but found 3 tabs (damageandmedicalsystem.sk, line 93: else:')
    [20:27:58] [Server thread/ERROR]: [Skript] indentation error: expected 4 tabs, but found 1 tab (damageandmedicalsystem.sk, line 95: stop')
    [20:27:58] [Server thread/WARN]: [Skript] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (damageandmedicalsystem.sk, line 111: if {slowness.%player%} is more than 0:')
    [20:27:59] [Server thread/ERROR]: [Skript] 'bandage it up ""' is not an entity type (damageandmedicalsystem.sk, line 12: message victim "" You get a blood wound and need to bandage it up ""')
    [20:27:59] [Server thread/ERROR]: [Skript] 'victim {blood.%player%}' is not an entity type (damageandmedicalsystem.sk, line 14: set victim {blood.%player%} to 1')
    [20:27:59] [Server thread/ERROR]: [Skript] 'victim {burn.%player%}' is not an entity type (damageandmedicalsystem.sk, line 19: set victim {burn.%player%} to 1')
    [20:27:59] [Server thread/ERROR]: [Skript] 'take Morphine ""' is not an entity type (damageandmedicalsystem.sk, line 20: message victim "" You get burnt badly ,you need to take Morphine ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'wait! ""' is not an entity type (damageandmedicalsystem.sk, line 23: message victim "" You get 3rd degree burns, the only way is to wait! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim {blister.%player%}' is not an entity type (damageandmedicalsystem.sk, line 27: set victim {blister.%player%} to 1')
    [20:28:00] [Server thread/ERROR]: [Skript] 'message victim "" You' is not an entity type (damageandmedicalsystem.sk, line 30: message victim "" You are drowning, you need oxygen! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim {oxygen.%player%}' is not an entity type (damageandmedicalsystem.sk, line 33: subtract 1 from victim {oxygen.%player%}')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim "" Watch out, don't get pricked again! ""' is not a text (damageandmedicalsystem.sk, line 36: message victim "" Watch out, don't get pricked again! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] ':| "' is not a valid item data (damageandmedicalsystem.sk, line 39: message victim " Well done, you fell out of the world :| "')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim "" <Red>You broke your legs! ""' is not a text (damageandmedicalsystem.sk, line 43: message victim "" <Red>You broke your legs! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim {leg.%player%}' is not an entity type (damageandmedicalsystem.sk, line 45: set victim {leg.%player%} to 1')
    [20:28:00] [Server thread/ERROR]: [Skript] 'another one! w""' is not an item type (damageandmedicalsystem.sk, line 48: message victim "" <Red>You broke your arm... don't worry you have another one! w""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim {arm.%player%}' is not an entity type (damageandmedicalsystem.sk, line 50: set victim {arm.%player%} to 1')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim "" <Red>You broke your back, your paralysed! ""' is not a text (damageandmedicalsystem.sk, line 53: message victim "" <Red>You broke your back, your paralysed! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim {slowness.%player%} for the victim' is not an entity type (damageandmedicalsystem.sk, line 54: set victim {slowness.%player%} for the victim to 50')
    [20:28:00] [Server thread/ERROR]: [Skript] 'victim {back.%player%}' is not an entity type (damageandmedicalsystem.sk, line 55: set victim {back.%player%} to 1')
    [20:28:00] [Server thread/ERROR]: [Skript] 'slowness 1' is not an entity type (damageandmedicalsystem.sk, line 61: remove slowness 1 from the player')
    [20:28:00] [Server thread/ERROR]: [Skript] 'been healed by morphine for nausea and slowness! ""' is not an item type (damageandmedicalsystem.sk, line 62: message player "" You have been healed by morphine for nausea and slowness! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'morphine! ""' is not an item stack (damageandmedicalsystem.sk, line 66: message player "" What a waste of morphine! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'slowness 1' is not an entity type (damageandmedicalsystem.sk, line 70: remove slowness 1 from the player')
    [20:28:00] [Server thread/ERROR]: [Skript] 'nausea 5' is not an entity type (damageandmedicalsystem.sk, line 71: remove nausea 5 from the player')
    [20:28:00] [Server thread/ERROR]: [Skript] 'been restored! ""' is not an item type (damageandmedicalsystem.sk, line 73: message player "" Oxygen levels have been restored! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'oxygen repo! ""' is not an item stack (damageandmedicalsystem.sk, line 76: message player "" What a waste of oxygen repo! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'nausea 1' is not an entity type (damageandmedicalsystem.sk, line 81: remove nausea 1 from the player')
    [20:28:00] [Server thread/ERROR]: [Skript] 'an ArmBrase! ""' is not an item stack (damageandmedicalsystem.sk, line 85: message player "" What a waste of an ArmBrase! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'slowness 20' is not an entity type (damageandmedicalsystem.sk, line 90: remove slowness 20 from the player')
    [20:28:00] [Server thread/ERROR]: [Skript] 'player "" What a waste! ""' is not a text (damageandmedicalsystem.sk, line 94: message player "" What a waste! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'player "" <red><bold> NEVER TAKE ELECTRO-STIMULANT'S WITHOUT PRESCRIPTION! ""' is not a text (damageandmedicalsystem.sk, line 100: message player "" <red><bold> NEVER TAKE ELECTRO-STIMULANT'S WITHOUT PRESCRIPTION! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'your body! ""' is not an item stack (damageandmedicalsystem.sk, line 101: message player "" You can now move a new part of your body! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'player "" <red><bold> NEVER TAKE ELECTRO-STIMULANT'S WITHOUT PRESCRIPTION! ""' is not a text (damageandmedicalsystem.sk, line 104: message player "" <red><bold> NEVER TAKE ELECTRO-STIMULANT'S WITHOUT PRESCRIPTION! ""')
    [20:28:00] [Server thread/ERROR]: [Skript] 'player " You feel sick and unstable "' is not a text (damageandmedicalsystem.sk, line 107: message player " You feel sick and unstable "')
    [20:28:00] [Server thread/ERROR]: [Skript] There's no player in a periodical event (damageandmedicalsystem.sk, line 111: if {slowness.%player%} is more than 0:')
    [20:28:00] [Server thread/ERROR]: [Skript] There's no player in a periodical event (damageandmedicalsystem.sk, line 112: apply slowness {slowness.%player%} to the player')
    [20:28:01] [Server thread/INFO]: [Skript] Loaded 9 scripts with a total of 16 triggers and 8 commands in 3.73 seconds
    _________________________________________________________________________________________
    Although this look's like a lot it isn't , I have seen much longer error list's than this on other peoples scripts and it has been a simple fix like changing the first command and indenting all the script!
    I would like people to reply as soon as possible! The first person to give me a working script will get their name on the script!
    Thanks very much!
    Elderblock- (A.K.A) Elder
     
  2. Offline

    Starkiller1111

    I don't know the fix but more than seem to give an error I don't know why but when I figure it out I'll come back here.
     
Thread Status:
Not open for further replies.

Share This Page