Weapon Skill Question

10/21/2008 13:45 Exia13#1
Well, i give up, i tried coding the weapon skills in my server (im using PowerSource).
I found where the skills were but for some reason, i can't get the skill to level.

Below is the code i used. I'm using Speedgun for spear first. I found the skill
type (i'd like to thank the maker of PowerSource for including the skill ids in his/her source)
and i searched my database for the weapon type.



Quote:
if (WepType == 560 && !Use)
{
if (Skills.Contains((short)1260))
{
byte SkillLvl = (byte)Skills[(short)1260];
byte Chance = (byte)ExternalDatabase.SkillAttributes[(int)7020][(int)SkillLvl][5];
if (Other.ChanceSuccess(Chance))
{
UseSkill(1260, 0, 0, 0);
Use = true;
}
}
}
I think i saw a guide on how to get the weapon skills working, but that's no fun
if you don't try, so i decided to try myself.

Thanks in advanced. :D
10/21/2008 14:35 tao4229#2
Quote:
Originally Posted by Exia13 View Post
Well, i give up, i tried coding the weapon skills in my server (im using PowerSource).
I found where the skills were but for some reason, i can't get the skill to level.

Below is the code i used. I'm using Speedgun for spear first. I found the skill
type (i'd like to thank the maker of PowerSource for including the skill ids in his/her source)
and i searched my database for the weapon type.





I think i saw a guide on how to get the weapon skills working, but that's no fun
if you don't try, so i decided to try myself.

Thanks in advanced. :D
Its in there byte SkillLvl = whatever,

In LOTF(PowerSource is LOTF) each character has two hashtables for skills, one with skillID and level(which you use), and one with SkillID and exp.
It's just accessing the Skills Hashtable with the Key of the skillID, so it'll output the value, which is the level.
10/21/2008 15:01 Exia13#3
Still not too sure. I tried changing some values, but it still doesn't level up. I can see the skill working but it wont get any exp. I even changed the skill types to see if that was the problem because in : [(int)SkillLvl][5]; the 5 stands for a RangeSectorSkilRanged Attack, so i changed it a few times with the same result.
10/21/2008 15:10 tao4229#4
Quote:
Originally Posted by Exia13 View Post
Still not too sure. I tried changing some values, but it still doesn't level up. I can see the skill working but it wont get any exp. I even changed the skill types to see if that was the problem because in : [(int)SkillLvl][5]; the 5 stands for a RangeSectorSkilRanged Attack, so i changed it a few times with the same result.
OH "skill to level.", maybe I do need to wear my glasses when I'm on the computer >_>.

My bad, ignore the other post, mess with Character.AddSkillExp()
10/21/2008 15:23 Exia13#5
>_< For some dumb reason, the i can't search for anything in the source. I think find has a problem. This is gonna take some time.
10/21/2008 17:09 Kiyono#6
Quote:
Originally Posted by Exia13 View Post
>_< For some dumb reason, the i can't search for anything in the source. I think find has a problem. This is gonna take some time.
if you want to search just press Ctrl + F and "look in entire solution"
10/21/2008 17:12 Exia13#7
Don't worry, i got it. But still can't get it to work, not even the guide is helping.
10/21/2008 21:46 nTL3fTy#8
First things first, SpeedGun is the same skill type as FastBlade and ScentSword (straight line).
If you put type 5 in the SkillAttributes array for SpeedGun, change it to 4 and it should be handled by UseSkill.
10/21/2008 22:14 BlooD-BoY#9
where you see the "7020" change it to 1260 O.O

and you'll have to add the skill into the externalDatabase if you didn't do so, when your done just build the externaldatabase and debug the whole solution....and you should be good O.O
10/22/2008 00:47 demonscim#10
man yall are so smart...
10/22/2008 05:27 shinichi79#11
it do not working??????????????????