Page 1 of 1

NPC Buffer - Visual effects

Posted: Wed Jul 23, 2014 1:20 pm
by DrGonzo
Server Revision: 6445
Datapack Revision: 9641


Hi, i am working on my NPC buffer. NPC currently works but i'd like to add some features.

Buffs are chosen one by one, and this is an example:

Code: Select all

 #Shieldif event == "1":st.takeItems(ADENA_ID, 20000)SkillTable.getInstance().getInfo(1040,2).getEffects(st.getPlayer(),st.getPlayer())###st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1040,2),False,False)return "2.htm"st.setState(COMPLETED) 
NPC applies the effects of Might on getPlayer. I'd like to see on getPlayer the visual and sound effect of Might when he takes the buff.

With useMagic method the result is that getPlayer starts casting the Might magic skill on himself, but I don't need this.

I have found this post: viewtopic.php?f=81&t=17987 but it didn't help..
Is it possible to have this feature with Jython? Any help or suggestions?
Thanks all

Re: NPC Buffer - Visual effects

Posted: Thu Jul 24, 2014 4:25 pm
by Zoey76
SkillTable -> SkillData
getInfo -> getSkill

And so on.

Re: NPC Buffer - Visual effects

Posted: Fri Jul 25, 2014 2:17 pm
by DrGonzo
Thx Zoey, do you mean to use "SkillData.getInstance().getSkill(1040,2).getEffects(st.getPlayer(),st.getPlayer())"? Is that correct?

Code: Select all

#Shieldif event == "1":st.takeItems(ADENA_ID, 20000)SkillTable.getInstance().getInfo(1040,2).getEffects(st.getPlayer(),st.getPlayer())SkillData.getInstance().getSkill(1040,2).getEffects(st.getPlayer(),st.getPlayer())return "2.htm"st.setState(COMPLETED)

Re: NPC Buffer - Visual effects

Posted: Fri Jul 25, 2014 3:08 pm
by Zoey76
Yes, there could be more changes, but the basic idea is to check the line of code and see if it changed.

Also change imports, if class names changed.