Page 1 of 2

Attackableaiscript error

Posted: Sun Jan 31, 2010 12:55 pm
by MerHaN
Hi everybody.
Some of you know me from my problem with scripts.cfg altho i fixed it =)

I have a new little problem..

I got the L2AttackableAIScript from Gracia and reworked it in interlude.
It is okay, not compile errors, but..

I register it at scripts.cfg and when I run gameserver it says

CLass not found L2monsterinstance and it does it for all instances!! pcinstance, npcinstance etc.

When I add a "#" at scripts.cfg to cancel the registeration of the packet, alll is ok..

PS: When I get the class not found error, still the gs loads fine and the server opens ok..
why that message appears????


Tnx on advance =)

Re: Attackableaiscript error

Posted: Sun Jan 31, 2010 3:44 pm
by Stake
Maybe there are wrong paths given for instances in the script? I think in Interlude there was no com.l2jserver but net.sf.l2j. But anyway you should check that.

Re: Attackableaiscript error

Posted: Sun Jan 31, 2010 5:28 pm
by MerHaN
Stake wrote:Maybe there are wrong paths given for instances in the script? I think in Interlude there was no com.l2jserver but net.sf.l2j. But anyway you should check that.
Read better.
I told that the is perfect after my rework (if it didnt then the scripts.cfg would fail to load it).

my problem is that the gs console shows error at the classes..

thanks for trying to help me thouh

Re: Attackableaiscript error

Posted: Sun Jan 31, 2010 5:37 pm
by Stake
MerHaN wrote:
Stake wrote:Maybe there are wrong paths given for instances in the script? I think in Interlude there was no com.l2jserver but net.sf.l2j. But anyway you should check that.
Read better.
I told that the is perfect after my rework (if it didnt then the scripts.cfg would fail to load it).

my problem is that the gs console shows error at the classes..

thanks for trying to help me thouh
When you run the gameserver the L2AttackableAIScript is compiled just then. Or what do you understand under "no compilation error"?
Gameserver must load without outer scripts anyway.

Or you mean after gameserver loads? While using the script?

Re: Attackableaiscript error

Posted: Sun Jan 31, 2010 6:20 pm
by MerHaN
Stake wrote:
When you run the gameserver the L2AttackableAIScript is compiled just then. Or what do you understand under "no compilation error"?
Gameserver must load without outer scripts anyway.

Or you mean after gameserver loads? While using the script?
listen careful

the script is ok, have no errors

but when i enable it then the gs show me that these classes are missing.
the quest is loaded fine, it has no problem

Re: Attackableaiscript error

Posted: Sun Jan 31, 2010 6:24 pm
by Stake
MerHaN wrote:listen careful

the script is ok, have no errors

but when i enable it then the gs show me that these classes are missing.
the quest is loaded fine, it has no problem
Please post a picture about the "problem". :)

Re: Attackableaiscript error

Posted: Mon Feb 01, 2010 12:40 pm
by MerHaN
Stake wrote:
MerHaN wrote:listen careful

the script is ok, have no errors

but when i enable it then the gs show me that these classes are missing.
the quest is loaded fine, it has no problem
Please post a picture about the "problem". :)
Image

here =)
This happen with all instances..

Re: Attackableaiscript error

Posted: Mon Feb 01, 2010 2:44 pm
by Stake
Make sure you have all classes in this classpath on core side "com.l2jserver.gameserver.model.actor.instance".

Re: Attackableaiscript error

Posted: Mon Feb 01, 2010 6:09 pm
by MerHaN
Stake wrote:Make sure you have all classes in this classpath on core side "com.l2jserver.gameserver.model.actor.instance".
nothing is com.l2jserver..
i told everything is net.sf.l2j

Re: Attackableaiscript error

Posted: Mon Feb 01, 2010 11:07 pm
by Stake
MerHaN wrote:
Stake wrote:Make sure you have all classes in this classpath on core side "com.l2jserver.gameserver.model.actor.instance".
nothing is com.l2jserver..
i told everything is net.sf.l2j
Though only this can be the source of your problem no other.
L2AttackableAIScript.java#main

Code: Select all

try{	if ( L2Attackable.class.isAssignableFrom(Class.forName("com.l2jserver.gameserver.model.actor.instance."+t.type+"Instance")))	{		ai.addEventId(t.npcId, Quest.QuestEventType.ON_ATTACK);		ai.addEventId(t.npcId, Quest.QuestEventType.ON_ATTACK_BY_CHARACTER);		ai.addEventId(t.npcId, Quest.QuestEventType.ON_KILL);		ai.addEventId(t.npcId, Quest.QuestEventType.ON_SPAWN);		ai.addEventId(t.npcId, Quest.QuestEventType.ON_SKILL_SEE);		ai.addEventId(t.npcId, Quest.QuestEventType.ON_FACTION_CALL);		ai.addEventId(t.npcId, Quest.QuestEventType.ON_AGGRO_RANGE_ENTER);	}}catch(ClassNotFoundException ex){	System.out.println("Class not found "+t.type+"Instance");}
I don't know whether you overwrote the path of instances "com.l2jserver.gameserver.model.actor.instance" to "net.sf.l2j.gameserver.model.actor.instance".

PS.: I just give you advices, you give us not enough information. Sorry if you see like I take you for an idiot, but I don't.

Re: Attackableaiscript error

Posted: Tue Feb 02, 2010 10:47 am
by MerHaN
Here is my file:

Re: Attackableaiscript error

Posted: Tue Feb 02, 2010 10:53 am
by janiii
MerHaN wrote:Here is my file:
do what Stake said:
in the line

Code: Select all

if ( L2Attackable.class.isAssignableFrom(Class.forName("com.l2jserver.gameserver.model.actor.instance."+t.type+"Instance")))
change the com.l2jserver to net.sf.l2j

Code: Select all

if ( L2Attackable.class.isAssignableFrom(Class.forName("net.sf.l2j.gameserver.model.actor.instance."+t.type+"Instance")))

Re: Attackableaiscript error

Posted: Tue Feb 02, 2010 1:53 pm
by MerHaN
janiii wrote:
MerHaN wrote:Here is my file:
do what Stake said:
in the line

Code: Select all

if ( L2Attackable.class.isAssignableFrom(Class.forName("com.l2jserver.gameserver.model.actor.instance."+t.type+"Instance")))
change the com.l2jserver to net.sf.l2j

Code: Select all

if ( L2Attackable.class.isAssignableFrom(Class.forName("net.sf.l2j.gameserver.model.actor.instance."+t.type+"Instance")))
ahh sory my english is not good =(
Stake thanx it was a error thanx!

i fix it but now it show class not found L2DecoInstance

only this..

but in me eclipse it dont have any instance like this 0_0

Re: Attackableaiscript error

Posted: Tue Feb 02, 2010 7:31 pm
by MerHaN
bump..
guys i must have this fixed tomorrow evening =(
sorry for double post but help pls..

Re: Attackableaiscript error

Posted: Tue Feb 02, 2010 8:00 pm
by Probe
maybe it should be L2DecoyInstance