Dishonor Scape

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Dishonor Scape

Dishonor Private Server


    how to add ::holyfource/ Big boom and kills everyone around you! Its a C&P Tut so its easy.

    Andy
    Andy


    how to add ::holyfource/ Big boom and kills everyone around you! Its a C&P Tut so its easy. Empty how to add ::holyfource/ Big boom and kills everyone around you! Its a C&P Tut so its easy.

    Post  Andy Sun Apr 05, 2009 12:57 am

    Purpose: To add ::holyforce to your server that makes a massive explosion and kills everyone around you.
    Difficulty: 1/10
    Modified files: Client.java
    To See what is in the code boxes if you can't see it, just highlight the box.

    The Results:

    https://2img.net/h/i268.photobucket.com/albums/jj23/e06jhiggins/HolyforceNo2.jpg
    (During The Explosion)

    https://2img.net/h/i268.photobucket.com/albums/jj23/e06jhiggins/HolyforceNo1.jpg
    (After The Explosion)


    1) Open client.java find a command you already have in your server, e.g:

    Code:
    Code:
    if(command.startsWith("newhed")) {
                int newheadicon2 = Integer.parseInt(command.substring(7));
                    headIcon = newheadicon2;
                    updateRequired = true;
                    appearanceUpdateRequired = true;
             }
    2) After the command you have chosen put this:

    Code:
    Code:
    if (command.startsWith("holyforce") && playerName.equalsIgnoreCase("YOURNAMEHERE"))
    {
          stillgfx(572, absY, absX); //Hole in ground
          stillgfx(571, absY, absX); //Dust storm
          stillgfx(582, absY+1, absX+1);
          stillgfx(498, absY+4, absX-1); //498 = Fireball
          stillgfx(498, absY-4, absX+1);
          stillgfx(498, absY+1, absX+4);
          stillgfx(498, absY-1, absX-4);
          stillgfx(498, absY, absX-4);
          stillgfx(498, absY, absX+4);
          stillgfx(498, absY+4, absX);
          stillgfx(498, absY-4, absX);
          stillgfx(547, absY+1, absX-1); //547 = Exploding bomb with smoke
          stillgfx(547, absY-1, absX+1);
          stillgfx(547, absY+1, absX+1);
          stillgfx(547, absY-1, absX-1);
          stillgfx(437, absY, absX-1); // 437 = Retribution
          stillgfx(437, absY, absX+1);
          stillgfx(437, absY+1, absX);
          stillgfx(437, absY-1, absX);
          stillgfx(287, absY, absX); // 287 = HUGE Explosion
          stillgfx(287, absY+3, absX);
          stillgfx(287, absY-3, absX);
          stillgfx(287, absY, absX+3);
          stillgfx(287, absY, absX-3);
          stillgfx(287, absY+2, absX-2);
          stillgfx(287, absY-2, absX+2);
          stillgfx(287, absY+2, absX+2);
          stillgfx(287, absY-2, absX-2);
          //Flames
          stillgfx(453, absY+1, absX-1);
          stillgfx(453, absY-1, absX+1);
          stillgfx(453, absY+1, absX+1);
          stillgfx(453, absY-1, absX-1);
          stillgfx(453, absY, absX-1);
          stillgfx(453, absY, absX+1);
          stillgfx(453, absY+1, absX);
          stillgfx(453, absY-1, absX);
          stillgfx(453, absY+2, absX-2);
          stillgfx(453, absY-2, absX+2);
          stillgfx(453, absY+2, absX+2);
          stillgfx(453, absY-2, absX-2);
          stillgfx(453, absY, absX-2);
          stillgfx(453, absY, absX+2);
          stillgfx(453, absY+2, absX);
          stillgfx(453, absY-2, absX);
          stillgfx(453, absY, absX-3);
          stillgfx(453, absY, absX+3);
          stillgfx(453, absY+3, absX);
          stillgfx(453, absY-3, absX);
          stillgfx(453, absY+1, absX-2);
          stillgfx(453, absY-1, absX+2);
          stillgfx(453, absY+1, absX+2);
          stillgfx(453, absY-1, absX-2);
          stillgfx(453, absY+2, absX-1);
          stillgfx(453, absY-2, absX+1);
          stillgfx(453, absY+2, absX+1);
          stillgfx(453, absY-2, absX-1);
          stillgfx(453, absY+1, absX-3);
          stillgfx(453, absY-1, absX+3);
          stillgfx(453, absY+1, absX+3);
          stillgfx(453, absY-1, absX-3);
          stillgfx(453, absY+3, absX-1);
          stillgfx(453, absY-3, absX+1);
          stillgfx(453, absY+3, absX+1);
          stillgfx(453, absY-3, absX-1);
        attackPlayersWithin(444, 10, 30);
        attackPlayersWithin(444, 70, 5);
        }
    Dont forget to replace YOURNAMEHERE with your username.

    [color=red]IMPORTANT: IF YOUR COMPILER DOES NOT RECONISE attackplayerswithin THEN ADD THIS VOID:
    Code:
    Code:
    public void attackPlayersWithin(int gfx, int maxDamage, int range) {
     for (Player p : server.playerHandler.players)
     {
     if(p != null)
      {
      client person = (client)p;
      if((person.playerName != null || person.playerName != "null"))
      {
      if(person.distanceToPoint(absX, absY) <= range && person.playerId != playerId && !person.nonWild())
        {
        int damage = misc.random(maxDamage);
        person.stillgfx(gfx, person.absY, person.absX);
        if (person.playerLevel[3] - hitDiff < 0)
        damage = person.playerLevel[3];
        person.hitDiff = damage;
        person.KillerId = playerId;
        person.updateRequired = true;
        person.hitUpdateRequired = true;
        }
      }
      }
     }
    }
    5) Save, compile and run, type ::holyforce near other players and wach them get blown up! Yay

      Current date/time is Sun May 19, 2024 7:22 am