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 Right Click On Certain Coordinates

Discussion in 'Skript' started by YaPotato, Apr 4, 2020.

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

    YaPotato Member

    Joined:
    Mar 19, 2020
    Messages:
    11
    Likes Received:
    0
    Im trying to make different shops at different places. but when i try to do it. They all pop up at the same time. Well this is my skript

    on right click on player head:
    if location of event-block is location {_tutorial}:
    play sound "entity.villager.ambient" at volume 1 and pitch 1 at player's location for player
    open virtual chest inventory with size 3 named "Tutorial Man" to player
    format gui slot 10 of player with ("MrSnowDK" parsed as offline player)'s skull named "&6How Do I Earn Money" to run:
    send "Aa You Find Yellow Wool and you earn money or you can do certain quest from others"
    play sound "entity.villager.ambient" at volume 1 and pitch 1 at player's location for player
    format gui slot 13 of player with iron sword named "&6How Do I Get Stronger" to run:
    send "Try to evolve your mana and gain other crazy abilities. You can also find trainers" to player
    play sound "entity.villager.ambient" at volume 1 and pitch 1 at player's location for player

    on right click on player head:
    if location of event-block is location {_blacksmithspot}:
    play sound "entity.villager.ambient" at volume 1 and pitch 1 at player's location for player
    open virtual chest inventory with size 3 named "Weapon Shop" to player
    format gui slot 10 of player with wooden sword named "&6Wood Sword (10$)" with lore "Cooldown: 0.3 seconds" and "Damage: 4" to run:
    if {money.%player%} is greater than 9:
    give player 1 of wooden sword named "Wood Sword" with lore "Great Sword For EXP"
    play sound "entity.villager.ambient" at volume 1 and pitch 1 at player's location for player
    format gui slot 13 of player with stone sword named "&6Dagger (35)" with lore "Cooldown: 0" and "Damage: 5" to run:
    if {money.%player%} is greater than 34:
    give player 1 of stone sword named "Dagger" with lore "Probably this will be the meta"
    play sound "entity.villager.ambient" at volume 1 and pitch 1 at player's location for player
     
  2. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    430
    Likes Received:
    30
    {_tutorial} and {_blacksmithspot} are local variables, this means that they do not have a value assigned to them as they get deleted as a trigger ends. I recommend using global variables instead.
     
  3. YaPotato

    YaPotato Member

    Joined:
    Mar 19, 2020
    Messages:
    11
    Likes Received:
    0
    still doesn't work.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...