Purpose: To add gfx voids that will make the npc and player do the gfx in the direction they are facing not just south.
Difficulty: 3/10!
Server base: Any.
Classes modified: Player & NPC
Step 1: Open player.java and find..
Code:
appendPlayerUpdateBlock(stream str)
and see if you have
Code:
if(mask100update) updateMask |= 0x100;
Which most sources will have. if you do skip to step 3.
if not add
Code:
appendPlayerUpdateBlock(stream str)
and see if you have
Code:
if(mask100update) updateMask |= 0x100;
On top of
Code:
if(animationRequest != -1) updateMask |= 8;
and then find
Code:
if(animationRequest != -1) appendAnimationRequest(str);
and then above it add this
Code:
if(mask100update) appendMask100Update(str);
Step 2: Add these anywhere in your player.java
Code:
public int mask100var1 = 0;
public int mask100var2 = 0;
protected boolean mask100update = false;
public void appendMask100Update(stream str) {
str.writeWordBigEndian(mask100var1);
str.writeDWord(mask100var2);
}
then find
and add this in it
Code:
mask100update = false;
Step 3:
add these voids in your player.java
Code:
public void gfx100(int gfx)
{
mask100var1 = gfx;
mask100var2 = 6553600;
mask100update = true;
updateRequired = true;
}
public void gfx0(int gfx)
{
mask100var1 = gfx;
mask100var2 = 65536;
mask100update = true;
updateRequired = true;
}
Now these voids can be used to call gfxs at the hiegt of 0 or the heght of 100.
Step 4: open NPC.java (Hardest part of the TUT begins now, Recommended to make backup of npc)
then find
Code:
if(animUpdateRequired) updateMask |= 0x10;
and beneath it add
Code:
if(mask80update) updateMask |= 0x80;
Then find
Code:
if (animUpdateRequired) appendAnimUpdate(str);
add this beneath it
Code:
if(mask80update) appendMask80Update(str);
Step 5: Add these anywhere in NPC.
Code:
public void gfx100(int gfx)
{
mask80var1 = gfx;
mask80var2 = 6553600;
mask80update = true;
updateRequired = true;
}
public void gfx0(int gfx)
{
mask80var1 = gfx;
mask80var2 = 65536;
mask80update = true;
updateRequired = true;
}
public int mask80var1 = 0;
public int mask80var2 = 0;
public boolean mask80update = false;
public void appendMask80Update(stream str) {
str.writeWord(mask80var1);
str.writeDWord(mask80var2);
System.out.println("GFX: " +mask80var1+"HEIGHT: "+mask80var2);
}
Then Find
and add this in it
Code:
mask80update = false;
DONE, Now what you have done is added two very important npcs and player update block which allows you to use your gfx on both npc and player properly. Most of your stillgfx calls should be replaced by these to have perfect gfxs. And I will not explain how to call the gfxs for npcs, you will have to figure that out by your self.Enjoy this and tell me if any bugs come up.
Credits for player gfx to Xero Cheez and lil to me for expaining
Credits for NPC gfx 100% to me I figured it all out by myself.
By the way these update blocks were hidden till date for 90% of the people on this site. Please don't be greedy and don't keep your finding to your self. Working together is the only way to get RuneScape Private Servers close to perfect.
Anyways have fun with this. I found this very important in server building hope you do as well.