Hello, I am starting to script again after a few years, and I am pretty new to this again.. I want to create a little "shop" in a NPC, for my server. If anyone could help me out with this script it would be very nice!
See this picture with errors when trying to load script.
There's only this in console:
09.07 23:10:07 [Server] INFO UserName issued server command: /sk reload fiskemain1
[doublepost=1562706748,1562706702][/doublepost]I just saw that my picture wouldn't work, so here is the picture.
See this picture with errors when trying to load script.
There's only this in console:
09.07 23:10:07 [Server] INFO UserName issued server command: /sk reload fiskemain1
Code:
command /fisker:
trigger:
wait 1 tick
open chest with 1 rows named "&9&lFisker" to player
format slot 3 of player with 1 of green wool named "&2&lKøb" with lore "&3Køb fisk " to close then run [execute player command "/købfiskafmanden1232"]
format slot 5 of player with 1 of red wool named "&4&lSælg" with lore "&3Sælg fisk" to close then run [execute player command "/sælgfiskemanden123213"]
stop
command /købfiskafmanden1232:
trigger:
wait 1 tick
open chest with 1 rows named "&9&lVælg fisk" to player
format slot 3 of player with 1 of cooked fish named "&3Stegt fisk" to close then run [execute player command "/købstegtfiskafmanden1232"]
format slot 5 of player with 1 of cooked salmon named "&3Stegt laks" to close then run [execute player command "/købstegtlaksfiskemanden123213"]
format slot 7 of player with 1 of pufferfish named "&3Kuglefisk" to close then run [execute player command "/købkuglefiskfiskemanden123213"]
stop
command /købstegtfiskafmanden1232:
trigger:
open chest with 1 rows named "&9&lKøb stegt fisk" to player
format slot 3 of player with 1 of cooked fish named "&2$50" with lore "&3Køb 1 stegt fisk" to close then run [execute player command "/køb1stegtfiskafmanden1232"]
format slot 5 of player with 8 of cooked fish named "&2$400" with lore "&3Køb 8 stegte fisk" to close then run [execute player command "/køb8stegtfiskafmanden1232"]
format slot 7 of player with 16 of cooked fish named "&2$800" with lore "&3Køb 16 stegte fisk" to close then run [execute player command "/køb16stegtfiskafmanden1232"]
stop
command /købstegtlaksfiskemanden123213:
trigger:
open chest with 1 rows named "&9&lKøb stegt laks" to player
format slot 3 of player with 1 of cooked salmon named "&2$60" with lore "&3Køb 1 stegt laks" to close then run [execute player command "/køb1stegtlaksafmanden1232"]
format slot 5 of player with 8 of cooked salmon named "&2$480" with lore "&3Køb 8 stegte laks" to close then run [execute player command "/køb8stegtlaksafmanden1232"]
format slot 7 of player with 16 of cooked salmon named "&2$960" with lore "&3Køb 16 stegte laks" to close then run [execute player command "/køb16stegtlaksafmanden1232"]
stop
command /købkuglefiskfiskemanden123213:
trigger:
open chest with 1 rows named "&9&lKøb kuglefisk" to player
format slot 3 of player with 1 of Pufferfish named "&2$35" with lore "&3Køb 1 kuglefisk" to close then run [execute player command "/køb1kuglefiskafmanden1232"]
format slot 5 of player with 8 of Pufferfish named "&2$280" with lore "&3Køb 8 kuglefiske" to close then run [execute player command "/køb8kuglefiskafmanden1232"]
format slot 7 of player with 16 of Pufferfish named "&2$560" with lore "&3Køb 16 kuglefiske" to close then run [execute player command "/køb16kuglefiskafmanden1232"]
stop
command /køb1stegtfiskafmanden1232:
trigger:
if player's balance >= 50:
give potato to player
subtract 50 from player's balance
message "&9Fisker &e> &4&lKøbte 1 stegt fisk."
else:
message "&7Du har ikke nok penge."
command /køb8stegtfiskafmanden1232:
trigger:
if player's balance is greater than or equal to 400:
subtract 400 from player's balance
give player 8 of 350
message "&9Fisker &e> &4&lKøbte 8 stegte fisk."
stop
command /køb16stegtfiskafmanden1232:
trigger:
if player's balance is greater than or equal to 800:
subtract 800 from player's balance
give player 16 of 350
message "&9Fisker &e> &4&lKøbte 16 stegte fisk."
stop
command /køb1stegtlaksafmanden1232:
trigger:
if player's balance is greater than or equal to 60:
subtract 60 from player's balance
give player 1 of 350:1
message "&9Fisker &e> &4&lKøbte 1 stegt laks."
stop
command /køb8stegtlaksafmanden1232:
trigger:
if player's balance is greater than or equal to 480:
subtract 480 from player's balance
give player 8 of 350:1
message "&9Fisker &e> &4&lKøbte 8 stegte laks."
stop
command /køb16stegtlaksafmanden1232:
trigger:
if player's balance is greater than or equal to 960:
subtract 960 from player's balance
give player 16 of 350:1
message "&9Fisker &e> &4&lKøbte 16 stegte laks."
stop
command /køb1kuglefiskafmanden1232:
trigger:
if player's balance is greater than or equal to 35:
subtract 35 from player's balance
give player 1 of 349:3
message "&9Fisker &e> &4&lKøbte 1 kuglefisk."
stop
command /køb8kuglefiskafmanden1232:
trigger:
if player's balance is greater than or equal to 280:
subtract 280 from player's balance
give player 8 of 349:3
message "&9Fisker &e> &4&lKøbte 8 kuglefiske."
stop
command /køb8kuglefiskafmanden1232:
trigger:
if player's balance is greater than or equal to 560:
subtract 560 from player's balance
give player 16 of 349:3
message "&9Fisker &e> &4&lKøbte 16 kuglefiske."