Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Help
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 08.02.2007, 16:13   #1
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by YakudZe View Post
OLD>>
class 1 niniel_spirits_wiz : raid_wizard
class_end

class 1 niniel_spirits_heal : raid_healer
class_end


NEW>>

class 1 niniel_spirits_wiz : raid_fighter
class_end


class 1 niniel_spirits_heal : raid_zzoldagu
class_end


OLD change to NEW
It's NO fix. I have it and errors have too. You think what this one bugged npc? No.
HF is offline  
Old 09.02.2007, 00:25   #2
astrid
Архивный участник
 
Join Date: May 2006
Posts: 55
Default

Quote:
Originally Posted by HF View Post
fuck... bug found and fixed. Get brain and hand and...

open ai.obj and npcdata
find in ai.obj ".... : raid_archer"
and check this npc in npcdata for exist this param. This all...

But one problem. This skill no one... have "power_shot.." have "stun_shot" and different skill_level. What need to set in each npc and no will do error?
I told this in very first post in this thread maybe my english too bad?
[rus]
Я же об этом и сказал сразу и надо не в AI править этот -1 на чтото, а именно в нпсдате добавить рейд арчерам скиллы. я добавил "наугад" кому стан кому повершот, на основе левела босса и уровня скилла.
[/rus]

TehUb3r, you have to edit npcdata, not modify default value in ai.obj. because raid_archer have very different levels ~30-60 it will be strange if they all use same skill.

about:
Quote:
Invalid Despawn() called count[2]
problem in party_private and party_wizard class. two timers 1004 and 1006 have same operation conditions and both try to despawn mob.
Code:
	EventHandler CREATED()
	{
		myself->AddTimerEx(1005,( 120 * 1000 ));
		myself->AddTimerEx(1006,20000);
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id)
	{
		if( timer_id == 1005 )
		{
			if( myself->InMyTerritory(myself.sm) == 0 && myself.boss.alive != 0 && myself.p_state != 3 )
			{
				myself->InstantTeleport(myself.sm,myself->FloatToInt(myself.boss.x),myself->FloatToInt(myself.boss.value),myself->FloatToInt(myself.boss.z));
				RemoveAllAttackDesire();
			}
			myself->AddTimerEx(1005,( 120 * 1000 ));
		}
		if( timer_id == 1006 )
		{
			if( myself.boss.alive == 0 )
			{
				if( myself.p_state != 3 && myself.p_state != 10 )
				{
					Despawn();
					return;
				}
			}
			myself->AddTimerEx(1006,20000);
		}
		if( 1004 == timer_id )
		{
			if( myself.p_state != 3 && myself.p_state != 10 )
			{
				Despawn();
			}
			else
			{
				myself->AddTimerEx(1004,20000);
			}
		}
		super;
	}
to fix it just remove 1006 or 1004 timer from ai thats all .
GL with ai researching, thanks to sauron we have perfect decompiler.
astrid is offline  
Old 09.02.2007, 01:16   #3
TehUb3r
Архивный участник
 
Join Date: Feb 2007
Posts: 26
Default

thx again it looks realy n33t with the nasc code but i have no idea
how to find that timer on the ai.obj can u give an example of what exactly i need to remove?
TehUb3r is offline  
Old 12.02.2007, 17:06   #4
TehUb3r
Архивный участник
 
Join Date: Feb 2007
Posts: 26
Default

(BUMP*)
asking from anyone to give me an example with AI.obj code of how to remove that timer Astrid was talking about before in this thread.
the timer that cause these Despawn() erros.
or whatever it is ,

thanks for all who helped by now and all the will help in future
take care.
TehUb3r is offline  
Old 12.02.2007, 17:32   #5
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by TehUb3r View Post
(BUMP*)
asking from anyone to give me an example with AI.obj code of how to remove that timer Astrid was talking about before in this thread.
the timer that cause these Despawn() erros.
or whatever it is ,

thanks for all who helped by now and all the will help in future
take care.
what hard?
1. made decompile for bug class

Code:
	EventHandler CREATED()
	{
		myself->AddTimerEx(1005,( 120 * 1000 ));
		myself->AddTimerEx(1006,20000);
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id)
....
        if( timer_id == 1006 )
        {
            if( myself.boss.alive == 0 )
            {
                if( myself.p_state != 3 && myself.p_state != 10 )
                {
                    Despawn();
                    return;
                }
            }
            myself->AddTimerEx(1006,20000);
        }
        if( 1004 == timer_id )
        {
            if( myself.p_state != 3 && myself.p_state != 10 )
            {
                Despawn();
            }
            else
            {
                myself->AddTimerEx(1004,20000);
            }
        }
    super;
}

	EventHandler PARTY_ATTACKED(attacker,private,damage,f0)
