<Insert skins here>

Gurluas

New Adventurer
Joined
Aug 28, 2004
Messages
1,775
Reaction score
4
Age
33
oh well... how much free time do you have anyway?
it surprises me you cant make very simple scripts or things :S
(rename orc, change model path... forexample...)

anyway next month you have more time?
also did you get a reply about orcplace?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Changing the model the script uses is easy, changing the model is hard, cuz the model you are refering to ain't ready to work with the script. In anycase, I'd rather you not even think about orcplace2 until you think of a concept that uses the current scripts.

Bandit Boss script is gonna take time... Tis what I got so far:
Code:
//Bandit Boss for The_Keep by Thothie from scratch
//BOSS_TYPES
//1 = Fire Dagger - Flame burst, turbo move, leap, invisiblity / teleport
//2 = Dark Maul - slow, heavy damage, lots of HP, pull move, large AOE stun
//3 = Rune Axe - Fast swing, large AOE stun charge, pull move
//4 = Greater ice Blade - Slow swing, heavy damage, Freeze solid, blizzard (aim at distant), freezing sphere
//5 = Orion Bow - fires magic arrows of various size, scatter arrows of various types, invisiblity / teleport
//6 = Nova Blade - Flame Burst, Flaming Skull, Volcano, Huge fireball, Firewall, parry
//All types have 50% armor, stunning kicksg
//All types can pull potions randomly (limit: 8 - 3 health, 3 resistance, 2 enhance [demon,speed,protect] )
//Drinks resistance potion if struck 5 times by element for more than 50 damage
{
	//action anims
	const ANIM_DRINK swordready1_R //drink_done
	const ANIM_AXE_FAST battleaxe_swing1_R //axe_fast
	const ANIM_AXE_SLOW battleaxe_swing1_L //axe_slow
	const ANIM_SWORD_FAST longsword_swipe_R //sword_fast
	const ANIM_SWORD_SLOW longsword_swipe_L //sword_slow
	const ANIM_BOW shootbow //{ event 500 9 "bow_draw" }  { event 500 28 "bow_stretch" }  { event 500 42 "bow_shoot" }
	const ANIM_SWING_SLOW swordswing1_R //swing_slow //1h swing
	const ANIM_SWING_FAST swordswing2_R //swing_fast //1h swing
	const ANIM_JAB swordjab1_R //attack_jab //v. fast
	const ANIM_KICK_HIGH stance_normal_highkick_r1 //kick_high
	const ANIM_KICK_LOW stance_normal_lowkick_r1 //kick_low //slow
	const ANIM_PARRY longsword_parry
	const ANIM_SPELL prepare_fireball //prep_done
	const ANIM_CAST throw_fireball_R //spell_throw

	//move anims
	const ANIM_WALK_NORM walk2
	const ANIM_RUN_NORM run
	const ANIM_MOVE_SLOW run_squatwalk1_R
	setvar ANIM_WALK walk2
	setvar ANIM_RUN run
	const ANIM_HOP jump
	const ANIM_LEAP long_jump
	const ANIM_DEATH die_backwards1

	//noize (some called direct, usually only here if I hadn't cosen the sound during writeup)
	const SOUND_PARRY xxx //alter player/swordready.wav
	const SOUND_POWERUP xxx //alter player/shout1.wav
	const SOUND_LEAP xxx //alter player/shout1.wav
	const SOUND_SATTACK xxx //alter player/shout1.wav //alias
	const SOUND_PULL_TAUNT xxx
	const SOUND_PULL xxx
	const SOUND_TAUNT xxx //victory
	const SOUND_SWING_FAST weapons/cbar_miss1.wav
	const SOUND_SWING_SLOW1 zombie/claw_miss1.wav
	const SOUND_SWING_SLOW2 zombie/claw_miss2.wav
	const SOUND_DEATH xxx
	const SOUND_BOW_STRETCH xxx
	const SOUND_BOW_SHOOT
	//precache SOUND_DEATH

	//frequencies
	const FREQ_HEALTH 20.0 //minimum number of seconds between health potions (all types)
	const FREQ_PULL 10.0 //time between pull attacks (all types)
	const FREQ_KICK $rand(10,30) //(all types)
	const FREQ_VOLCANO 45.0 //volcano delay (type 6)
	const FREQ_TURBO $randf(40,60) //turbo attack (type 1)
	const FREQ_SPECIAL $randf(15,30) //aoe stun (2), charge (3), freeze/blizz(4), scattershot (5)
	const FREQ_FIRE $rand(10,20) //fireball/skull/wall(6) flame burst (1&6)
	const FREQ_INVIS $rand(30,120) //type (1 & 5)

	//combat
	setvar CAN_FLINCH 1
	const FLINCH_DAMAGE_THRESHOLD 200
	const FLINCH_CHANCE 50
	const FLINCH_ANIM longsword_parry

	const ATTACK_RANGE 96 //swing if this close
	const ATTACK_HITRANGE 180 //hits if this close
	const ATTACK_HITCHANCE 85% //chance to hit
	setvar ATTACK_MOVERANGE 40 //moves this close
	
	//damage
	const DMG_KICK $rand(100,200)
	const DMG_MACE $rand(300,500)
	const DMG_SWORD_FAST $rand(30,80)
	const DMG_SWORD_SLOW $rand(100,200)
	const DMG_SWORD_JAB $rand(100,200)
	const DMG_AXE_FAST $rand(50,100)
	const DMG_AXE_SLOW $rand(200,300)
	const DMG_DAGGER $rand(25,75)
	const DMG_NOVA_SLOW $rand(300,600)
	const DMG_NOVA_FAST $rand(100,200)
	const DMG_NOVA_STAB $rand(200,400)
	const DMG_BURN_DAGGER $rand(10,20)
	const DMG_BURN_MACE $rand(30,60)
	const DMG_FLAME_BURST 100
	const DMG_FIRE_BALL 200
	const DMG_ARROW $rand(50,100)

	//unique
	const ELEMENT_LIMIT 5 //how many times to be struck by element before using potion
	const ARROW_SPEED 1200

	const BEAM_SPRITE lgtning.spr

	//media precache
	const MONSTER_MODEL npc/bandit_boss.mdl
	precache MONSTER_MODEL

	//magic dart
	precache nhth1.spr
}

