FANDOM


Created by Taz.

Using "RC_Core.rcm"
; testingrc1 1.26
; Date/Time: 11:46:13 PM on 11/11/2011
; By Naddaz on NADCO
;Intended to run and repeat till flag is lost or turned in, so it can be respawned.
;SuperGlobal 11 Used to max players health and mana when the pvp flag ring gets equiped.
;Ring max out will be done in regen but only if super global 11 is 5 or more.

Function Main()
Player = Actor()
Target = Contextactor()



HasFlag% = HasItem(Player, "Pvp Flag")

;Remove flag before giving one if player has one already.
If (HasFlag >= 1) ;if amount of flags is 1 or more more take them and give only 1.
GiveItem(Player, "Pvp Flag", - 10) ;take 10 in case player has multible 
GiveItem(Player, "Pvp Flag", 1) ;give one to insure player has one
OutPut(Player, "You have recived the Pvp flag, and your power grows!!", 190, 67, 123) ;output message to player
SetAttribute(Target, "Health", 0) ;kill target pvp flag.


Endif

If (HasFlag = 0) ;player does not have item give one to them.
GiveItem(Player, "Pvp Flag")
OutPut(Player, "You have recived the Pvp flag, and your power grows!!", 190, 67, 123) ;output message to player
SetAttribute(Target, "Health", 0) ;kill target pvp flag.

Endif

;set the super global max hp and mp will be incressed for ring equip.
SetSuperGlobal(11, 5)

;DoEvents(500)
 
  ThreadExecute("Pvp_Battle_Check", "Main", Player, 0)
 
 
 
 End Function