Date: 2014/08/02 18:21:04 UTC-07:00
Type: Denizen Script
'Ranger World Events':
type: world
events:
on player left clicks with i@WAND:
- if !<player.flag[Class]> == Mage determine cancelled
- run CastSpell def:<player>|<player.flag[EquippedAbility]>|<player.flag[EquippedAbility]>Launch
- determine cancelled
SnipeLaunch:
type: task
definitions: player
script:
- ^narrate "<red>Script ran."
- ^define ManaCost <player[%player%].flag[Level].add[<player[%player%].flag[Dexterity].mul[0.5].asint>]>
- ^if !<player[%player%].flag[CurrentMana].asint> > %ManaCost% {
- ^narrate "<red>You don't have enough mana to do that."
- ^queue clear
}
- ^flag player player:%player% CurrentMana:<player.flag[CurrentMana].sub[<def[ManaCost].asint>]>
- ^flag player player:%player% SnipeCD:true duration:8s
- ^define range <player[%player%].flag[Intelligence].add[5].asint>
- ^push arrow origin:<%player%.eye_location> origin:%player% destination:<%player%.location.cursor_on[<def[range].asint>]> "script:SnipeImpact def:%player%"
SnipeImpact:
type: task
definitions: %player
script:
- ^narrate "%player%"
- ^hurt <player.flag[Level].add[<player.flag[Dexterity]>]> %hit_entities%