Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 17.03.2006, 18:37   #1
Dave
Архивный участник
 
Join Date: Jun 2005
Posts: 364
Default [HELP] Ai mob ddmagic

I am refining my SA quest. In ai i have a class setup for each mob that can level crystal. the problem i have is in C3 and C4 alot of these mobs have ddmagic and holdmagic classes as well. how can i tell AI to use both

class halingka : warrior_aggressive_casting_curse
class_end

class halingka: crystal_monster
class_end

how do i combined those two for that mob.

I tried here. dont know if this will work though.
class timak_orc_crystal : crystal_monster
parameter_define_begin
int HoldMagic 1036037
parameter_define_end
class_end
Dave is offline  
Old 17.03.2006, 19:20   #2
filrip
Архивный участник
 
Join Date: May 2005
Posts: 99
Default

you have to recode the ATTACKED handler too, to make this mob able to use ddmagic and holdmagic.

first question will be, define when it must use ddmagic and so when it must use holdmagic ? (conditions) the most easy way is : random i suppose
filrip is offline  
Old 17.03.2006, 19:45   #3
Dave
Архивный участник
 
Join Date: Jun 2005
Posts: 364
Default thnx for your input, but

no I was not asking how to make mob use both ddmagic and hold magic, my question is for example. timak_orc.

timak_orc has class already defined in AI as

class timak_orc : warrior_casting_hold_magic : warrior
class_end

I want to add my ai for SA quest so that this mob can also use the holdmagic and my ai for crystal_monster class. The example I have here is what i have done. I dont know that this is right. I just add a parameter define statement and skill id.

class timak_orc_crystal : crystal_monster
parameter_define_begin
int HoldMagic 1036037
parameter_define_end
class_end
Dave is offline  
Old 17.03.2006, 19:56   #4
filrip
Архивный участник
 
Join Date: May 2005
Posts: 99
Default

ah, ok, i have understand i think now

so, i dont know exactly what there is in crystal_monster class but if you want this mob use holdmagic, you have to add the parameter yes

And the right ATTACKED handler too (you can find it in "warrior_casting_hold_magic" class) if the mob is not inherit of this class
filrip is offline  
Old 17.03.2006, 20:48   #5
kiralex2
Архивный участник
 
Join Date: Jan 2006
Posts: 73
Default

Code:
class test : warrior
{
parameter:	
	int DDMagic = @s_twister41;

handler:
	EventHandler ATTACKED(attacker, damage)
	{
		if(attacker.is_pc != 0 || IsInCategory(@summon_npc_group, attacker.npc_class_id))
		{		
			if(Skill_GetConsumeMP(DDMagic) < myself.sm.mp && Skill_GetConsumeHP(DDMagic) < myself.sm.hp)
			{
				AddUseSkillDesire(attacker, DDMagic, @ST_ATTACK, @AMT_STAND, 1000000);
			}
		}
		super;
	}
}
NASC RUlezzz
При кадом ударе моб будет кастовать эту хрень пока у него MP некончится
Как доделать думайте сами
int DDMagic = @s_elemental_symphony;
And Your die
kiralex2 is offline  
Old 18.03.2006, 16:50   #6
Xellos
Архивный участник
 
Join Date: Feb 2006
Posts: 88
Default

one possibility is to modify one of the superclasses
modify the warrior class to affect nearly all monsters
but this depends on what u want to do

@kiralex2:
u forgot the Skill_InReuseDelay
(this was added with C1 to all use_skill macros, but the NASC source is pre C1 but our actual AI contains this thingy)
Xellos is offline  
Old 19.03.2006, 02:31   #7
Sire
Архивный участник
 
Join Date: Feb 2006
Posts: 87
Default

create a crystal_monster class for each of the superclasses you wish to derive from. crystal_monster_casting_hold_magic : warrior_casting_hold_magic for example.

Then derive the timak_orc from the crystal monster subclass.

class_begin timak_orc : crystal_monster_casting_hold_magic
class_end
Sire is offline  
Old 19.03.2006, 18:30   #8
Dave
Архивный участник
 
Join Date: Jun 2005
Posts: 364
Default Huh Sire

huh, thats my code.. dude. but thanks
Dave is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:02.