FANDOM


Created by Taz.

Using "RC_Core.rcm"
; testingrc1 1.26
; Date/Time: 10:23:54 PM on 7/9/2009
; By Tazco on NADDAZ
;Buff_Defensive Arms
Function Main()
Player% = Actor()
Target% = ContextActor()
Pname$ = Name(Player)
PlayerLevel% = ActorLevel(Player)
Prayerlvl% = Attribute(Player, "Prayer")
Bufflevel% = AbilityLevel(Player, "Buff Defensive Arms")
Buffamount% = Prayerlvl + PlayerLevel / 2 + Bufflevel * 5 / 23

ScriptLog("Buff_Defensive Armsrunning by " + Pname)


If (Prayerlvl <= 0)
    OutPut(Player, "You need to recharge your prayer, to use this buff, you need 1 prayer point.", 245, 123, 123)
    Return
 EndIf 
 
 Buffcost% = Attribute(Player, "Prayer") - 1
 SetAttribute(Player, "Prayer", Buffcost)  ; take 1 prayer from player for buff cost
 
 If (BuffAmount > 75) ;set max amount that buff can be
     Buffamount% = 75
EndIf    


Doevents(500)
If (Prayerlvl >= 1) ; set prayer level required to use ability
 
     AddActorEffect(Player, "Defensive Arms + Def", "Defence", Buffamount, 1800, 250) ; add buff icon should last 30 min
    OutPut(Player, "You have buffed with Defensive Arms " + Buffamount, 110, 54, 43) 

Else
OutPut(Player, "You need a prayer level of 1 to use this Prayer ability", 125, 32, 43)
Return
EndIf
End Function