Created by Taz.
Using "RC_Core.rcm" ; testingrc1 1.26 ; Date/Time: 12:47:42 AM on 11/13/2011 ; By Naddaz on NADCO ;Flag will spawn on its own via the entry script on death. ;SuperGlobal 12 Used to see if PVP_battle check script is running. If it is then there is a player holding the flag. ;Updated dec 27 2011 ;Taking flag from player and stoping emitter when player turns in the flag. Function Main() Player = Actor() PHealth% = Attribute(Player, "Health") PMana% = Attribute(Player, "Mana") SetSuperGlobal(10, 5) PZone$ = ActorZone(Player) CreateEmitter(Player, "FrostBall", 10, 5000) ;make player glow with power TickAmount% = 0 PlayerInctance% = ActorZoneInstance(Player) SetSuperGlobal(12, 5) ;this script is running 0 so no flag respawn. Repeat DoEvents(1000) HasFlag% = HasItem(Player, "Pvp Flag") FlagItem$ = ItemName(ActorRing(Player, 1)) RingItemName$ = "Pvp Flag" FlagID$ = ActorID("Pvp Flag", "BattleGround") ;flag Id Flagturnedin% = SuperGlobal(12) ; Output(Player, "Item name is " + FlagItem) PHP% = Attribute(Player, "Health") Tickamount% = TickAmount + 1 ;Get player cords to spawn flag. PlayerX% = ActorX(Player) PlayerY% = ActorY(Player) PlayerZ% = ActorZ(Player) If (HasFlag = 0) If Not (FlagItem = RingItemName) ;if player loses the flag stop this repeat. PHP% = 1 TickAmount% = 0 SetSuperGlobal(10, 5) ;set back to 5 so flag will not spawn in normal spots. If (Flagturnedin >= 5) If (ActorInTrigger(Player, 0)) ;player in trigger Else SpawnFlag$ = Spawn(FlagID, PZone, PlayerX, PlayerY, PlayerZ, "Pvp_Flag_Right Click", "", PlayerInctance) EndIf output(player, "Test" + FlagItem) EndIf EndIf EndIf If (PHP <= 15) ;If player is low health do not restart emitter TickAmount% = 0 PHP% = 1 SetSuperGlobal(10, 0) EndIf ;Restart emitter every 5 secs If (TickAmount >= 5) ;restart the emitter TickAmount% = 0 CreateEmitter(Player, "FrostBall", 10, 5000) ;make player glow with power EndIf ;OutPut(Player, "Tick amount = " + TickAmount) Until(PHP <= 1) GiveItem(Player, "Pvp Flag", - 1) ;take flag from player SetSuperGlobal(12, 0) ;this script is done so allow flag respawn. ;Output(Player, "end repeat") End Function