// CREDITS: Stanic - Daniel Barbosa Maranhão - Email: daniel.bmaranhao@hotmail.com | Skype: daniel.bmaranhao. Recife - BRAZIL. // // SCRIPT VERSION: 1.03 // FILE LAST UPDATED: 14-April-2014 // // Script to create a Boss with some guardians to protect him. // How to Install: // 1. Copy and past under yours Boss CHARDEF, the next CHARDEF. // [Note that the TAGS must be under the CHARDEF] // 2. Now, change the tags to configure your boss like you wish. // 3. Save the script and Resync your Sphere // 4. Create your Boss in-game and test the system :P // // // [CHARDEF] // TAG0.Guardian.ID= //CHARDEF of the guardians. // TAG0.Guardian.Amount= //The maximum quantity of guardians that the Boss will spawn. When created, the boss will spawn this quantity. // TAG0.Guardian.LossLife= //When some guardian die, the quantity of life decrease of the boss. // TAG0.Guardian.Delay= //When some guardian die, the delay in seconds to spawn a new guardian. // TAG0.Guardian.DeathFlags= //Set Death Flags to the guardians. Take a look into sphere_defs.scp. // TEVENTS=e_BossSettings //Don't change this. // // ON=@SpawnGuardian //Custom trigger that you can use to customize your boss to do something when a new guardian is spawned. // ON=@DeathGuardian //Custom trigger that you can use to customize your boss to do something when some guardian dies. // // Example: [CHARDEF c_orc_lord_boss] ID=c_ettin CAN=MT_USEHANDS|MT_WALK|MT_RUN DAM=10,50 TAG0.Guardian.ID=c_orc TAG0.Guardian.Amount=5 TAG0.Guardian.LossLife=10 TAG0.Guardian.Delay=15 TAG0.Guardian.DeathFlags=002 TEVENTS=e_BossSettings ON=@Create NPC=brain_monster FAME=2500 KARMA=-2500 STR={147 215} DEX={91 115} INT={61 85} MAXHITS={95 123} WRESTLING={60.1 85.0} TACTICS={75.1 90.0} MAGICRESISTANCE={70.1 85.0} ON=@SpawnGuardian ANIM 12 ON=@DeathGuardian ANIM 5 ////////////////////////////////////////// [EVENTS e_BossSettings] ON=@RegionEnter IF !() TIMERF 1,NewGuardian_Boss ENDIF ON=@AfterClick LOCAL.ClickMsgText .= " [Boss]" ON=@Attack IF (==) return 1 ENDIF ON=@Destroy DeathGuardian_Boss 1 [EVENTS e_GuardianBoss] ON=@AfterClick LOCAL.ClickMsgText .= " [Guardian]" ON=@Attack IF (==) || () return 1 ENDIF ON=@Death IF !(.TAG0.Guardian.Deathing>) UID..DeathGuardian_Boss 0 ENDIF ////////////////////////////////////////// [FUNCTION NewGuardian_Boss] IF () && () EMOTE has summoned ==1)?a Guardian:some Guardians> TRIGGER @SpawnGuardian FOR SERV.NEWNPC NEW.P=

IF () NEW.HOME= IF () NEW.HOMEDIST= NEW.MOVENEAR ,> ENDIF ENDIF NEW.TAG.Guardian.Boss= NEW.TAG.DeathFlags= NEW.EVENTS +e_GuardianBoss NEW.UPDATEX NEW.TIMERF 1,GuardianCheck_Boss SetGuardian_Boss ENDFOR ENDIF [FUNCTION SetGuardian_Boss] FOR REF1=> IF !() TAG0.Guardian.= return 1 ENDIF ENDFOR [FUNCTION GuardianCheck_Boss] IF (> > 20) GO .P> ENDIF [FUNCTION DeathGuardian_Boss] IF () TAG.Guardian.Deathing=1 FOR REF1=> IF () REF1.HITS=0 ENDIF ENDFOR ELIF () TRIGGER @DeathGuardian IF () HITS -= EMOTE was shot down and lost hits ELSE EMOTE was shot down ENDIF TIMERF ,NewGuardian_Boss 1 ENDIF [EOF]