Page 1 of 1

How to bypass two different PY scripts in the same npc

Posted: Tue Oct 07, 2014 12:13 am
by DrGonzo
I have a custom NPC (ID is 9999). I want to start 2 different quest scripts in python from this.

In the main HTML there are two buttons.

FIRST

Code: Select all

<button value="First Quest" action="bypass -h npc_%objectId%_Quest 9999_Npc" width=170 height=52 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br>
This works fine. I have a folder named 9999_Npc where is the script __init__.py.


SECOND

Code: Select all

<button value="Second Quest" action="bypass -h npc_%objectId%_Quest 555_Npc" width=170 height=52 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br>
The same, I have a folder named 555_Npc where is the script py.

This does not work.
Changed bypass to "bypass -h Quest 555_Npc", but no way.

Pushing the button nothing happens, just close the window. There are no errors in console or in scripts and if I run these scripts in two different NPC, they are ok.

Please help, thank you

Re: How to bypass two different PY scripts in the same npc

Posted: Wed Oct 08, 2014 3:39 pm
by DrGonzo
Oh, btw.. I can't merge the two scripts.

Re: How to bypass two different PY scripts in the same npc

Posted: Thu Oct 09, 2014 5:39 am
by disorder35

Code: Select all

NPC_ID = USE YOUR NPC ID
I guess on both scripts.

Re: How to bypass two different PY scripts in the same npc

Posted: Thu Oct 09, 2014 6:55 pm
by DrGonzo
Thx disorder35, but NPC_ID is correct in both scripts..

The first script works, not the second. And I don't know how to do..
I'm not really experienced on programming on L2j with these languages, where could be the error?

It seems there are no problems with the code, as scripts works fine separately. And there are no compiling errors....
:| Really confused..

Re: How to bypass two different PY scripts in the same npc

Posted: Fri Oct 10, 2014 11:06 pm
by Zoey76
If the NPC ID is the same, you must check both script won't register it for on first talk.

Re: How to bypass two different PY scripts in the same npc

Posted: Tue Oct 14, 2014 12:29 am
by DrGonzo
Zoey76 wrote:If the NPC ID is the same, you must check both script won't register it for on first talk.
Ok solved, thanks!