Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

L2J [Help] How to give a skill?

Newbie Spellweaver
Joined
Jul 13, 2008
Messages
7
Reaction score
0
Hi, guys. I need your help :)

Situation is:
There is a quest, whose reward should be "Blessing of Noblesse" skill.
I created everything but the reward line.. I just don't know how to give a skill to the player.
Maybe you know? ;)

Thanks

*bump*

I was trying to guess that command, using NPC buffer's line
SkillTable.getInstance().getInfo(396,1).getEffects(st.getPlayer(),st.getPlayer())
which gives that skill's effect, so I tried
SkillTable.getInstance().getInfo(396,1).getSkill(st.getPlayer(),st.getPlayer())
SkillTable.getInstance().getSkill(396,1)
st.getPlayer().addSkill(396,1)
st.getPlayer().getSkill(396,1)
but no luck at all Smiley

I even downloaded Python guide and thought about idea to import needed skills, using the mySQL-Python module, but that's way too complicated as long as I'm sure there a command (maybe something like st.getPlayer().getSkill(396,1) ) for that Smiley

P.S. I'm wondering where can I find source of the module, which is called by the
from com.l2jfree.gameserver.model.quest import State
coz I thing there I can find an answer.

Got it ^^

SKILL_ID = id_of_the_skill_you_want_to_give
SKILL_LVL level_of_the_skill_you_want_to_give
st.getPlayer().addSkill(SkillTable.getInstance().getInfo(SKILL_ID,SKILL_LVL))

Edit: blah, those skills disappear after character relogins.... how to fix it?
 
Last edited by a moderator:
Supreme Arcanarch
Joined
Apr 24, 2006
Messages
906
Reaction score
10
if they disappear, make a connection to database, make a query that adds skills to certain player and it will stay after restart
 
Upvote 0
Newbie Spellweaver
Joined
Jul 13, 2008
Messages
7
Reaction score
0
if they disappear, make a connection to database, make a query that adds skills to certain player and it will stay after restart

Can I do that without any kind of plugins?
I mean how can I make a connection to MySQL @ __init__.py
 
Upvote 0
Supreme Arcanarch
Joined
Apr 24, 2006
Messages
906
Reaction score
10
open gameserver\data\scripts\quests\503_PursuitClanAmbition\__init__.py
there is a great example of using MySQL connection and getting needed values
 
Upvote 0
Initiate Mage
Joined
Apr 4, 2007
Messages
1
Reaction score
0
microb, or Rin4a.

I was trying to do the same thing microb its doing, using:
st.getPlayer().addSkill(SkillTable.getInstance().g etInfo(SKILL_ID,SKILL_LVL))

But I saw what Rin4a says, and for me its a little complicated how to do the connection with MySQL to add a skill.
You make it right and working microb, how do it?
 
Upvote 0
Back
Top