#include monsters/base_monster_new

{ npc_spawn

	setmodel MONSTER_MODEL
	width 40
	height 120
	race rogue
	takedmg all 0.5
	saytextrange 2048
	
	setvard HEALTH_AMMO 3
	setvard RESIST_AMMO 3
	setvard SPECIAL_AMMO 3
	setvard FIRE_STRUCK 0
	setvard COLD_STRUCK 0
	setvard POISON_STRUCK 0
	setvard LIGHTNING_STRUCK 0
	setvard FAST_SWINGS 0

	if ( BOSS_TYPE equals 'BOSS_TYPE' ) setvard BOSS_TYPE $rand(1,6)

	//setmodelbody 1 0 //unarmed
	//setmodelbody 1 1 //fire dagger
	//setmodelbody 1 2 //dark maul
	//setmodelbody 1 3 //Rune Axe
	//setmodelbody 1 4 //greater ice blade
	//setmodelbody 1 5 //orion bow
	//setmodelbody 1 6 //Nova Blade
	//setmodelbody 1 7 //potion - red
	//setmodelbody 1 8 //potion - green

	if ( BOSS_TYPE == 1 )
	{
		name Plevmus of the Hidden Knife
		hp 3000
		setmodelbody 1 1
		setvar ANIM_ATTACK ANIM_STAB
	}

	if ( BOSS_TYPE == 2 )
	{
		name Golgar the Hammer
		hp 6000
		setmodelbody 1 2
		setvar ANIM_ATTACK ANIM_AXE_SLOW
	}

	if ( BOSS_TYPE == 3 )
	{
		name Vultekh of the Runes
		hp 5000
		setmodelbody 1 3
		setvar ANIM_ATTACK ANIM_AXE_FAST
	}	

	if ( BOSS_TYPE == 4 )
	{
		name Kryoh of the Frozen Blade
		hp 4000
		setmodelbody 1 4
		setvar ATTACK_MOVERANGE 256
		setvar ANIM_ATTACK ANIM_SWING_FAST
	}	

	if ( BOSS_TYPE == 5 )
	{
		name Xaron of the Orion Bow
		hp 3000
		setmodelbody 1 5
		setvar ANIM_ATTACK ANIM_BOW
	}

	if ( BOSS_TYPE == 6 )
	{
		name Demonicus of the Burning Blade
		hp 9000
		setmodelbody 1 6
		setstat parry 50
		setvar ANIM_ATTACK ANIM_SWORD_SLOW
	}

	local L_MAP_NAME $lcase(game.map.name)
	if ( L_MAP_NAME isnot keep_test ) local GENERIC_NAME 1
	if ( L_MAP_NAME isnot the_keep ) local GENERIC_NAME 1
	if ( GENERIC_NAME ) name a|Bandit Leader
}

{ npc_post_spawn
	setvard HALF_HEALTH game.monster.maxhp
	divide HALF_HEALTH 2

	setvard FIRST_SPEC_POT_HEALTH game.monster.maxhp
	multiply FIRST_SPEC_POT 0.75

	setvard QUARTER_HEALTH game.monster.maxhp
	multiply QUARTER_HEALTH 0.25

	setvard ORIG_ATTACK ANIM_ATTACK
	setvard ORIG_WEAPON BOSS_TYPE
}

