Solved Right Click On Certain Coordinates

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

YaPotato

Member
Mar 19, 2020
11
0
0
23
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
 
{_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.
 
Status
Not open for further replies.