npc casting + effects on pc

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Locked
User avatar
rychoo84
Posts: 58
Joined: Fri Jan 01, 2010 11:26 am
Location: Breslau

npc casting + effects on pc

Post 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
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: npc casting + effects on pc

Post by jurchiks »

doCast method...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
rychoo84
Posts: 58
Joined: Fri Jan 01, 2010 11:26 am
Location: Breslau

Re: npc casting + effects on pc

Post 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
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: npc casting + effects on pc

Post by jurchiks »

well what do you want, to cast 100 buffs?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: npc casting + effects on pc

Post 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)
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: npc casting + effects on pc

Post by jurchiks »

I guess he wants all three then...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
rychoo84
Posts: 58
Joined: Fri Jan 01, 2010 11:26 am
Location: Breslau

Re: npc casting + effects on pc

Post 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.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: npc casting + effects on pc

Post by jurchiks »

what, you don't need the effect, only the visuals?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
torpedo
Posts: 98
Joined: Sun Mar 11, 2007 12:13 am
Contact:

Re: npc casting + effects on pc

Post 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...
Torpedo / Sumaru / The love for L 2 is a stronger force in my life / Thx L2jServer Team
User avatar
torpedo
Posts: 98
Joined: Sun Mar 11, 2007 12:13 am
Contact:

SOLUTION

Post by torpedo »

see here the final of this history...

http://www.l2jserver.com/forum/viewto ... &t=22164
Torpedo / Sumaru / The love for L 2 is a stronger force in my life / Thx L2jServer Team
Locked