{ game_damaged //PARAM1=attacker PARAM2=Damage PARAM3=DamageType

	if ( PARAM2 > 30 )
	{
		//sweep kick all if surrounded (repulse)
		getents player 128
		if ( GET_COUNT >= 3 )
		{
			if !SWEEP_KICK_DELAY
			setard SWEEP_KICK_DELAY 1
			callevent FREQ_KICK reset_sweep_kick_delay
			local SWEEP_KICK 1
			setvar CAN_FLINCH 0 //suspend flinch until this is done
			playanim critical ANIM_KICK_LOW
			local EXIT_SUB 1
		}
		if !SWEEP_KICK //don't do both kick and drink at same time (conflict)

		if ( BANDIT_TYPE == 5 )
		{
			//archer will sometimes leap away when attacked
			callevent leap_away $get(PARAM1,id)
		}


		//drink health pot when low on health
		if !AM_INVISIBLE
		if !DRINKING_POT
		if game.monster.hp < HALF_HEALTH
		if !HEALTH_POT_DELAY
		setvard HEALTH_POT_DELAY 1
		callevent FREQ_HEALTH reset_health_pot_delay
		callevent drink_pot health
		local EXIT_SUB 1
	}
	if !EXIT_SUB


	//monster drinks special potions at 75% health (effect ends at 50%) and 25% health (lasts until death)
	if ( !DID_FIRST_POT )
	{
		if game.monster.hp < FIRST_SPEC_POT_HEALTH
		setvard DID_FIRST_POT 1
		setvard ON_FIRST_POT 1
		callevent drink_special
	}

	if ( ON_FIRST_POT )
	{
		if game.monster.hp <= HALF_HEALTH
		setvard ON_FIRST_POT 0
		callevent end_special_effect
	}

	if ( !DID_SECOND_POT )
	{
		if game.monster.hp < QUARTER_HEALTH
		setvard SECOND_SPEC_POT 1
		callevent drink_special
	}

	if ( $get(PARAM1,range) > ATTACK_HITRANGE )
	{
		//if struck from afar, pull player to you
		if !AM_INVISIBLE
		setvard PULL_TARGET PARAM1 //used by pull attack / freeze, etc
		if ( PARAM2 > 20 ) local PULL_CHANCE $rand(1,10)
		if ( PARAM2 > 60 ) local PULL_CHANCE $rand(1,2)
		if !PULL_DELAY
		setvard PULL_DELAY 1
		callevent FREQ_PULL reset_pull_delay
		callevent tractor_beam PULL_TARGET
	}

	if ( RESIST_AMMO > 0 )
	{
		//if struck by elemental attack repeatedly, use resistance potion
		if PARAM2 > 50
		if !AM_INVISIBLE
		if !DRINKING_POT

		dbg temp struck_by_type PARAM3 ( FIRE_STRUCK COLD_STRUCK LIGHTNING_STRUCK POISON_STRUCK )

		if ( PARAM3 equals fire ) add FIRE_STRUCK 1
		if ( PARAM3 equals cold ) add COLD_STRUCK 1
		if ( PARAM3 equals lightning ) add LIGHTNING_STRUCK 1
		if ( PARAM3 equals poison ) add POISON_STRUCK 1

		if ( FIRE_STRUCK >= ELEMENT_LIMIT )
		{
			if ( !USED_FIRE_POT ) callevent drink_pot fire
		}

		if ( COLD_STRUCK >= ELEMENT_LIMIT )
		{
			if ( !USED_COLD_POT ) callevent drink_pot cold
		}

		if ( LIGHTNING_STRUCK >= ELEMENT_LIMIT )
		{
			if ( !USED_LIGHTNING_POT ) callevent drink_pot lightning
		}

		if ( POISON_STRUCK >= ELEMENT_LIMIT )
		{
			if ( !USED_POISON_POT ) callevent drink_pot poison
		}
	}
}

{ reset_sweep_kick_delay
	setvard SWEEP_KICK_DELAY 0
}
{ reset_health_pot_delay
	setvard HEALTH_POT_DELAY 0
}
{ reset_pull_delay	
	setvard PULL_DELAY 0
}

{ drink_special
	local RND_POT $rand(1,3)
	if ( BOSS_TYPE == 1 ) local RND_POT $rand(1,2) //dagger bandit does not use speed potion, as he has it naturally
	if ( RND_POT == 1 ) callevent drink_pot demon
	if ( RND_POT == 2 ) callevent drink_pot protection
	if ( RND_POT == 3 ) callevent drink_pot speed
}

{ drink_pot

	if !DRINKING_POT //don't try to change pots
	setvard DRINKING_POT 1

	if ( PARAM1 isnot health ) setmodelbody 1 8 //green pot
	if ( PARAM1 equals health ) setmodelbody 1 7 //red pot
	callevent npcatk_suspend_ai 2.0
	playanim break
	playanim critical ANIM_DRINK
	setvard DRINK_TYPE PARAM1
}

{ drink_done

	callevent npcatk_resume_ai

	setvard DRINKING_POT 0

	playsound 0 10 items/drink.wav

	if ( DRINK_TYPE equals fire )
	{
		setvard USED_FIRE_POT 1
		subtract RESIST_AMMO 1
		local GLOW_COLOR (255,0,0)
		callevent fire_immune
		local OUT_MSG game.monster.name
		stradd OUT_MSG " has drank a potion and is now immune to fire!"
		infomsg all "POTION OF IMMUNITY TO FIRE" OUT_MSG
	}

	if ( DRINK_TYPE equals cold )
	{
		setvard USED_COLD_POT 1
		subtract RESIST_AMMO 1
		local GLOW_COLOR (128,128,255)
		callevent cold_immune
		local OUT_MSG game.monster.name
		stradd OUT_MSG " has drank a potion and is now immune to cold attacks!"
		infomsg all "POTION OF IMMUNITY TO COLD" OUT_MSG
	}

	if ( DRINK_TYPE equals poison )
	{
		setvard USED_POISON_POT 1
		subtract RESIST_AMMO 1
		local GLOW_COLOR (0,255,0)
		callevent poison_immune
		local OUT_MSG game.monster.name
		stradd OUT_MSG " has drank a potion and is now immune to poison!"
		infomsg all "POTION OF IMMUNITY TO POISON" OUT_MSG
	}

	if ( DRINK_TYPE equals lightning )
	{
		setvard USED_LIGHTNING_POT 1
		subtract RESIST_AMMO 1
		local GLOW_COLOR (255,255,0)
		callevent lightning_immune
		local OUT_MSG game.monster.name.full
		stradd OUT_MSG " has drank a potion and is now immune to lightning!"
		infomsg all "POTION OF IMMUNITY TO POISON" OUT_MSG
	}

	if ( DRINK_TYPE equals health )
	{
		subtract HEALTH_AMMO 1
		local GLOW_COLOR (0,255,0)
		local HP_GIVE game.monster.maxhp
		subtract HP_GIVE game.monster.hp
		givehp HP_GIVE
		local OUT_MSG game.monster.name.full
		stradd OUT_MSG " has used a poition of health!"
		infomsg all "POTION OF HEALTH" OUT_MSG
	}

	if ( DRINK_TYPE equals protection )
	{
		setvard SPEC_TYPE protection
		local GLOW_COLOR (255,255,255)
		setvard GLOW_ON 1
		setvard GLOW_LOOP_COLOR (255,255,255)
		callevent 5.0 glow_loop
		takedmg all 0.25

		local OUT_MSG game.monster.name.full
		stradd OUT_MSG " has used a poition of protection!"
		infomsg all "POTION OF PROTECTION" OUT_MSG

	}

	if ( DRINK_TYPE equals demon )
	{
		setvard SPEC_TYPE demon
		local GLOW_COLOR (255,0,0)
		setvard DEMON_LEVEL 20
		setvard DEMON_NOHP_LOSS 1
		callevent 5.0 demon_blood

		local OUT_MSG game.monster.name.full
		stradd OUT_MSG " has used a vial of demon blood!"
		infomsg all "POTION OF DEMON BLOOD" OUT_MSG
	}

	if ( DRINK_TYPE equals speed )
	{
		if BOSS_TYPE != 1 //dagger type's speed does not end at 50% health
		setvard SPEC_TYPE speed
		local GLOW_COLOR (255,0,255)
		callevent 5.0 turbo_on

		local OUT_MSG game.monster.name.full
		stradd OUT_MSG " has used a potion of speed!"
		infomsg all "POTION OF SPEED" OUT_MSG
	}

	effect glow ent_me GLOW_COLOR 128 5 5

	setmodelbody 1 ORIG_WEAPON
}

