PDA

View Full Version : Full working MultiBarrage - Delta



Benjiboyyy
July 1st, 2010, 02:30
Alot of people were having problems with Nintendo/X Fbi's Multibarrage method,

and since I don't give a fuck about my delta source anymore, i'll post the method that

works with everyone's Delta.


public void multiBarrage(final client casualty) {

final client parent = this;
/**
* Calls Event Manager
*/
EventManager.getSingleton().addEvent(new Event() {
public void execute(EventContainer container) {
for(Player player : PlayerHandler.players) {
client p = (client) player;
boolean splash = true;
/**
* Ensures player is in multi
*/
if(!multiCombat() || p == null || p == casualty || p == parent) {
continue;
}
/**
* Ensures player level difference is correct
*/
if(Math.abs(p.combatLevel - combatLevel) > wildyLevel && !isInPitGame()) {
continue;
}

/**
* Cheap Hax for MageAtk method :P
*/
if(Math.abs(p.absX - casualty.absX) < 2 && Math.abs(p.absY - casualty.absY) < 2) {
if (misc.random((playerLevel[6]) + misc.random(playerBonus[6])) > misc.random(20)){
splash = false;
} else {
splash = true;
}

if ((casualty == null) || (p == null) || p.tStage > 0 || p.currentHealth == 0 || !p.multiCombat() || p.deathStage > 0) {
return;
}
if (!splash) {
p.lowGFX(369,0);
p.hitID = parent.playerId;
p.inCombat = true;

p.lastCombat = System.currentTimeMillis();
if (!p.ProtMage) {
p.hitDiff2 = misc.random(40);
} else {
/**
* The random hit, this is shit way of calculating the hit, but w/e
*/
p.hitDiff2 = misc.random(30);
}
p.hitUpdateRequired2 = true;
p.updateRequired = true;
p.dealDamage(p.hitDiff2);
p.KilledBy[playerId] += p.hitDiff2;
p.hitID = playerId;
p.offTimer = System.currentTimeMillis();
p.KillerId = playerId;
}
else if (splash) {
p.specGFX(85);
p.hitID = parent.playerId;
p.inCombat = true;
p.lastCombat = System.currentTimeMillis();
}

if (p.vengon && p.hitDiff2 != 0 && !splash) {
hitDiff = (int)(hitDiff * .83);
currentHealth -= (int)(hitDiff * .83);
hitUpdateRequired = true;
updateRequired = true;
appearanceUpdateRequired = true;
p.vengon = false;
p.plrText = "Taste vengeance!";
p.plrTextUpdateRequired = true;
}
if(System.currentTimeMillis() - p.lastEntangle > p.entangleDelay && !splash){
p.lastEntangle = System.currentTimeMillis();
p.entangleDelay = 20000;
p.sM("You have been frozen!");
}
}
} container.stop();
}
}, 1200);
}


this code is incredibly long and inefficient, but w.e

if this gives you errors, go die in a hole, thanks.

Benjiboyyy
July 1st, 2010, 22:30
No posts = leeching...

tyluur
July 2nd, 2010, 17:16
Where do we put this?

Nvm just saw its public void. TY!

Benjiboyyy
July 2nd, 2010, 18:28
Yea, put the method in your client class (client.java)

to have your magic handler execute it,

in MagicHandler add


if (spellID == 12891)
p.multiBarrage((client) PlayerHandler.players[playerIndexToAttack]);

if you already have if (spellID == 12891) then just replace the code with the one in it.

If you haven't done the correct hitupdating, go to player.java and add

protected boolean hitUpdateRequired2 = false;

then under

if (hitUpdateRequired)

add

if (hitUpdateRequired2)
updateMask |= 0x200;

search the if (hitUpdateRequired) again and add under it

if (hitUpdateRequired2)
appendHitUpdate2(str);

then find the method clearUpdateFlags();

and add inside

hitUpdateRequired2 = false;

then find your method
protected void appendHitUpdate2(stream str)

and replace it with this one:


protected void appendHitUpdate2(stream str)
{

if(str != null)
{
str.writeByte(hitDiff2);
if (hitDiff2 > 0) {
str.writeByteS(1); // 0: red hitting - 1: blue hitting
} else if (hitDiff2 > 0) {
str.writeByteS(2); // 0: red hitting - 1: blue hitting
} else if (hitDiff2 <= 0) {
str.writeByteS(0); // 0: red hitting - 1: blue hitting
} else {
str.writeByteS(1);
}
str.writeByte(currentHealth);
str.writeByteC(getLevelForXP(playerXP[3]));
}
}


you might also need this int
protected int hitDiff2 = 0;


if you already have this, then your fine, just execute the multibarrage method in client.java and test it out in a multi area.

andrewert
July 17th, 2010, 21:33
lol so do we need to add all that shit that was on your third post?

Exoath
July 19th, 2010, 17:22
Duh...

Benjiboyyy
July 19th, 2010, 17:25
lol so do we need to add all that shit that was on your third post?

No duh

wassa123
July 21st, 2010, 11:53
i get this when i add it






client.java:136: cannot find symbol
symbol : class Event
location: class client
EventManager.getSingleton().addEvent(new Event() {
^
client.java:136: cannot find symbol
symbol : variable EventManager
location: class client
EventManager.getSingleton().addEvent(new Event() {
^
Note: EconomyReset.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
Press any key to continue . . .

Benjiboyyy
July 23rd, 2010, 18:09
i get this when i add it






client.java:136: cannot find symbol
symbol : class Event
location: class client
EventManager.getSingleton().addEvent(new Event() {
^
client.java:136: cannot find symbol
symbol : variable EventManager
location: class client
EventManager.getSingleton().addEvent(new Event() {
^
Note: EconomyReset.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
Press any key to continue . . .

You don't have Event Manager...

David
July 23rd, 2010, 21:33
You prob didn't made this yourself...

h1 sk1ller
July 24th, 2010, 01:51
Nice If Not Leeched XD

123
July 24th, 2010, 04:53
Can you add some pictures/video?

Benjiboyyy
July 26th, 2010, 19:50
You prob didn't made this yourself...

why, because i have a low post count?

Rofl go check this thread on run3 - s3rv3 r

Partyhat
July 26th, 2010, 19:52
You prob didn't made this yourself...

Who are you to assume that though?
Good job ^^

Benjiboyyy
July 26th, 2010, 19:55
Thanks

Teh Lootz
November 14th, 2010, 04:06
Works perfectly, ty

Redcen1
November 14th, 2010, 04:15
Works perfectly, ty

Don't Gravedig, please.

benjii
November 16th, 2010, 15:17
Wow this is old, i forgot I even had an account on here called benjiboyy, let me log on it

Benjiboyyy
November 16th, 2010, 18:33
Wow this is old, i forgot I even had an account on here called benjiboyy, let me log on it

yay i got on my old acc

The Game
December 13th, 2010, 06:06
You don't have Event Manager...

You fool,it's meant to be eventManager,get it correct and then judge.

iCannon
December 15th, 2010, 02:58
This is the TuT section. If your going to post one, make it really understandable. Not just "If you get errors, go die."
Bitch.. >.>

J i m b o
January 6th, 2011, 21:05
Didn't work.