Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 General (https://postpacific.mmorpg-game.online/forumdisplay.php?f=31)
-   -   ...after decompilation. Stranges in npc (https://postpacific.mmorpg-game.online/showthread.php?t=8060)

HF 14.07.2007 14:16

...after decompilation. Stranges in npc
 
agent_of_slaughter

Code:

If ( 1 != 0 && 1 == 1 )
{
        myself->GiveItem1(target, 7543, 1);
        myself->SoundEffect(target, "ItemSound.quest_itemget");
}
If ( 0 != 0 && 0 == 1 )
{
        myself->GiveItem1(target, 0, 0);
        myself->SoundEffect(target, "ItemSound.quest_itemget");
}

This npc spawn in world, have quest.
But... this code confused me.

- two identical conditions
If ( 0 != 0 && 0 == 1 )
- two strange conditions
If ( 0 != 0 && 0 == 1 ) 0 != 0 and 0 == 1??? Madness...
- GiveItem, id=0, amount 0
what is it? debug code? Horror.

Is very interesting to examine the code in nps. Much interesting it is possible there to find.

m4rk 14.07.2007 14:26

Code:

if( 0 != 0 && 1 == 1 )
That one is kind of fun too...

I can only think of debug code or that ncsoft use custom variables when coding the AI.

ateh 14.07.2007 14:29

There are hundreds of such examples, like
"myself->GiveItem1(target,0,0);" exists 1170 times in whole AI...
"if ( 1 == 1 )" 476 times
"0 != 0" 2554 times
"0 == 1" 4541 times...
And one might wonder why AI has 140 MB... ;P
Prolly they had some erros in questdata.txt file for nasc.

HF 14.07.2007 17:14

Well... we need C4Compiler for remade full ai.obj

Kenjiro 14.07.2007 19:37

I suspect this was for error checks from PTS l2npc (maybe it has some weird 'bugs'?).
Or left by previous version as 'backup' code...

barabashka 15.07.2007 11:34

Quote:

Originally Posted by HF (Post 91772)
Well... we need C4Compiler for remade full ai.obj

In Testing...

HF 15.07.2007 11:36

Quote:

Originally Posted by barabashka (Post 91838)
In Testing...

php? .net? i want it to test too ;)

Sauron 16.07.2007 14:29

that's probably code for future quest.


All times are GMT. The time now is 22:07.