...
	EventHandler PARTY_DIED(private)
	{
		if( private == myself.boss )
		{
			myself->AddTimerEx(1004,20000);
		}
	}
one metod for fix (have 3 metods) - remove 1004 timer, because this timer made same what do timer 1006.
You need find all start 1004 timer and code for using 1004 (optional)

2. start 1004 timer in "EventHandler PARTY_DIED(private)"
very easy. This handler have only this timer.
2.1. delete full Handler PARTY_DIED
2.2. how to find enter to 1004 timer in TIMER_FIRED_EX?
easy too. I dont know ai code. but.. you know what need to find! 1004! sure!
open class in notepad and finding 1004. Sure you must find this
Quote:
push_const 1004
now you need must have Basic/Common knowledge of AI code and brain. What need to delete? See full code around this 1004 value
Code:
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_const 1006
	push_const 20000
	func_call 184680487	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
L10249
	push_event     //  timer_id
	push_const 236
	add
	fetch_i4
	push_const 1004
	equal
	branch_false L10256
no hard to understund what upper code - timer 1006 (see decoded code). this block ended with shift_cp... Need code start from L10249. We found start block for delete.
Now you must find end block. NO hard to... Block end with despawn and ... "super;" = "exit_handler"
Code:
	jump L10260
L10259
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_const 1004
	push_const 20000
	func_call 184680487	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
L10260
L10256
	call_super
handler_end
Bingo again!
Code end with shift_sp too.
All.. you must delete block but check L10xxx labels for your upper code. Example, L10260 uses from deleted block. But L10256 uses upped. You must save this label

Done.
HF is offline  
Old 12.02.2007, 18:32   #6
TehUb3r
Архивный участник
 
Join Date: Feb 2007
Posts: 26
Default

THANKS HF :P

if i understand right what you are saying is this


if i got code like this:

Code:
L10251
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_const 1006
	push_const 20000
	func_call 184680487	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
L10249
	push_const 1004
	push_event	//  timer_id
	push_const 236
	add
	fetch_i4
	equal
	branch_false L10256
L10255
	push_event	//  myself
	push_const 704
	add
	fetch_i	//  p_state
	push_const 280
	add
	fetch_i4
	push_const 3
	not_equal
	push_reg_sp
	fetch_i
	branch_false L10257
	push_event	//  myself
	push_const 704
	add
	fetch_i	//  p_state
	push_const 280
	add
	fetch_i4
	push_const 10
	not_equal
	and
L10257
	branch_false L10259
L10258
	push_event	//  myself
	push_const 704
	add
	fetch_i
	func_call 184549616	//  func[Despawn]
	shift_sp -1
	jump L10260
L10259
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_const 1004
	push_const 20000
	func_call 184680487	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
L10260
L10256
	call_super
handler_end

i should delete a block and stay with something like this:

Code:
L10251
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_const 1006
	push_const 20000
	func_call 184680487	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
L10249
L10255
L10257
L10258
L10259
L10260
L10256

	call_super
handler_end

or im doing something wrong?
TehUb3r is offline  
Old 12.02.2007, 19:26   #7
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Like this
Quote:
Originally Posted by TehUb3r View Post
THANKS HF :P

i should delete a block and stay with something like this:

Code:
L10251
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_const 1006
	push_const 20000
	func_call 184680487	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
L10249
(here removed non used labels)
	call_super
handler_end
or im doing something wrong?
and will dont forget about non-used party_dead handler
HF is offline  
Old 21.02.2007, 01:03   #8
KOC2000
Архивный участник
 
Join Date: Jun 2006
Posts: 100
Default

I just got this error today for the first time.. it appeared after the power went off.. so I think, it's really something in database has been corrupted.
I'll check things out and report again later.
-----------------------------------------------------
Well..Server is running for 1 day and 22 minutes now and no single despawn error appeared.. All I did was just restarting server and reindexing database.
I also renamed some procedures, just changed letters case. like:- Lin. to lin.
KOC2000 is offline  
Old 10.05.2007, 11:14   #9
hex0id
Архивный участник
 
Join Date: Aug 2006
Posts: 21
Default

but have raid_archer AI as parent :P
hex0id 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 21:19.