Thread: Making Only the wild a pking zone(also another glitch fix)

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Making Only the wild a pking zone(also another glitch fix) 
    Registered Member
    hoodlom's Avatar
    Join Date
    Dec 2007
    Age
    29
    Posts
    750
    Thanks given
    0
    Thanks received
    6
    Rep Power
    170
    purpose: to make all zones nonwild, besides the actuel wild. And a fix for wild.
    difficulty: 1/10
    classes modified: client.java
    ------------------------------------------------------------
    making only the wild a PvP place
    search for
    Code:
    public boolean nonwild
    and replace your's with mine.
    Code:
    public boolean nonWild() {
    if((absX <= 2943) || (absX >= 3365) || (absY <= 3519) || (absY >= 4000) ||
    
    heightLevel > 0)
    return true;
    else
    return false;
    }
    this makes everyplace but the wild a safezone.
    ---------------------------------------------------------------
    fix for wilderness levels
    search for

    Code:
    sendQuest("Level: "+WildyLevel, 199);
    replace that with

    Code:
    if(nonWild())
    {
    sendQuest("@gre@SafeZone", 199);
    		}
    if(!nonWild()) {
    sendQuest("Level: "+WildyLevel, 199);
    }
    Now, for making the wild levels only come in use if you are in the wild(if you dont have wild levels, this will add them)

    search for:
    Code:
    case 73:
    scroll down until you see

    Code:
    if(!CheckWildRange(plz.combat)){
    IsAttacking = false;
    teleportToX = absX;
    teleportToY = absY;
    sendMessage("Your level differance is too great!");
    sendMessage("You need to move further into the Wilderness.");
    ResetAttack();
    }else{
    }
    or something similar to that.
    replace it with(note:if you dont have wild levels and you want them, add this)

    Code:
    if(!CheckWildRange(plz.combat) && !nonWild()){
    IsAttacking = false;
    teleportToX = absX;
    teleportToY = absY;
    sendMessage("Your level differance is too great!");
    sendMessage("You need to move further into the Wilderness.");
    ResetAttack();
    }else{
    }
    next, search for
    Code:
    case 249:
    scroll down until you see
    Code:
    if(!CheckWildRange(pl2.combat)){
    sendMessage("Your level differance is too great!");
    sendMessage("You need to move further into the Wilderness.");
    ResetAttack();
    }else
    or something similar(again, if you dont have wild levels and want them, add this)

    replace that with
    Code:
    if(!CheckWildRange(pl2.combat) && !nonWild()){
    sendMessage("Your level differance is too great!");
    sendMessage("You need to move further into the Wilderness.");
    ResetAttack();
    }else
    also, if you wanted wild levels, add this boolean
    Code:
    public boolean CheckWildRange(int pcombat)
    {
    if(((combat + WildyLevel >= pcombat) && (pcombat >= combat)) || ((combat - WildyLevel <= pcombat) && (pcombat <= combat)))
    {
    return true;
    }
    else
    {
    return false;
    }
    }
    save, close, compile.
    You now have only wild a PvP zone, it only says "level: blah" if you are in the wild, else it will say "safezone" and if you did not have it, you now have wilderness levels(ex. You are level 100 and a lvl 126 tries to attack you and you are in level 20 wild he cant until you are in 26 wild)

    enjoy




    ~hood
    Reply With Quote  
     

  2. #2  
    Registered Member pHametic's Avatar
    Join Date
    Nov 2006
    Posts
    637
    Thanks given
    3
    Thanks received
    1
    Rep Power
    11
    ahhh! nice thnxs for this!
    Reply With Quote  
     

  3. #3  
    Rukin1


    Rukin1's Avatar
    Join Date
    Apr 2007
    Age
    31
    Posts
    5,000
    Thanks given
    228
    Thanks received
    229
    Rep Power
    4166
    thanks alot for this Some coders don't ever fail
    Spoiler for large sig:


    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jan 2008
    Posts
    965
    Thanks given
    2
    Thanks received
    17
    Rep Power
    0
    very nice, Thanks.. you helped me on the SafeZone thingy (then its not showing level: -3 or something like this )
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2008
    Posts
    68
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I got some errors.. Most of them I fixed myself, but these I can't do anything about. I might have put them in the wrong spot? =\

    Code:
    public boolean CheckWildRange(int pcombat)
    {
    if(((combat + WildyLevel >= pcombat) && (pcombat >= combat)) || ((combat - WildyLevel <= pcombat) && (pcombat <= combat)))
    {
    return true;
    }
    else
    {
    return false;
    }
    }
    Thank You in advance,

    - Owner Zerk -
    Last edited by Owner Zerk; 04-02-2008 at 05:51 AM. Reason: Forgot something
    Owner & Coder of ZerkScape V2.0
    Forums:http://zerkscape.co.nr
    ||||||||||

    Reply With Quote  
     

  6. #6  
    Registered Member
    Anton's Avatar
    Join Date
    Jan 2008
    Posts
    1,197
    Thanks given
    0
    Thanks received
    5
    Rep Power
    249
    It doesn't matter, it's a PUBLIC boolean, u can put it just above/under another public boolean
    Nice tut hood! but i get 3 errors..

    Code:
    client.java:17127: cannot find symbol
    symbol  : variable plz
    location: class client
    if(!CheckWildRange(plz.combat) && !nonWild() && !cwars()){
                       ^
    client.java:17127: cannot find symbol
    symbol  : method cwars()
    location: class client
    if(!CheckWildRange(plz.combat) && !nonWild() && !cwars()){
                                                     ^
    client.java:17510: cannot find symbol
    symbol  : method cwars()
    location: class client
    if(!CheckWildRange(pl2.combat) && !cwars() && !nonWild()){
                                       ^
    Note: stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    3 errors
    Reply With Quote  
     

  7. #7  
    code 4 fun
    Guest
    Thanks for this now my Lvl 53 wild is not a sfe zone now
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Mar 2008
    Posts
    68
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    New errors ftl.. =\

    Code:
    client.java:21868: 'void' type not allowed here
                    if(!CheckWildrange(plz.combat) && !nonWild()){
                                      ^
    client.java:22362: 'void' type not allowed here
    if(!CheckWildrange(pl2.combat) && !nonWild()){
                      ^
    Note: stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    2 errors
    Press any key to continue . . .
    Thanks =\

    EDIT: Didn't want to keep making new posts so..

    Every time an error gets fixed, a new one comes up.. I'm pretty sure this is the last of them.

    Code:
    client.java:17372: code too large
            public void ParseIncomingPackets() {
                        ^
    Note: stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    1 error
    Press any key to continue . . .
    Last edited by Owner Zerk; 04-02-2008 at 10:31 PM. Reason: Adding
    Owner & Coder of ZerkScape V2.0
    Forums:http://zerkscape.co.nr
    ||||||||||

    Reply With Quote  
     

  9. #9  
    Registered Member
    fabjan's Avatar
    Join Date
    Jul 2007
    Age
    30
    Posts
    552
    Thanks given
    0
    Thanks received
    0
    Rep Power
    101
    doing:
    Code:
    heightLevel > 0)
    would be much more effective then
    Code:
    heightLevel == 1)
    Please vote:

    btb.servegame.com:
    Reply With Quote  
     

  10. #10  
    Registered Member
    hoodlom's Avatar
    Join Date
    Dec 2007
    Age
    29
    Posts
    750
    Thanks given
    0
    Thanks received
    6
    Rep Power
    170
    kk, i use that fabjan
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •