Thumbs upHow to Create New Classes.

Posts 115 of 24 · Page 1 of 2
How to Create New Classes.
Let's start:

Go in to Visual Studio, navigate to /db/data/dat2.xml

Under the last </Object>, But before </Objects>add this:
Code:
<Object type="0x0326" id="Ninja">
    <Class>Player</Class>
    <Description>The ninja relies on speed and skill, using katanas and ninja stars to deal big damage.</Description>
    <AnimatedTexture>
      <File>players</File>
      <Index>12</Index>
    </AnimatedTexture>
    <HitSound>player/priest_hit</HitSound>
    <DeathSound>player/priest_death</DeathSound>
    <Player/>
    <BloodProb>1.0</BloodProb>
    <SlotTypes>24, 25, 6, 9, 0, 0, 0, 0, 0, 0, 0, 0</SlotTypes>
    <Equipment>0x2587, 0x2589, -1, -1, 0xa22, -1, -1, -1, -1, -1, -1, -1</Equipment>
    <MaxHitPoints max="720">100</MaxHitPoints>
    <MaxMagicPoints max="252">100</MaxMagicPoints>
    <Attack max="70">43</Attack>
    <Defense max="25">0</Defense>
    <Speed max="60">29</Speed>
    <Dexterity max="70">40</Dexterity>
    <HpRegen max="75">40</HpRegen>
    <MpRegen max="70">40</MpRegen>
    <LevelIncrease min="20" max="30">MaxHitPoints</LevelIncrease>
    <LevelIncrease min="2" max="8">MaxMagicPoints</LevelIncrease>
    <LevelIncrease min="1" max="2">Attack</LevelIncrease>
    <LevelIncrease min="0" max="0">Defense</LevelIncrease>
    <LevelIncrease min="0" max="2">Speed</LevelIncrease>
    <LevelIncrease min="1" max="2">Dexterity</LevelIncrease>
    <LevelIncrease min="0" max="1">HpRegen</LevelIncrease>
    <LevelIncrease min="1" max="2">MpRegen</LevelIncrease>
    <UnlockLevel level="20">Rogue</UnlockLevel>
    <UnlockLevel level="20">Warrior</UnlockLevel>
  </Object>
Stuff to modify:
Code:
<Equipment>0x2587, 0x2589, -1, -1, 0xa22, -1, -1, -1, -1, -1, -1, -1</Equipment>
These are all 12 of your character's slots/inventory. What Item ID's you put in here is what people get when they make that class. -1 = Empty

Code:
<Attack max="70">43</Attack>
And other stats... max="70" means the max the stat can go. 43 means the amount the class starts with. (Base Stats)

Code:
<LevelIncrease min="1" max="2">Attack</LevelIncrease>
Amount of Roll possible per level up. Usually leave these the same.

Code:
<UnlockLevel level="20">Rogue</UnlockLevel>
    <UnlockLevel level="20">Warrior</UnlockLevel>
How you Unlock your class. For Example, Unlock the class when you reach level 20 with Rogue and Warrior.

Code:
<AnimatedTexture>
      <File>players</File>
      <Index>12</Index>
    </AnimatedTexture>
Will Get to this in a second.


Now, open up your client in SWF Decompiler.
Navigate to Image 165, which is where the characters are.
Extract the image, and add your own character under the Sorcerer.
(No spaces in between characters)

Going Back to
Code:
<AnimatedTexture>
      <File>players</File>
      <Index>12</Index>
    </AnimatedTexture>
Replace "12" With the Vertical number

For most of you, it will be index 14.

Save, Rebuild, then head over to Rabcdasm.
(I'm using rabcdasm easy because I'm lazy)
extract your client like normal, and once it's finished,

make a new txt file, in it write:
Code:
swfbinexport client.swf
Then save as > choose save as type > all files,
rename it "binexport.bat"

Now, double-click it.

You now should have a list of .bin files appear in the folder.

What we are looking for is client-108.bin

Right Click > "Open With Notepad"

Just like before in the server, scroll down to the bottom and just before </Objects>,

Copy and paste your code for your new class EXACTLY as is was in the server.

Now create a new .bat file, just as we did before, although now, in it write
Code:
swfbinreplace client.swf 108 client-108.bin
Now run it, and you are all done!

Actually, one last thing I'm not going to go into much detail about.
Go back to SWF Decompiler, and export image 155.
Just like before, add your class under the last one, however,

RED = MAIN DYE
GREEN = ACCESSORY DYE
Thank you!

EDIT: How do you change what its ability is?
hm when I import the bin back to the client the client stays black
edit:
found the problem you beginn counting at 1 but you have to start at 0 so the ninja would be 14 not 15
finally you made it idk why people need a tut for this
Quote Originally Posted by mullog View Post
hm when I import the bin back to the client the client stays black
edit:
found the problem you beginn counting at 1 but you have to start at 0 so the ninja would be 14 not 15
Oops, thanks for noticing, I'll fix soon
Thanks, couldn't figure out what to edit in the SWF.
My char is invisible...
When i create the class its ok , but when I restart my client I have a bug and can't see my characters ... HELP PLEASE!
Quote Originally Posted by Axeall View Post
When i create the class its ok , but when I restart my client I have a bug and can't see my characters ... HELP PLEASE!
Quote Originally Posted by abi97 View Post
My char is invisible...
Quote Originally Posted by Axeall View Post
PLS HELP ME WITH MY PROBLEM @2xUP
Ok well the easiest thing to fix this is by creating another account as a backup account and then going into heidisql or what ever you use and in the character database change your main accounts characters id to the backup character one. Then reload and log in as your main character and then back in heidisql undo what you just did which I mean is basically changing the backup character ids back to the main account and all your characters will be there again.

Hope this works. I sometimes get this problem and some of the people who join my pserver also get this problem so this is how I fix it for everyone.

If it works for you then thank me and also add to my reputation

BTW: My way may not be the quickest but it is the easiest in terms of knowing what to do if you know how to use heidisql and change your rank and all that stuff...

Quote Originally Posted by C453 View Post
Let's start:

Go in to Visual Studio, navigate to /db/data/dat2.xml

Under the last </Object>, But before </Objects>add this:
Code:
<Object type="0x0326" id="Ninja">
    <Class>Player</Class>
    <Description>The ninja relies on speed and skill, using katanas and ninja stars to deal big damage.</Description>
    <AnimatedTexture>
      <File>players</File>
      <Index>12</Index>
    </AnimatedTexture>
    <HitSound>player/priest_hit</HitSound>
    <DeathSound>player/priest_death</DeathSound>
    <Player/>
    <BloodProb>1.0</BloodProb>
    <SlotTypes>24, 25, 6, 9, 0, 0, 0, 0, 0, 0, 0, 0</SlotTypes>
    <Equipment>0x2587, 0x2589, -1, -1, 0xa22, -1, -1, -1, -1, -1, -1, -1</Equipment>
    <MaxHitPoints max="720">100</MaxHitPoints>
    <MaxMagicPoints max="252">100</MaxMagicPoints>
    <Attack max="70">43</Attack>
    <Defense max="25">0</Defense>
    <Speed max="60">29</Speed>
    <Dexterity max="70">40</Dexterity>
    <HpRegen max="75">40</HpRegen>
    <MpRegen max="70">40</MpRegen>
    <LevelIncrease min="20" max="30">MaxHitPoints</LevelIncrease>
    <LevelIncrease min="2" max="8">MaxMagicPoints</LevelIncrease>
    <LevelIncrease min="1" max="2">Attack</LevelIncrease>
    <LevelIncrease min="0" max="0">Defense</LevelIncrease>
    <LevelIncrease min="0" max="2">Speed</LevelIncrease>
    <LevelIncrease min="1" max="2">Dexterity</LevelIncrease>
    <LevelIncrease min="0" max="1">HpRegen</LevelIncrease>
    <LevelIncrease min="1" max="2">MpRegen</LevelIncrease>
    <UnlockLevel level="20">Rogue</UnlockLevel>
    <UnlockLevel level="20">Warrior</UnlockLevel>
  </Object>
Stuff to modify:
Code:
<Equipment>0x2587, 0x2589, -1, -1, 0xa22, -1, -1, -1, -1, -1, -1, -1</Equipment>
These are all 12 of your character's slots/inventory. What Item ID's you put in here is what people get when they make that class. -1 = Empty

Code:
<Attack max="70">43</Attack>
And other stats... max="70" means the max the stat can go. 43 means the amount the class starts with. (Base Stats)

Code:
<LevelIncrease min="1" max="2">Attack</LevelIncrease>
Amount of Roll possible per level up. Usually leave these the same.

Code:
<UnlockLevel level="20">Rogue</UnlockLevel>
    <UnlockLevel level="20">Warrior</UnlockLevel>
How you Unlock your class. For Example, Unlock the class when you reach level 20 with Rogue and Warrior.

Code:
<AnimatedTexture>
      <File>players</File>
      <Index>12</Index>
    </AnimatedTexture>
Will Get to this in a second.


Now, open up your client in SWF Decompiler.
Navigate to Image 165, which is where the characters are.
Extract the image, and add your own character under the Sorcerer.
(No spaces in between characters)

Going Back to
Code:
<AnimatedTexture>
      <File>players</File>
      <Index>12</Index>
    </AnimatedTexture>
Replace "12" With the Vertical number

For most of you, it will be index 14.

Save, Rebuild, then head over to Rabcdasm.
(I'm using rabcdasm easy because I'm lazy)
extract your client like normal, and once it's finished,

make a new txt file, in it write:
Code:
swfbinexport client.swf
Then save as > choose save as type > all files,
rename it "binexport.bat"

Now, double-click it.

You now should have a list of .bin files appear in the folder.

What we are looking for is client-108.bin

Right Click > "Open With Notepad"

Just like before in the server, scroll down to the bottom and just before </Objects>,

Copy and paste your code for your new class EXACTLY as is was in the server.

Now create a new .bat file, just as we did before, although now, in it write
Code:
swfbinreplace client.swf 108 client-108.bin
Now run it, and you are all done!

Actually, one last thing I'm not going to go into much detail about.
Go back to SWF Decompiler, and export image 155.
Just like before, add your class under the last one, however,

RED = MAIN DYE
GREEN = ACCESSORY DYE
Great post xD
Quote Originally Posted by Ahl View Post
Ok well the easiest thing to fix this is by creating another account as a backup account and then going into heidisql or what ever you use and in the character database change your main accounts characters id to the backup character one. Then reload and log in as your main character and then back in heidisql undo what you just did which I mean is basically changing the backup character ids back to the main account and all your characters will be there again.

Hope this works. I sometimes get this problem and some of the people who join my pserver also get this problem so this is how I fix it for everyone.

If it works for you then thank me and also add to my reputation

BTW: My way may not be the quickest but it is the easiest in terms of knowing what to do if you know how to use heidisql and change your rank and all that stuff...



Great post xD
Master of misunderstanding you truly are. Doing something wrong when adding a new class to your server cannot be fixed with heidisql
Quote Originally Posted by CrazyJani View Post


Master of misunderstanding you truly are. Doing something wrong when adding a new class to your server cannot be fixed with heidisql
I read it wrongly.
Is it possible to create 16x16 sprites for players? I want to make a few rank-specific classes that feature more detailed anims, but I'm not sure if that's possible.
PLS HELP ME WITH MY PROBLEM @2xUP
cant find it in classes menu
ths was a big help!
Posts 115 of 24 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?