{ npc_flinch

	setvard DRINKING_POT 0
}

{ [override] npcatk_checkflinch //PARAM1 = incoming damage amt

	//this monster can flinch while AI suspended

	if ( CAN_FLINCH )
	{
		if !FLINCHED_RECENTLY
		if ( game.monster.hp < HALF_HEALTH )
		{
			if PARAM1 > FLINCH_DAMAGE_THRESHOLD
			if ( $rand(1,100) <= FLINCH_CHANCE ) 
			{
				callevent npc_flinch //external - can be used to select flinch anim
				playanim break
				playanim critical FLINCH_ANIM
			}
			setvard FLINCHED_RECENTLY 1
			callevent FLINCH_DELAY npcatk_reset_flinch
		}
	}
}

{ game_parry

	playanim critical ANIM_PARRY
	playsound 0 10 SOUND_PARRY
}

{ end_special_effect
	//end demon/speed/protection pot here
	if ( SPEC_TYPE equals demon )
	{
		setvard DEMON_BLOOD 0
		local OUT_MSG game.monster.name.full
		stradd OUT_MSG "'s demon blood potion has run out."
		infomsg all "EFFECTED ENDED" OUT_MSG
	}

	if ( SPEC_TYPE equals protection )
	{
		takedmg all 0.6
		setvard GLOW_ON 0
		local OUT_MSG game.monster.name.full
		stradd OUT_MSG "'s protection potion has run out."
		infomsg all "EFFECTED ENDED" OUT_MSG
	}

	if ( SPEC_TYPE equals speed )
	{
		callevent turbo_off
		local OUT_MSG game.monster.name.full
		stradd OUT_MSG "'s speed potion has run out."
		infomsg all "EFFECTED ENDED" OUT_MSG
	}
}

{ turbo_on

	setvard GLOW_ON 1
	setvard SPEC_TYPE speed
	callevent glow_loop

	movespeed 2.0
	setanim.movespeed 2.0
	setanim.framerate 3.0

	setvar BASE_FRAMERATE 3.0
	setvar BASE_MOVESPEED 3.0

	//callevent 10.0 turbo_off
}

{ do_turbo
	callevent turbo_on
	callevent 10.0 turbo_off
}

{ turbo_off

	movespeed 1.0
	setanim.movespeed 1.0
	setanim.framerate 1.0

	setvar BASE_FRAMERATE 1.0
	setvar BASE_MOVESPEED 1.0

	if ( BOSS_TYPE == 1 ) callevent FREQ_TURBO do_turbo
}

{ tractor_beam

	if $get(PULL_TARGET,range) < 4000
	callevent npcatk_suspend_ai
	setmovedest PULL_TARGET 9999
	playsound 0 10 SOUND_PULL_TAUNT
	playanim hold ANIM_JAB
	local BEAM_START $relpos($vec(0,0,0),$vec(0,0,90))
	local BEAM_END $get(PULL_TARGET,origin)
	//<spritename> <width> <target> <attachment index> <(r,g,b)> <brightness> <noise> <duration>
	effect beam ents BEAM_SPRITE 30 PULL_TARGET 1 (255,255,0) 200 30 1.5
	callevent 1.0 tractor_beam2
}

{ tractor_beam2
	saytext Get over here!
	setangle face PULL_TARGET
	//see if setangle works on player via external
	addvelocity PULL_TARGET $relvel(10,-3000,10)
	callevent 0.25 npcatk_resume_ai
	callevent 0.5 tractor_beam3
}

{ tractor_beam3
	setangle face PULL_TARGET
	//straighten out
	local MY_YAW $vec.yaw(game.monster.angles)
	setangle face $vec(0,MY_YAW,0)
	
	callevent npcatk_settarget PULL_TARGET
}

{ kick_low
	//repulse sweep kick
	setvard KICK_ATTACK 1
	createnpc monsters/summon/stun_burst $relpos(0,0,0) $get(ent_me,id) 256 1 100 //<owner> <range> [toss1|0] [damage]
	callevent npcatk_dodamage NPCATK_TARGET ATTACK_RANGE DMG_KICK 100% blunt
	setvar CAN_FLINCH 1
}

{ kick_high
	setvard KICK_ATTACK 1
	callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_KICK 100% blunt
}

