I made this quests skript and i can't figure out why the variable doesnt work..
The skript stops at where i wrote "THIS IS WHERE IT STOPS"
The skript stops at where i wrote "THIS IS WHERE IT STOPS"
Code:
Command /Quests:
trigger:
if {quest1.%{_p}%} is not set:
set {quest1.%{_p}%} to 1
if {currentquest::%player%} is not set:
set {currentquest::%player%} to 1
if {currentquest::%player%} is 1:
openQuests(player, "quest1")
if {currentquest::%player%} is 2:
openQuests(player, "quest2")
Function openQuests(p: player, t: string):
if {_t} is "quest1":
if {quest1.%{_p}%} is 1: #THIS IS WHERE IT STOPS
send "&cQuest Master: &7Hello mysterious traveler!" to {_p}
play sound "entity.villager_yes" with volume 10 and pitch 1 at {_p} for {_p}
set {quest1.%{_p}%} to 2
else:
if {quest1.%{_p}%} is 2:
send "&cQuest Master: &7I actually need your help.." to {_p}
set {quest1.%{_p}%} to 3
else:
if {quest1.%{_p}%} is 3:
send "&cQuest Master: &7Can you mine 32 coal ore, and deliver the coal here?" to {_p}
set {quest1.%{_p}%} to 4
else:
if {quest1.%{_p}%} is 4:
if {quest1active.%{_p}%} is higher than or equal to 32:
add 100 to {Tokens::%{_p}%}
send "&cQuest Master: &7Thanks for doing that for me!" to {_p}
set {quest1.%{_p}%} to 5
set {currentquest::%{_p}%} to 2
else:
send "&cActive Quest: &7Collect 32 coal and deliver them to the Quest Master. &eReward: &7100 Tokens" to {_p}
if {_t} is "quest2":
if {quest2.%{_p}%} is not set:
send "&cQuest Master: &7I actually need more help!" to {_p}
set {quest2.%{_p}%} to 1
else:
if {quest2.%{_p}%} is 1:
send "&cQuest Master: &7Can you kill 5 players?" to {_p}
set {quest2.%{_p}%} to 2
if {quest2.%{_p}%} is 2:
if {quest2active.%{_p}%} is higher than or equal to 5:
#Execute console command "/Crate key %{_p}% vote"
set {quest2.%{_p}%} to 4
set {currentquest::%{_p}%} to 3
else:
send "&cActive Quest: &7Kill 5 players. &eReward: &7Vote Key" to {_p}