Page 1 of 1

npc casting + effects on pc

Posted: Sun Jun 27, 2010 8:44 pm
by rychoo84
L2J Revision n/a:
L2JDP Revision n/a:

I was wondering, where should I look (classes/methods/etc) in order to get effect as follow:
- NPC is casting (visibly) a skill (e.g. after talking to npc he is casting lets say noblesse blessing)
- PC is visibly affected (the visible effect - here flash - appears on a player, but the buff doesnt appear OR if I'm dealing with a buffer it does stay afterall)

Saw that on many servers, but couldn't find any similar topic here...
Thx in advance,
Tom

Re: npc casting + effects on pc

Posted: Mon Jun 28, 2010 9:24 am
by jurchiks
doCast method...

Re: npc casting + effects on pc

Posted: Mon Jun 28, 2010 10:14 am
by rychoo84
@up
doCast would be great, when e.g. taking single buffs from NPC

OK, meanwhile I've expanded l2j classes and found MagicSkillUse class

Code: Select all

 //...L2Npc npc = player.getLastFolkNPC(); [color=#00FF40]//L2PcInstance player[/color][color=#00FF40]//npc is casting empower on me (only the visible effect - as it mean to be)[/color]npc.broadcastPacket(new MagicSkillUse(npc, player, 1059, 1, 4000, 1));  
Works fine (I can see the casting effect on NPC), except that there is no visible effect on me (e.g. with that empower above I can't see that purple circle sorrounding me after usual cast of empower).

Maybe it has something to do with MagicSkillLaunched method but really don't know what's the purpose (use and effect) of that class.

Looking forward for your hints,
Thx in advance
Tom

Re: npc casting + effects on pc

Posted: Mon Jun 28, 2010 10:33 am
by jurchiks
well what do you want, to cast 100 buffs?

Re: npc casting + effects on pc

Posted: Mon Jun 28, 2010 10:42 am
by JIV
MagicSkillUse - casting effect
MagicSkillLaunched - effect on targets

both are only visual, to apply buff use

Code: Select all

com.l2jserver.gameserver.model.L2Skill.getEffects(L2Character, L2Character)

Re: npc casting + effects on pc

Posted: Mon Jun 28, 2010 3:57 pm
by jurchiks
I guess he wants all three then...

Re: npc casting + effects on pc

Posted: Mon Jun 28, 2010 5:19 pm
by rychoo84
not quite all - only these handling the visual effects - I thought i did describe my problem clear enough, anyway thx for your help. You may close the topic.

Re: npc casting + effects on pc

Posted: Mon Jun 28, 2010 6:12 pm
by jurchiks
what, you don't need the effect, only the visuals?

Re: npc casting + effects on pc

Posted: Wed May 25, 2011 2:57 am
by torpedo
yes... 2 days and i find this topic... i try all google and here but ok find this...

the answer is yes i need this too the visual effect just the visual.

i see the comand up.... MagicSkillUse - casting effect and MagicSkillLaunched - effect on targets

how use this comands in lines of a buffer?

example player buff the custom buffs fighter light and effect (light) is same of transform dispel... lineage 2 have a lot o visual effects... not the individual buffs but one list of 20 buffs and in final (sound plin - i do) but the light omg is hard to do... in past buffers used restoreHPMP but was a adapt to do effect... the real question is this in the topic... how use visual efects in lines of .py or java quests custom...

2 days working and nothing here i try a lot of things im not expert...

when my tests fail i run to the npc subclass manager and change subclass for see the sound (plim) and gold light (flash)... i try find the .py of class master and subclass manager but i realy dont know where is it...

i know the team l2j work a lot in other things and all time im greatfull.... but help here please...

omg i type a lot and sometimes is pure deseperate time...

RESUME: my dificult is only one line to do the effects work in .py quests, visual efect in player.

thx all...

SOLUTION

Posted: Fri May 27, 2011 1:24 pm
by torpedo
see here the final of this history...

http://www.l2jserver.com/forum/viewto ... &t=22164