{ game_dodamage //1:AttackHit(1/0)  2:EntityHit  3:StartOrigin  4:EndOrigin

	if ( PARAM1 )
	{
		if $get(PARAM2,range) < ATTACK_HITRANGE
		if ( KICK_ATTACK )
		{
			applyeffect PARAM2 effect/effect_stun 10 1 1
			setvar ANIM_ATTACK ORIG_ATTACK
		}
		if ( FREEZE_ATTACK )
		{
			local FREEZE_CHANCE $rand(1,4)
			if ( FREEZE_CHANCE < 4 )
			{
				playsound 0 10 playsound 0 10 debris/beamstart14.wav
				applyeffect PARAM2 effects/freeze_solid 10 $get(ent_owner,id) 30
			}
			if ( FREEZE_CHANCE == 4 ) playsound 0 10 debris/zap1.wav
			setvar ANIM_ATTACK ANIM_SWORD_FAST
		}
		if ( STUN_ATTACK )
		{
			applyeffect PARAM2 effect/effect_stun 10 0 1
			createnpc monsters/summon/stun_burst $relpos(0,0,0) $get(ent_me,id) 256 0 100 //<owner> <range> [toss1|0] [damage]
		}

		if ( BOSS_TYPE == 1 ) applyeffect PARAM2 effect/effect_burn 5 $get(ent_me,id) DMG_BURN_DAGGER
		if ( BOSS_TYPE == 2 ) applyeffect PARAM2 effect/effect_burn 5 $get(ent_me,id) DMG_BURN_MACE
		if ( BOSS_TYPE == 6 )
		{
			if NORM_ATTACK
			applyeffect PARAM2 effect/effect_burn 5 $get(ent_me,id) DMG_BURN_MACE
		}
	}

	//reset atk types
	setvard KICK_ATTACK 0
	setvard FREEZE_ATTACK 0
	setvard STUN_ATTACK 0
	setvard NORM_ATTACK 0

}

{ cycle_up

	if !CYCLES_ON
	setvard CYCLES_ON 1

	callevent FREQ_KICK do_kick

	if ( BOSS_TYPE == 1 )
	{
		callevent FREQ_SPECIAL do_special
		callevent FREQ_TURBO do_turbo
		callevent FREQ_INVIS do_invis
	}

	if ( BOSS_TYPE == 2 )
	{
		callevent FREQ_SPECIAL do_special
	}

	if ( BOSS_TYPE == 3 )
	{
		callevent FREQ_SPECIAL do_special
	}

	if ( BOSS_TYPE == 4 )
	{
		callevent FREQ_SPECIAL do_special
	}

	if ( BOSS_TYPE == 5 )
	{
		callevent FREQ_SPECIAL do_special
		callevent FREQ_INVIS do_invis
	}

	if ( BOSS_TYPE == 6 )
	{
		callevent FREQ_VOLCANO do_volcano
		callevent FREQ_FIRE do_fire
	}
}

{ axe_fast
	callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_AXE_FAST ATTACK_HITCHANCE slash
	setvard NORM_ATTACK 1
	if ( BANDIT_TYPE == 3 )
	{
		if $rand(1,10) == 1
		playsound 0 10 SOUND_POWERUP
		effect glow ent_me (255,255,255) 64 1 1
		setvar ANIM_ATTACK ANIM_AXE_SLOW
	}
}

{ axe_slow //used by mace, and periodically by axe

	if ( BOSS_TYPE == 3 )
	{
		setvar ANIM_ATTACK ANIM_SWING_FAST
		playsound 0 10 SOUND_SATTACK
	}
	if ( BOSS_TYPE !=3 ) setvard NORM_ATTACK 1
	callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_AXE_SLOW ATTACK_HITCHANCE blunt
}

{ sword_fast
	setvard NORM_ATTACK 1
	callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_SWORD_FAST ATTACK_HITCHANCE slash
}

{ sword_slow //used by sword and periodically by mace

	if ( BOSS_TYPE == 2 )
	{
		setvard STUN_ATTACK 1
		setvar ANIM_ATTACK ANIM_AXE_SLOW
	}
	IF ( BOSS_TYPE != 2 ) setvard NORM_ATTACK 1
	callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_SWORD_SLOW ATTACK_HITCHANCE slash
}

{ swing_slow

	setvard NORM_ATTACK 1
	callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_SWING_SLOW ATTACK_HITCHANCE slash
}

{ swing_fast

	if ( BANDIT_TYPE == 3 )
	{
		add FAST_SWINGS 1
		if ( FAST_SWINGS >= 20 )
		{
			setvar ANIM_ATTACK ANIM_AXE_FAST
			setvard FAST_SWINGS 0
		}
	}
	setvard NORM_ATTACK 1
	callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_SWING_FAST ATTACK_HITCHANCE slash
}

{ attack_jab
	if ( BOSS_TYPE == 1 ) callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_DAGGER ATTACK_HITCHANCE slash
	if ( BOSS_TYPE == 4 )
	{
		playsound 0 10 SOUND_SATTACK
		setvard FREEZE_ATTACK 1
		callevent npcatk_dodamage NPCATK_TARGET ATTACK_HITRANGE DMG_SWORD_STAB ATTACK_HITCHANCE pierce
	}
	if ( BOSS_TYPE == 6 )
	{
		playsound 0 10 SOUND_SATTACK
		tossprojectile view 200 DMG_FIRE_BALL 0 proj_fire_ball2 (0,48,64)
		callexternal $get(ent_lastprojectile,id) lighten 30
	}
}

