Date: 2015/06/04 19:59:30 UTC-07:00
Type: Denizen Script
CallHorse:
type: command
name: callhorse
usage: /callhorse
description: Calls your horse to you!
# allowed help:
# - determine <context.server.not>
script:
- if <player.has_flag[haveHorse]> && <player.flag[havehorse].as_entity.is_leashed> {
- narrate format:ServerChat "Your horse is leashed and cannot be called!"
- log "<player.name> tried to call a leashed horse!" file:plugins/Denizen/logs/stablemaster.log
}
else if <player.has_flag[haveHorse]> {
- narrate format:ServerChat "Your horse has been teleported to your location!"
- teleport <player.flag[haveHorse].as_npc> <player.location>
- log "<player.name> called their horse." file:plugins/Denizen/logs/stablemaster.log
}
else {
- narrate format:ServerChat "You do not have a horse!" targets:<player>
- log "<player.name> attempted to call their horse but they do not have one." file:plugins/Denizen/logs/stablemaster.log
}