Jump to content
  • 0

adapt code


Question

6 answers to this question

Recommended Posts

  • 0
Posted

You can try one of these

 

st.getPlayer().doCast(SkillTable.getInstance().getInfo(1303,2));

 

st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1303,2), true, true);	

  • 0
Posted

You can try one of these

 

st.getPlayer().doCast(SkillTable.getInstance().getInfo(1303,2));

 

Whit this code i have to target my self to obtain the buffs, because the npc buff himself

 

 

st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1303,2), true, true);	

 

and whit this another code python give me a error

 

sep 26, 2012 10:48:27 AM com.l2jserver.gameserver.model.quest.Quest showError
WARNING: E:\Users\wii\Escritorio\L2j\game\data\scripts\custom\242424_NPCBuffer\__init__.py
Traceback (innermost last):
  File "__init__.py", line 32, in onEvent
NameError: true

at org.python.core.Py.NameError(Unknown Source)
at org.python.core.PyFrame.getglobal(Unknown Source)
at org.python.pycode.serializable._pyx1348672645616.onEvent$3(__init__.py:32)
at org.python.pycode.serializable._pyx1348672645616.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$351.onEvent(Unknown Source)
at com.l2jserver.gameserver.model.quest.Quest.onAdvEvent(Quest.java:1019)
at com.l2jserver.gameserver.model.quest.Quest.notifyEvent(Quest.java:579)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.processQuestEvent(L2PcInstance.java:1817)
at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:242)
at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62)
at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1072)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

  • 0
Posted

getEffects() method does, as the name says, just give effects. If you want animation you have to broadcast MagicSkillUse also (with getEffects).

 

If you want a regular casting system, with some restrictions of mana use / delay / etc, you can also use actor.doCast()

  • 0
Posted

getEffects() method does, as the name says, just give effects. If you want animation you have to broadcast MagicSkillUse also (with getEffects).

 

If you want a regular casting system, with some restrictions of mana use / delay / etc, you can also use actor.doCast()

 

about this code do you speak?

 

try to prove it in H5 and I me do not work

 

if event == "1":

st.giveItems(0,0)

st.getPlayer().useMagic(SkillTable.getInstance().g etInfo(ID SKill,ID Skill),False,False)

return "0.htm"

st.setState(COMPLETED)

 

 

  • 0
Posted

Search examples of getEffects( and MagicSkillUse (MagicSkillUser on L2JIL) over the code, you will find plenty examples (exemple : RB curse).

 

I was looking for examples as you said and this was what more my name is the attention

 

L2Skill skill = SkillTable.getInstance().getInfo(4135, 1);

if (skill.isMagic())

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...