{ prep_done

	if ( BOSS_TYPE == 1 )
	{
		playsound 0 10 SOUND_SATTACK
		createnpc monsters/summon/flame_burst $relpos(0,0,0) $get(ent_me,id) DMG_FLAME_BURST
	}

	if ( BOSS_TYPE == 6 )
	{
		if ( NOVA_ATTACK equals fire_wall )
		{
			playsound 0 10 SOUND_SATTACK
			createnpc monsters/summon/keledros_fire_wall NOvA_TARGET $get(ent_me,id) $get(ent_me,angles) 75 20
		}

		if ( NOVA_ATTACK equals flame_burst )
		{
			playsound 0 10 SOUND_SATTACK
			local BURST_DAM DMG_FLAME_BURST
			multiply BURST_DAM 2
			createnpc monsters/summon/flame_burst $relpos(0,0,0) $get(ent_me,id) BURST_DAM
		} 
	}
}

{ my_target_died

	playsound 0 10 SOUND_TAUNT
	playanim once aim_punch1
}

{ sound_fast
	playsound 0 10 SOUND_SWING_FAST
}

{ sound_slow
	playrandomsound 0 8 SOUND_SWING_SLOW1 SOUND_SWING_SLOW2
}

{ game_death
  [[[[ommited for security reasons]]]
}

{ do_special

	local L_FREQ_SPECIAL FREQ_SPECIAL
	if ( I_R_FROZEN ) local L_FREQ_SPECIAL 5
	if ( ANIM_ATTACK equals ANIM_KICK_HIGH ) local IN_KICK 1
	if ( ANIM_ATTACK equals ANIM_KICK_LOW ) local IN_KICK 1
	if ( IN_KICK ) local L_FREQ_SPECIAL 5
	local CAN_SEE_NME $cansee(enemy)
	if ( !CAN_SEE_NME ) local L_FREQ_SPECIAL 5

	callevent L_FREQ_SPECIAL do_special

	if !I_R_FROZEN
	if !IN_KICK
	
	if ( BOSS_TYPE == 1 )
	{
		//flame burst
		playsound 0 10 SOUND_POWERUP
		effect glow ent_me (255,0,0) 128 2 2
		playanim critical ANIM_SPELL
	}

	if ( BOSS_TYPE == 2 )
	{
		//stun attack
		playsound 0 10 SOUND_POWERUP
		setvar ANIM_ATTACK ANIM_SWORD_SLOW
	}

	if ( BOSS_TYPE == 3 )
	{
		//charge attack
		playsound 0 10 SOUND_POWERUP
		playanim break
		setvard LEAP_TARGET $get(ent_lastseen,id)
		setvard POWER_ATTACK 1
		if ( $get(LEAP_TARGET,range) < 200 )
		{
			setvard PURE_FLEE 1
			callevent npcatk_flee LEAP_TARGET 300 2.0
		}
		callevent 0.1 leap_scan
	}

	if ( BOSS_TYPE == 4 )
	{
		local PICK_ATK $rand(1,2) //we'll add a third attack if we get ice_spikes working
		if ( PICK_ATK == 1 )
		{
			//blizzard at most distant target
			callevent npcatk_find_distant 2048
			callevent npcatk_suspend_ai
			dbg temp most distant returned $get(NPC_MOST_DISTANT,name)
			setmovedest NPC_MOST_DISTANT 9999
			setvard BLIZZ_TARGET NPC_MOST_DISTANT
			callevent 0.1 go_blizz
		}

		if ( PICK_ATK == 2 )
		{
			//freezing sphere
			effect glow ent_me (128,128,255) 128 2 2
			playsound SOUND_POWERUP
			callevent 2.0 do_sphere
		}
	}

	if ( BOSS_TYPE == 5 )
	{
		playsound 0 10 SOUND_POWERUP
		effect glow ent_me (0,255,255) 128 2 2
		setvard SCATTER_SHOT 1
	}

	if ( BOSS_TYPE == 6 )
	{
		local PICK_ATK $rand(1,3) //$rand(1,4)
		if ( PICK_ATK == 1 )
		{
			//firewall
			callevent npcatk_find_distant 2048
			callevent npcatk_suspend_ai
			dbg temp most distant returned $get(NPC_MOST_DISTANT,name)
			setmovedest NPC_MOST_DISTANT 9999
			setvard NOvA_TARGET NPC_MOST_DISTANT

			setvard NOVA_ATTACK fire_wall
			playsound 0 10 SOUND_POWERUP
			playanim critical ANIM_SPELL
			effect glow ent_me (255,128,128) 128 2 2
		}

		if ( PICK_ATK == 2 )
		{
			//flame burst
			playsound 0 10 SOUND_POWERUP
			effect glow ent_me (255,0,0) 128 2 2
			playanim critical ANIM_SPELL
		}

		if ( PICK_ATK == 3 )
		{
			//uber fireball
			playsound 0 10 SOUND_POWERUP
			effect glow ent_me (255,72,0) 128 2 2
			callevent 2.0 do_fireball
		}

		//flaming skull (circles continuously outward, screams, sets all on fire it touches)
	}
}

{ do_fireball
	playanim critical ANIM_JAB
}

{ do_sphere
	playanim hold ANIM_STAB
	playsound 0 10 SOUND_SATTACK
	createnpc monsters/summon/ice_blast $relpos(0,64,32) $get(ent_me,id) 20.0 $relpos(0,2000,0)
}

{ go_blizz
	playsound 0 10 SOUND_SATTACK
	playanim hold ANIM_STAB
	effect glow ent_me (128,128,255) 128 2 2
	local BLIZZ_POS $get(BLIZZ_TARGET,origin)
	createnpc monsters/summon/summon_blizzard BLIZZ_POS $get(ent_me,id) $get(ent_me,angles) 50
	callevent npcatk_resume_ai
}

{ do_kick

	callevent FREQ_KICK do_kick

	local KICK_TYPE $rand(1,3)
	if ( KICK_TYPE <= 2 ) setvar ANIM_ATTACK ANIM_KICK_HIGH
	if ( KICK_TYPE == 3 ) setvar ANIM_ATTACK ANIM_KICK_LOW
}


//=================================== LEAP/CHARGE SEQUENCE - BEGIN
{ leap_scan

	if POWER_ATTACK

	callevent 0.25 leap_scan

	if !IS_FLEEING
	if ( $get(LEAP_TARGET,isalive) )
	{
		callevent leap_at LEAP_TARGET
	}

	if ( !$get(LEAP_TARGET,isalive) )
	{
		setvard LEAP_TARGET NPCATK_TARGET
		if ( NPCATK_TARGET equals unset )
		{
			callevent leap_at LEAP_TARGET //just do a leap at 0x0x0 to reset
		}
	}
}

{ leap_at //<target>

	if !AM_LEAPING
	setvard AM_LEAPING 1
	setvard NPC_FORCED_MOVEDEST 1
	callevent npcatk_suspend_ai 1.0
	setvard POWER_ATTACK 0
	setmovedest PARAM1 MOVE_RANGE
	callevent 0.1 leap_at2
}


{ leap_at2

	playsound 0 10 SOUND_LEAP
	playanim critical ANIM_LEAP
	callevent 0.1 bandit_charge
	callevent 1.0 reset_leaping
	setvard OLD_Z $vec.z(game.monster.origin)
	setvard DO_STUN 1
	callevent 0.5 ground_scan
}


{ bandit_charge

	addvelocity ent_me $relvel(0,400,100)
}

{ reset_leaping

	setvard AM_LEAPING 0
}

{ ground_scan

	if DO_STUN
	callevent 0.2 ground_scan

	local MY_GROUND $get_ground_height(game.monster.origin)
	local MY_Z $vec.z(game.monster.origin)
	local DIFF MY_Z
	subtract DIFF MY_GROUND
	if ( DIFF < 5 ) setvard DO_STUN 0

	if !DO_STUN
	createnpc monsters/summon/stun_burst $relpos(0,60,0) $get(ent_me,id) 256 1 150 //<owner> <range> [toss1|0] [damage]
}

{ leap_away //<target>
	dbg leap_away PARAM2
	setvard AM_LEAPING 1
	setvard NPC_FORCED_MOVEDEST 1
	callevent npcatk_suspend_ai 1.0
	setmovedest PARAM1 800 flee
	callevent 0.1 leap_away2
}

{ leap_away2
	playsound 0 10 player/shout1.wav
	playanim critical ANIM_HOP
	callevent 0.1 bandit_hop
	callevent 1.0 reset_leaping
}

//=================================== LEAP/CHARGE SEQUENCE - END

{ glow_loop

	if GLOW_ON
	callevent 5.1 glow_loop
	effect ent_me GLOW_LOOP_COLOR 64 5 0
}


{ do_volcano

	if ( $cansee(enemy) ) local pos $get(ent_lastseen,origin)
	if ( $get(ent_lastseen,relationship,ent_me) equals enemy ) local pos $get(ent_lastseen,origin)
	if ( !$cansee(enemy) )
	{
		if $dist(game.monster.origin,pos) > 3000
		local pos $vec(game.monster.origin)
		vectoradd pos $relpos($vec(0,0,0),$vec(0,500,0))
		local pos $get_traceline(game.monster.origin,pos,worldonly)
	}
	local temp $get_ground_height(pos)
	local x $vec.x(pos)
	local y $vec.y(pos)
	local pos $vec(x,y,temp)
	setvarg VOLCANO_DMG 2
	createnpc monsters/summon/npc_volcano pos $get(ent_me,id) 100 40.0
}

{ npc_targetsighted

	if ( BOSS_TYPE == 5 )
	{
		if !IS_FLEEING
		if $cansee(PARAM1)
		playanim once ANIM_BOW
	}
}

{ bow_stretch
	playsound 0 10 SOUND_BOW_STRETCH
}

{ game_struck
	playrandomsound 0 8 SOUND_PAIN SOUND_PAIN2 none none
}

{ bow_shoot
	playsound 0 10 SOUND_BOW_SHOOT

	if ( !SCATTER_SHOT )
	{
		//fires magic darts of various size, larger do more damage, but are slower
		local BALL_SIZE $rand(1,10)
		local BALL_SPEED 110
		local BALL_SADJ BALL_SIZE
		multiply BALL_SADJ BALL_SIZE
		subtract BALL_SPEED BALL_SADJ
		local BALL_DMG BALL_SIZE
		multiply BALL_DMG 50
		createnpc monsters/summon/magic_dart $relpos(0,32,64) $get(ent_me,id) $get(ent_me,angles) BALL_SIZE BALL_SPEED BALL_DMG
	}

	if ( SCATTER_SHOT )
	{
		playsound 0 10 SOUND_SATTACK
		setvard SCATTER_SHOT 0
		setvard SCATTER_COUNT 0
		callevent do_scatter_shot
	}
}

{ do_scatter_shot
	add SCATTER_COUNT 1
	if ( SCATTER_COUNT < 10 ) callevent 0.1 do_scatter_shot
	playsound 0 10 SOUND_BOW_SHOOT
	local RND_ARROW $rand(1,3)
	local FIN_DMG DMG_ARROW
	if ( RND_ARROW == 1 ) local ARROW_TYPE proj_arrow_frost
	if ( RND_ARROW == 2 ) local ARROW_TYPE proj_arrow_gpoison
	if ( RND_ARROW == 3 )
	{
		local ARROW_TYPE proj_arrow_jagged
		multiply FIN_DMG 4
	}
	tossprojectile view ARROW_SPEED FIN_DMG 10 ARROW_TYPE (0,0,48)
	callexternal ent_lastprojectile ext_lighten 0.4
}

It's about half way done... This also isn't including various spell scripts it uses that are about as long. Some of Crow's scripts I expect to be as much as 10 times as long as this one, so as you can see, I'm pretty swamped.
 

Gurluas

New Adventurer
Joined
Aug 28, 2004
Messages
1,775
Reaction score
4
Age
33
i realize about the model but what if i just reskin a model?
forexample the marogar orc... (no chest or axe missallign)
then it should still have same events and could be used...
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Quotes_self_for_redundancy said:
I'd rather you not even think about orcplace2 until you think of a concept that uses the current scripts.

I've no intention of seeing the Borch in an underground map designed for the Blackhand in anycase. Concept for them, such as it is, is large, savage, wild, outdoor orcs, much higher level than the blackhand. This means a change in basic behavior in addition to stats, which involves scripting.
 

Gurluas

New Adventurer
Joined
Aug 28, 2004
Messages
1,775
Reaction score
4
Age
33
i need the borsh for something else, im thinking about trying to redo that map...what was its name... damn i forgot...eeeh unreal2 or something like that...

also im training to animate...i think il try the bludgeon soon...
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
also im training to animate...i think il try the bludgeon soon...
I don't think you are ever going to see your precious Bludgeon anywhere aside from a handful of easter egg tribute rooms until Gaz makes a new model, which I think is a project he's abandoned.

If you wanna practice animating, see if you can work up a jump animation for the orcs. Or a crossbow anim for the player model. Something that we need and may actually make use of.
 

WeissberV

New Adventurer
Crusaders
Joined
Jan 21, 2007
Messages
1,053
Reaction score
0
Age
32
Location
England
evilsquirrel said:
try a ah....

make a lightning weapon of somesort 8)

