Date: 2017/02/20 23:18:10 UTC-08:00
Type: Denizen Script
classSelection:
type: world
debug: true
events:
on player right clicks npc in cu@classHall:
- define className <npc.name.nickname>
- if <player.has_flag[hasClass]> {
- ^detemine passively CANCELLED
- ^queue clear
}
else if <context.entity.name.is[!=].to[<player.heroes.primary_class.name>]> {
- ^flag player chose:!
- adjust <player.heroes> primary_class:<def[className]>
- flag player chose:<def[className]>
- flag player hasClass duration:6000s
}
else if <player.has_flag[hasClass]> {
- ^detemine passively CANCELLED
- narrate "<&c>You have already chosen a class!"
}
else {
- ^determine passively CANCELLED
- narrate "<&c>You have already chosen a class!"
}