Author Topic: [PI] Fixed Tutorial [Working 100% Overloads!]  (Read 286 times)

Offline Tampon Abuse

  • Dragon Member
  • *
  • Posts: 193
  • Rep 1
  • All vote for Rune-Kingdom!
  • Location: Oklahoma, Oklahoma City
    • View Profile
[PI] Fixed Tutorial [Working 100% Overloads!]
« on: April 04, 2011, 05:23:06 am »
client sided in itemdef.java
Code: [Select]
case 15335:
itemDef.actions = new String[5];
itemDef.actions[0] = "Drink";
itemDef.name = "Overload(4)"; //Name
itemDef.description = "An overload potion!".getBytes();
itemDef.originalModelColors = new int[1];
itemDef.modifiedModelColors = new int[1];
itemDef.originalModelColors[0] = 61;
itemDef.modifiedModelColors[0] = 0;
itemDef.modelID = 2789;
itemDef.modelZoom = 550;
itemDef.modelRotation1 = 84;
itemDef.modelRotation2 = 1996;
itemDef.modelOffset1 = 0;
itemDef.modelOffset2 = 0;
break;
case 15336:
itemDef.actions = new String[5];
itemDef.actions[0] = "Drink";
itemDef.name = "Overload(3)"; //Name
itemDef.description = "An overload potion!".getBytes();
itemDef.originalModelColors = new int[1];
itemDef.modifiedModelColors = new int[1];
itemDef.originalModelColors[0] = 61;
itemDef.modifiedModelColors[0] = 0;
itemDef.modelID = 2697;
itemDef.modelZoom = 550;
itemDef.modelRotation1 = 84;
itemDef.modelRotation2 = 1996;
itemDef.modelOffset1 = 0;
itemDef.modelOffset2 = 0;
break;
case 15337:
itemDef.actions = new String[5];
itemDef.actions[0] = "Drink";
itemDef.name = "Overload(2)"; //Name
itemDef.description = "An overload potion!".getBytes();
itemDef.originalModelColors = new int[1];
itemDef.modifiedModelColors = new int[1];
itemDef.originalModelColors[0] = 61;
itemDef.modifiedModelColors[0] = 0;
itemDef.modelID = 2384;
itemDef.modelZoom = 550;
itemDef.modelRotation1 = 84;
itemDef.modelRotation2 = 1996;
itemDef.modelOffset1 = 0;
itemDef.modelOffset2 = 0;
break;
case 15338:
itemDef.actions = new String[5];
itemDef.actions[0] = "Drink";
itemDef.name = "Overload(1)"; //Name
itemDef.description = "An overload potion!".getBytes();
itemDef.originalModelColors = new int[1];
itemDef.modifiedModelColors = new int[1];
itemDef.originalModelColors[0] = 61;
itemDef.modifiedModelColors[0] = 0;
itemDef.modelID = 2621;
itemDef.modelZoom = 550;
itemDef.modelRotation1 = 84;
itemDef.modelRotation2 = 1996;
itemDef.modelOffset1 = 0;
itemDef.modelOffset2 = 0;
break;

---------------------------server side------------------------------
cant find the models  find it ur self

in item.cfg
Code: [Select]
item = 15335 Overload(4) overload_pot 200000 200000 0 0 0 0 0 0 0 0 0 0 0 0 0
item = 15336 Overload(3) overload_pot 200000 200000 0 0 0 0 0 0 0 0 0 0 0 0 0
item = 15337 Overload(2) overload_pot 200000 200000 0 0 0 0 0 0 0 0 0 0 0 0 0
item = 15338 Overload(1) overload_pot 200000 200000 0 0 0 0 0 0 0 0 0 0 0 0 0

client .java

find
Code: [Select]
public void process() {and add
Code: [Select]
if (overloadcounter > 0) {
startAnimation(2383);//if loading 602 (3170)
dealDamage(10);
handleHitMask(10);
overloadcounter -= 1;
getPA().refreshSkill(3);
}

go in player.java and add this int
Code: [Select]
public int overloadcounter = 0;
add this in potions.java
Code: [Select]
case 15335:
doOverload(itemId, 15336, slot);
break;
case 15336:
doOverload(itemId, 15337, slot);
break;
case 15337:
doOverload(itemId, 15338, slot);
break;
case 15338:
doOverload(itemId, 229, slot);

find
Code: [Select]
drinkAntiand add this below it
Code: [Select]
public void doOverload(int itemId, int replaceItem, int slot) {
c.startAnimation(829);
c.playerItems[slot] = replaceItem + 1;
c.getItems().resetItems(3214);
c.overloadcounter = 5;
//c.overloadcounter();
int[] toIncrease = {0,1,2,4};
c.playerLevel[0] += getBrewStat(0, .27);
if (c.playerLevel[0] > (c.getLevelForXP(c.playerXP[0])*1.27 + 1)) {
c.playerLevel[0] = (int)(c.getLevelForXP(c.playerXP[0])*1.27);
}
c.playerLevel[1] += getBrewStat(1, .27);
if (c.playerLevel[1] > (c.getLevelForXP(c.playerXP[1])*1.27 + 1)) {
c.playerLevel[1] = (int)(c.getLevelForXP(c.playerXP[1])*1.27);
}
c.playerLevel[2] += getBrewStat(2, .27);
if (c.playerLevel[2] > (c.getLevelForXP(c.playerXP[2])*1.27 + 1)) {
c.playerLevel[2] = (int)(c.getLevelForXP(c.playerXP[2])*1.27);
}
c.playerLevel[4] += getBrewStat(4, .237);
if (c.playerLevel[4] > (c.getLevelForXP(c.playerXP[4])*1.237 + 1)) {
c.playerLevel[4] = (int)(c.getLevelForXP(c.playerXP[4])*1.237);
}
c.getPA().refreshSkill(0);
c.getPA().refreshSkill(1);
c.getPA().refreshSkill(2);
c.getPA().refreshSkill(4);
}


And you are done..

If you want this to have a delay between each damage add the following:

Client.java under process
Code: [Select]
if (System.currentTimeMillis() - lastoverload > 1000) {
if (overloadcounter > 0) {
startAnimation(2383);
dealDamage(10);
handleHitMask(10);
overloadcounter -= 1;
getPA().refreshSkill(3);
lastoverload = System.currentTimeMillis();
}
}


Player.java search for "public long lastPlayerMove," or "public long" and at the end add ", lastoverload"

That will make it so it checks a timer and should have a 1 second delay between each hit.


No problem, just another fixed tutorial for rune-kingdom
enjoy overloads

-Brandon

Everyone Vote For RUNE-KINGDOM at http://www.mmorpgtop200.com/in.php?site=6792

Share on Bluesky Share on Facebook


Offline Povskill

  • Iron Member
  • *
  • Posts: 15
  • Rep 0
    • View Profile
Re: [PI] Fixed Tutorial [Working 100% Overloads!]
« Reply #1 on: April 04, 2011, 04:57:15 pm »
Good tut usefull. But I read this 1000 times already in other forums

Offline Tampon Abuse

  • Dragon Member
  • *
  • Posts: 193
  • Rep 1
  • All vote for Rune-Kingdom!
  • Location: Oklahoma, Oklahoma City
    • View Profile
Re: [PI] Fixed Tutorial [Working 100% Overloads!]
« Reply #2 on: April 04, 2011, 07:01:43 pm »
Thonks ill try my best to make and fix more and better tutorials

Everyone Vote For RUNE-KINGDOM at http://www.mmorpgtop200.com/in.php?site=6792