Perfect gfx for ice barrage
This tut will show you how to make perfect gfx for ice barrage or any other spell. What it does is when you cast ice barrage the ice cube stays with the enemy, not where he/she first stood.
Difficulty: 1
Classes modified: client.java
Procedure:
Step 1.
Open client.java and add this void if you dont have it, But you probably do already.
Code:
public void playerGfx(int id, int delay) {
mask100var1 = int;
mask100var2 = delay;
mask100update = true;
updateRequired = true;
}
Step 2.
Search ice barrage in client.java. You will find something like this,
Code:
if(spellID == 12891) // ice barrage (lvl 94 spell)
{
if(playerLevel[6] > 94)
{
if((playerHasItemAmount(560, 4)==false) || (playerHasItemAmount(565, 2)==false) || (playerHasItemAmount(555, 6)==false))
{
sendMessage("You do not have enough runes to cast this spell.");
}
else if((playerHasItemAmount(560, 4)==true) && (playerHasItemAmount(565, 2)==true) && (playerHasItemAmount(555, 6)==true))
{
hitDiff = 5 + misc.random(25);
castOnPlayer.entangle();
castOnPlayer.inCombat();
startAnimation(1979);
//attackPlayersWithin(369,);
castOnPlayer.freeze();
stillgfx(366, castOnPlayer.absY, castOnPlayer.absX);
castOnPlayer.stillgfx(369, castOnPlayer.absY, castOnPlayer.absX);
castOnPlayer.sendMessage("You have been frozen!");
deleteItem(560, getItemSlot(560), 4);
deleteItem(565, getItemSlot(565), 2);
deleteItem(555, getItemSlot(555), 6);
inCombat();
PkingDelay = 15;
sendMessage("You freeze the enemy!");
teleportToX = absX;
teleportToY = absY;
}
else if(playerLevel[6] <= 94)
{
sendMessage("You need a magic level of 94 to cast this spell.");
}
}
Now under
Code:
startanimation(1979);
Add
Code:
castOnPlayer.playerGfx(369,10);
You don't want to add just the void itself. What this will do is only make the gfx on you, not the enemy. Now in your ice barrage again find
Code:
stillgfx(366, castOnPlayer.absY, castOnPlayer.absX);
castOnPlayer.stillgfx(369, castOnPlayer.absY, castOnPlayer.absX);
In front of both of these codes put "//" But without the quotes. This will disable the previous gfx from working, and only the new one will work.
Credits:10% Me, 90% Xero for the void. If this has been posted before I'm sorry. I have seen the void posted before but not how to use it.