hmm u could mabye get a electro blade of a dead electro skeleton :D
 

Gurluas

New Adventurer
Joined
Aug 28, 2004
Messages
1,775
Reaction score
4
Age
33
Thothie said:
also im training to animate...i think il try the bludgeon soon...
I don't think you are ever going to see your precious Bludgeon anywhere aside from a handful of easter egg tribute rooms until Gaz makes a new model, which I think is a project he's abandoned.

If you wanna practice animating, see if you can work up a jump animation for the orcs. Or a crossbow anim for the player model. Something that we need and may actually make use of.

i need to start easy, the bludgeon is sorta easy and could be used if i fix the issues it has like the walk anim, and create some more useful anims
 

Gaz

New Adventurer
MSC Developer
Joined
Feb 9, 2005
Messages
629
Reaction score
0
No, its not actually! I've just come out the other end of CRUNCH at work, and the textures 90% there.

All it will need will be animations by the end of tonight, its allready rigged, just needs the anims.

Don't dispare, just been SO busy at work this last week its been unreal :(
Games Industry sucks at Crunch, but its over 8)
 

Orochi

New Adventurer
MSS Developer
MSC Developer
Joined
Jun 12, 2006
Messages
790
Reaction score
0
Age
35
Location
On a Bus
Nuuuuu! Don't use my jacket for other things. :(
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Tis why I told ya to put yer logo on it, for the one you want to be yours.
 

