Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 02.02.2006, 06:28   #1
drzoom
Архивный участник
 
Join Date: Aug 2005
Posts: 428
Default Some question on nasc... And whole ai scripting...

HI there.

This is my basic model of sa crystal level up system.

Code:
class mob_sa_quest_st_1 : default_npc
{
handler:
	EventHandler SPELLED(speller, skill_name_id, i0)
	{
		i0=0;
		if(skill_name_id == @s_soul_crystal)
		{
			i0=1;
		}
	}
	
	EventHandler ATTACKED(attacker, damage, i0, i1)
	{
		i1=0;
		if(damage>myself.sm.hp && i0==1)
		{
			i1=1;
		}
		i0=0;
			
	}
	EventHandler MY_DYING(i1)
	{	
		c1 = GetLastAttacker();
		if(i1==1)
		{
			if(OwnItemCount(c1, @red_soul_crystal_0)>1)
			{
				ShowSystemMessage(c1, 977);
			}
			if(OwnItemCount(c1, @red_soul_crystal_0)==1)
			{
				DeleteItem1(c1, @red_soul_crystal_0,1);
				GiveItem1(c1, @red_soul_crystal_1,1);
				ShowSystemMessage(c1, 974);
			}
		}
	}
}
But can a question is this:
CAN I OPERATE WITH i0 and i1 IN SUCH CONDITION?

Thanks again.
drzoom is offline  
 


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 15:41.