Skip to content

Question Giveavailableskills()

Featured Replies

Hi friends, well i set FALSE to AutoLearnSkills, BUT, i want to use giveAvailableSkills on my script of Subclass NPC to give skills when a char make subclass and go to lvl 40, i put st.giveAvailableSkills but it shows an error, what is the right way? 

Im trying like that: (Last part of code , if want more, only tell me)

http://pastebin.com/ksUd2CVM

 

i import L2PcInstance

 

(c4 server)

Solved by torsello

You probably meant st.player, st being QuestState (and such method probably not existing into QuestState).

  • Author

This is the code, and the part its on the last ELSE.

 

I've to write st.player.giveAvailableSkills()?

I'm adding on the right part? I write it after give subclass item and after set class and lvl

 

http://pastebin.com/DAi0TQN2

 

I have use st.player.giveAvailableSkills() and apear this:

Traceback (innermost last):
  File "__init__.py", line 704, in onEvent
AttributeError: giveAvailableSkills

        at org.python.core.Py.AttributeError(Unknown Source)
        at org.python.core.PyInstance.invoke(Unknown Source)
        at org.python.pycode.serializable._pyx1442539468425.onEvent$27(__init__.
py:704)
        at org.python.pycode.serializable._pyx1442539468425.call_function(__init
__.py)
        at org.python.core.PyTableCode.call(Unknown Source)
        at org.python.core.PyTableCode.call(Unknown Source)
        at org.python.core.PyTableCode.call(Unknown Source)
        at org.python.core.PyFunction.__call__(Unknown Source)
        at org.python.core.PyMethod.__call__(Unknown Source)
        at org.python.core.PyObject.__call__(Unknown Source)
        at org.python.core.PyObject._jcallexc(Unknown Source)
        at org.python.core.PyObject._jcall(Unknown Source)
        at org.python.proxies.main$Quest$709.onEvent(Unknown Source)
        at net.sf.l2j.gameserver.model.quest.Quest.onAdvEvent(Quest.java:540)
        at net.sf.l2j.gameserver.model.quest.Quest.notifyEvent(Quest.java:355)
        at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.processQuestE
vent(L2PcInstance.java:1428)
        at net.sf.l2j.gameserver.clientpackets.RequestBypassToServer.runImpl(Req
uestBypassToServer.java:176)
        at net.sf.l2j.gameserver.clientpackets.ClientBasePacket.run(ClientBasePa
cket.java:78)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Edited by torsello

Remove the st since its quest state.

 

Directly player.blabla()

Edited by SweeTs

Remove the st since its quest state.

 

Directly player.blabla()

 

He uses st.player for the whole quest.

 

Shit happens when you use crappy jython. Those sort of errors would popup directly if you were using Java.

 

Looks like you don't give good attribute for the method, anyway my last call on that topic.

Edited by Tryskell

  • Author
  • Solution

Thanks guys, i found the solución, the problem was that , this method is private, and its on another public method. Im agree with you Tryskell haha

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.