Thread: Attack Players In Certain Place

Results 1 to 4 of 4
  1. #1 Attack Players In Certain Place 
    Registered Member
    Join Date
    Sep 2008
    Age
    32
    Posts
    82
    Thanks given
    0
    Thanks received
    0
    Rep Power
    40
    Ok, well I am making a fun pk type of area in my server. How can i make it so that if "isInFunpk" you can attack others? Right now when you go to attack someone in the area you get the message "This player is not in the wilderness!" Also one of the players gets skulled. If someone can help me get it so you can attack if isInFunpk and help me get no skull to show up when you attack there i'll rep++ I hope that is clear enough.

    Thanks.

    ~Comedy
    Reply With Quote  
     

  2. #2  
    Registered Member
    Deadly Uzi's Avatar
    Join Date
    Jul 2008
    Posts
    994
    Thanks given
    177
    Thanks received
    87
    Rep Power
    362
    Just add the fun PK coordinates in the inWild boolean.
    Attempting to develop a multi-revision library. See it on GitHub.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2008
    Age
    32
    Posts
    82
    Thanks given
    0
    Thanks received
    0
    Rep Power
    40
    Thanks it worked, I still need to know how to make it so that the person does not get skulled if in that area.

    ~Comedy
    Reply With Quote  
     

  4. #4  
    Registered Member
    Deadly Uzi's Avatar
    Join Date
    Jul 2008
    Posts
    994
    Thanks given
    177
    Thanks received
    87
    Rep Power
    362
    Oh, then you would want to create a new boolean with coordinates.

    So like

    isInFunPK() {
    if(getX() = ###, etc....
    return true;

    Then find the method in which it makes it so you can ONLY attack in the wilderness. So like

    if(inWild) {
    showPlayerCommand("Attack") sort of thing.

    Change the inWild to inWild || isInFunPK so it will check whether you are in the wilderness OR in fun PK. Then in the method in which it skulls you just add a boolean.

    if(inWild && firstAttacker) {
    skullTimer = 10;

    The boolean with check if you are in the wilderness. Since you are in FUNPK, it won't skull you. Lol this was really messy but I hope it helps
    Attempting to develop a multi-revision library. See it on GitHub.
    Reply With Quote  
     


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
  •