![]() |
|
|
#1 |
|
Архивный участник
Join Date: Oct 2006
Posts: 108
|
I'm trying to make a summon skill that summons an NPC which will immediatly use one skill and then vanish. Will someone get me off on the right track or is there an AI script that is available for me to play around with and mod.
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Jul 2006
Posts: 46
|
Code:
class 1 spawn_casts_1_spell : default_npc handler 13 17 // CREATED variable_begin "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // myself push_const 704 add fetch_i push_const 3000 push_const 1000 func_call 184680487 // func[AddTimerEx] shift_sp -2 shift_sp -1 handler_end handler 12 540 // TIMER_FIRED_EX variable_begin "timer_id" "i0" "i1" "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // timer_id push_const 236 add fetch_i4 push_const 3000 equal branch_false L12899 L12899 handler_end class_end Code:
class spawn_casts_1_spell : default_npc
{
handler:
EventHandler CREATED()
{
myself->AddTimerEx(3000,1000);
}
EventHandler TIMER_FIRED_EX(timer_id,i0,i1)
{
if( timer_id == 3000 )
{
}
}
}
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Oct 2006
Posts: 108
|
Much appreciated evern. I always see you helping people! This should be great, thanks
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Jun 2005
Posts: 374
|
And with that, use i.e:
Code:
push_event // myself push_const 704 add fetch_i push_event // master push_const 552 add fetch_i // target_id push_const 444 add fetch_i4 push_const YourSkill push_const 0 push_const 0 push_const 1000000 func_call 184877074 // func[AddUseSkillDesire] shift_sp -5 shift_sp -1
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Jun 2006
Posts: 153
|
hmm to not make another topic, is it possible to make an npc that does an skill as soon as its summoned on all the party members but it doesnt dissappear? something like the souless id think..
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Jun 2005
Posts: 374
|
Sure, just don't put in a DeSpawn command. I'm not too sure if you can't simply let the summon use an affect_scope=party skill, since that'll save you some AI code. Otherwise take a look at funcs GetParty, Party_GetCount, Party_GetCreature, GetMemberOfParty and perhaps ShowSysMsgToParty2. I think you'll only use getmemberofparty and the membercount.
|
|
|
|
|
#7 | |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Quote:
|
|
|
|
|
|