Author Topic: [PI] Good ::yell command  (Read 1461 times)

Offline robgob

  • Adamant Member
  • *
  • Posts: 120
  • Rep 5
  • I swarm like locust
  • Location: Michigan
    • View Profile
Re: [PI] Good ::yell command
« Reply #15 on: March 11, 2011, 06:20:26 pm »
what did you do?

Offline brandon

  • Veteran
  • Dragon Member
  • *
  • Posts: 240
  • Rep 12
    • View Profile
Re: [PI] Good ::yell command
« Reply #16 on: March 11, 2011, 06:35:16 pm »
what did you do?

Go to ItemAssist.java and search.
Quote
case 4153: // gmaul

Change it to this.
Code: [Select]
case 4153: // gmaul
case 13902:
c.getPA().sendFrame171(0, 7474);
specialAmount(weapon, c.specAmount, 7486);
break;

Then go to ClickingButtons.java and search.
Quote
case 29038:

Change it to this.
Code: [Select]
case 29038:
c.specBarId = 7486;
c.usingSpecial = !c.usingSpecial;
c.getItems().updateSpecialBar();
break;

That should do it. If not just say something and here is the special for it.

Client sided. Go to Animation.java and add.
Code: [Select]
if(j == 6505) {
int file = 500;
if(FrameStart[file] < 1)
Class36.methodCustomAnimations(false, file);
int[] frames = {92,20,81,21,30,25,65,70,87,120,53,75,7,24,161,133,37,143,50,119,92,0};
int[] delays = {3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,3,3,3,3,0};
anims[j].anInt352 = frames.length-1;
anims[j].anIntArray353 = new int[frames.length-1];
anims[j].anIntArray354 = new int[frames.length-1];
anims[j].anIntArray355 = new int[frames.length-1];
for(int i2 = 0; i2 < frames.length-1; i2++) {
anims[j].anIntArray353[i2] = frames[i2]+FrameStart[file];
anims[j].anIntArray354[i2] = -1;
anims[j].anIntArray355[i2] = delays[i2];
}
}

Then add this Animation to your Cache/Data/ Folder. http://www.mediafire.com/?e0ck6uw5o9p26j4

That should do it, then just go to CombatAssist.java and search.
Quote
case 13902:

And change the Statius's Warhammer special to 6505.

That should be it. Any issue's just ask.


Offline Scar

  • Steel Member
  • *
  • Posts: 34
  • Rep 1
    • View Profile
Re: [PI] Good ::yell command
« Reply #17 on: March 12, 2011, 04:04:39 am »
I dont like the way this is done :x but nice

here i made this cleaner for you :)
Code: [Select]
if (playerCommand.startsWith("yell")) {
String rank = "[@mag@Player@bla@]";
String Message = playerCommand.substring(4);
switch(c.playerRights) {
case 0:
rank = (c.isDonator >= 0 ? "[@gre@Donator@bla@]" : "[@mag@Player@bla@]");
break;
case 1:
rank = "[@blu@Mod@bla@]";
break;
case 2:
rank = "[@yel@Admin@bla@]";
break;
case 3:
rank = "[@red@Owner@bla@]";
break;
}
if(c.playerName.equals("brandon"))
rank = "[@red@Developer@bla@]["+ c.playerName +"]:";

for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
c2.sendMessage(rank + "[" + c.playerName + "]: " + Message);
}
}
}
It's good to know some people know how to use cases. :hurr:
Good job, yet it's common sense.
Some people don't even know what's cases.
You might wanna include
case 4:
which is hidden moderator
case 20:
which is hidden owner
That's just to make it fancy. :tf:

Offline brandon

  • Veteran
  • Dragon Member
  • *
  • Posts: 240
  • Rep 12
    • View Profile
Re: [PI] Good ::yell command
« Reply #18 on: March 12, 2011, 11:49:51 am »
I don't ever use cases, it makes me do more work. Which teaches me more, drills it in my head. Plus when I have to give stuff, like snippets, tutorials, or teach them how to do something I like to teach them to go the long way so they learn to code in the first place. But yes cases are very useful.

Offline Alex_Kilroy

  • Adamant Member
  • *
  • Posts: 91
  • Rep 2
  • Java programmer
  • Location: United Kingdom, England.
    • View Profile
Re: [PI] Good ::yell command
« Reply #19 on: March 14, 2011, 07:02:17 pm »
Go to Commands.java and replace this with your old yell command.
Code: [Select]
if (playerCommand.startsWith("yell")) {
String rank = "";
String Message = playerCommand.substring(4);
if (c.playerRights >= 0 && c.isDonator >= 0) {
rank = "[@mag@Player@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 0 && c.isDonator >= 1) {
rank = "[@gre@Donator@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 1) {
rank = "[@blu@Mod@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 2) {
rank = "[@yel@Admin@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 3) {
rank = "[@red@Owner@bla@]["+ Misc.ucFirst(c.playerName) +"]:";
}
if (c.playerName.equalsIgnoreCase("brandon")) {
rank = "[@red@Developer@bla@]["+ c.playerName +"]:";
}             
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
c2.sendMessage(rank+Message);
}
}
}

Save, close, compile, done. Any questions ask.

Basics and theres no need to set the string equal to nothing.
I'm a MEXICAN
#facepalm
My various other names are, Byte3, Kaex and Limbo.
I am now known as Alex_Kilroy.

Offline Tampon Abuse

  • Dragon Member
  • *
  • Posts: 193
  • Rep 1
  • All vote for Rune-Kingdom!
  • Location: Oklahoma, Oklahoma City
    • View Profile
Re: [PI] Good ::yell command
« Reply #20 on: April 03, 2011, 08:58:55 pm »
i got 2 errors
Code: [Select]
if (playerCommand.startsWith("yell")) {
String rank = "";
String Message = playerCommand.substring(4);
if (c.playerRights >= 0 && c.isDonator >= 0) {
rank = "[@mag@Player@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 0 && c.isDonator >= 1) {
rank = "[@gre@Donator@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 1) {
rank = "[@blu@Mod@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 2) {
rank = "[@yel@Admin@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 3) {
rank = "[@red@Owner@bla@]["+ Misc.ucFirst(c.playerName) +"]:";
}
if (c.playerName.equalsIgnoreCase("brandon")) {
rank = "[@red@Developer@bla@]["+ c.playerName +"]:";
}             
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
c2.sendMessage(rank+Message);
}
}
}

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

Offline Cinodor

  • I'm Awesome
  • Veteran
  • Pernix Member
  • *
  • Posts: 494
  • Rep 15
  • I Do Graphics To.
  • Location: GMT -6 (Oklahoma)
    • View Profile
Re: [PI] Good ::yell command
« Reply #21 on: April 04, 2011, 12:33:19 am »
Last post besides yours was like half a month ago, quit bringing back dead topics. I think Brandon Quit, because he was a poor moderator. Locked.
Signature Loading.. Please Wait..