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.

Skript only work in certain world?

Discussion in 'Skript' started by bebeli555, Feb 8, 2020.

Tags:
Thread Status:
Not open for further replies.
  1. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    So i have multiple worlds on my server but id like this skript only to work on a world named "prisons" so how can i do that so the skript wouldnt affect the other worlds only work in the prisons world? Heres the skript:

    on break of iron ore:
    cancel event
    set event-block to air
    give 1 of iron ingot to player
    make console execute "eco give %player% 0.8"

    on break of gold ore:
    cancel event
    set event-block to air
    give 1 of gold ingot to player
    make console execute "eco give %player% 0.8"

    on break of diamond ore:
    cancel event
    set event-block to air
    give 1 of diamond to player
    make console execute "eco give %player% 0.8"

    on break of emerald ore:
    cancel event
    set event-block to air
    give 1 of emerald to player
    make console execute "eco give %player% 0.8"

    on break of coal ore:
    cancel event
    set event-block to air
    give 1 of coal to player
    make console execute "eco give %player% 0.8"

    on break of stone:
    cancel event
    set event-block to air
     
  2. Famix

    Famix New Member

    Joined:
    Jun 6, 2019
    Messages:
    9
    Likes Received:
    0
    just add
    if event-world is "prison":
     
  3. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    Where do i add that in the skript? i tried but it says cannot understand this line.
     
  4. Blue

    Moderator Supporter ++

    Joined:
    Apr 15, 2018
    Messages:
    30
    Likes Received:
    5
    For example,
    Code (Text):
    1.  
    2. on break of iron ore:
    3.   event-world is "prisons" #this is an in-line condition
    4.   cancel event
    5.   set event-block to air
    6.   give 1 of iron ingot to player
    7.   add 0.8 to balance of player #you don't need to use console commands if you have Vault installed; Skript supports Vault-based Economy plugins
    8.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...