Gurluas

New Adventurer
Joined
Aug 28, 2004
Messages
1,775
Reaction score
4
Age
33
i did manage to make a charging animation for the old one...

meh its not easy animating...
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Very few people can do it. Spent like an hour today "animating" with notepad, trying to get the damn skull in weapons/projectiles.mdl to face the right direction so I could add the giant flaming one for the new spell. No luck.
 

FER

New Adventurer
MSC Developer
RiP
Joined
Sep 16, 2006
Messages
2,758
Reaction score
0
Age
37
Location
on Belser's army
how do you use notepad to animate? is it better than animatig in milkshape 3D? :?:
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
I can't even manage to turn a skull 90 degrees to the right, so you be the judge. ;)

All the "modeling" I do is that which can be done with notepad. ie. Open the SMD's/QC's with notepad.

Did at least manage to arm the new bandits with the proper weapons that way, and give them their kick animations (borrowed from the old player model that they share the bones with). Not sure if I can arm the other monsters the same way (may not have the proper attachments).
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
Yay, more skins??
 

FER

New Adventurer
MSC Developer
RiP
Joined
Sep 16, 2006
Messages
2,758
Reaction score
0
Age
37
Location
on Belser's army
Id say add all these armor skins we've seen in this thread, all of them look great and the more items, the better this game looks like a old school RPG :wink:
 

Sabre

New Adventurer
MSC Developer
RiP
Joined
Aug 24, 2004
Messages
4,545
Reaction score
1
Age
35
Location
SoCal
Making earth armor now...It will be mottled gray and brown, gotta mix the two; gray looks plain, and brown looks like shit...Will post when done.
 

Sabre

New Adventurer
MSC Developer
RiP
Joined
Aug 24, 2004
Messages
4,545
Reaction score
1
Age
35
Location
SoCal
Here is where I'm going with the Earth Armor...Opinions?


armor.jpg
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
Looks good. But I would rather see it not connected by chains, but by roots or something.
 

Sabre

New Adventurer
MSC Developer
RiP
Joined
Aug 24, 2004
Messages
4,545
Reaction score
1
Age
35
Location
SoCal
Maybe roots intertwined within the chains...
 
Top