Thread: Godwars Kill count interface

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Godwars Kill count interface 
    Member
    Join Date
    Oct 2008
    Posts
    744
    Thanks given
    2
    Thanks received
    6
    Rep Power
    0
    Hey i just finished adding basically full godwars with all the correct NPC's and Kill counter. But how do i make it so when i teleport out with a command that the kill count interface (601) goes away.

    Thanks
    Reply With Quote  
     

  2. #2  
    Registered Member hybrent's Avatar
    Join Date
    Nov 2007
    Posts
    566
    Thanks given
    73
    Thanks received
    90
    Rep Power
    28
    Add in your teleport method:

    player.getActionSender().sendCloseInterface();

    And your done. (if you dont know where your teleport method is, try adding it to your "tele" command just for testing purposes.)

    Also, if you don't have sendCloseInterface() in actionSender, look for something similar.

    (if it's pali change to .frames.sendCloseInterface()

    Hope I helped

    EDIT: I read your thread in the request section, and you can't have 2 interfaces open at one time, I'm pretty sure. If you say opened your bank while in godwars, it would close the killCount, and you would have to add the sendInterface(601) when you close the bank.

    Not 100% sure on that ^, but I always thought that was true..lol
    Amused as I am not, I must continue to try. -Keith Charles
    Quote Originally Posted by Ayton View Post
    I'm sorry, but I have to agree with Hybrent.
    Reply With Quote  
     

  3. #3  
    Member
    Join Date
    Oct 2008
    Posts
    744
    Thanks given
    2
    Thanks received
    6
    Rep Power
    0
    That just removes the interfaces though right? that would cause it so if im in pvp and i tele to another pvp area all the interfaces are removed. I just want to make it so if i teleport out of godwars it just removes the kill count.
    Reply With Quote  
     

  4. #4  
    Registered Member hybrent's Avatar
    Join Date
    Nov 2007
    Posts
    566
    Thanks given
    73
    Thanks received
    90
    Rep Power
    28
    Yeah...You have to either

    1.edit your revomeInterface method

    2.Add a region so that you can do:

    Code:
    if (isInGW) {
    Player.getActionSender().removeInterface();
    }
    To your tele command.
    Amused as I am not, I must continue to try. -Keith Charles
    Quote Originally Posted by Ayton View Post
    I'm sorry, but I have to agree with Hybrent.
    Reply With Quote  
     

  5. #5  
    Registered Member
    harraj128's Avatar
    Join Date
    Nov 2008
    Posts
    1,153
    Thanks given
    1
    Thanks received
    10
    Rep Power
    382
    Why dont you make the interface show in a certain set of co-ords?
    such as public boolean godwars x = *** y = *****
    Then like if player in godwars show interface etc...

    DAmm hybrent beat me to it
    Reply With Quote  
     

  6. #6  
    Member
    Join Date
    Oct 2008
    Posts
    744
    Thanks given
    2
    Thanks received
    6
    Rep Power
    0
    Well i already have godwars in specific coords:

    Code:
        public boolean godWarsDung() {
    	return absX >= 2819 && absX <= 2946 && absY >= 5254 && absY <= 5362;
        }
    So if i just added this:

    Code:
    if (!godWarsDung()) {
    Player.getActionSender().removeInterface();
    }
    It should work? Wouldn't that remove all interfaces?
    Reply With Quote  
     

  7. #7  
    Registered Member hybrent's Avatar
    Join Date
    Nov 2007
    Posts
    566
    Thanks given
    73
    Thanks received
    90
    Rep Power
    28
    Like
    if (godWarsDung()) {
    player.getActionSender().sendInterface(601);
    } else {
    player.getActionSender().removeInterface();
    }

    Try that.. in your tele command.

    Tell me what it does lol.
    Amused as I am not, I must continue to try. -Keith Charles
    Quote Originally Posted by Ayton View Post
    I'm sorry, but I have to agree with Hybrent.
    Reply With Quote  
     

  8. #8  
    Member
    Join Date
    Oct 2008
    Posts
    744
    Thanks given
    2
    Thanks received
    6
    Rep Power
    0
    No that doesnt do anything. That just makes the interface appear when teleing to godwars and once i tele away its still there unless i tele back to godwars. Thanks for the help though. Any other ideas?
    Reply With Quote  
     

  9. #9  
    Registered Member hybrent's Avatar
    Join Date
    Nov 2007
    Posts
    566
    Thanks given
    73
    Thanks received
    90
    Rep Power
    28
    Quote Originally Posted by Demon View Post
    No that doesnt do anything. That just makes the interface appear when teleing to godwars and once i tele away its still there unless i tele back to godwars. Thanks for the help though. Any other ideas?
    Okay then..It would be easier if I was testing this but I'll keep trying lol.

    Anyways, you probably want to keep the:
    if (godWarsDung) {
    player.getActionSender().sendInterface(601);
    }

    Just to keep it realistic, but we need it to go away when not in the dungeon...

    So, in your tele command lets try:

    if (!godWarsDung) {
    player.getActionSender().sendCloseInterface(548, 5);
    }


    And actually, now that I think of it, you may want to switch those around...

    Because if your adding it in your tele method, you want it to be if your in godwars and then use tele, then it closes it.

    So try it both ways.

    Like:
    if (!godWarsDung) {
    player.getActionSender().sendInterface(601);
    }
    and vice versa.
    Amused as I am not, I must continue to try. -Keith Charles
    Quote Originally Posted by Ayton View Post
    I'm sorry, but I have to agree with Hybrent.
    Reply With Quote  
     

  10. #10  
    Member
    Join Date
    Oct 2008
    Posts
    744
    Thanks given
    2
    Thanks received
    6
    Rep Power
    0
    Ok so i need to add it to every teleport command? =( Well if thats true then i guess i wont do it. I'm thinking now just not allowing anyone to teleport out of godwars and making them use the rope to get out which i can easily make remove the interface. But to do this what should i add to my teleport method?

    I was thinking something like this: ?
    Code:
    	if (godWarsDung()) {
                getActionSender().sendMessage(this, "You Cannot Teleport in Godwars, Use the Rope to Get out!");
                return;
    	}
    EDIT: That Worked ^

    How can i make it so you cannot logout in godwars?

    I tried something like:
    Code:
    		if (p.godWarsDung()) {
    			p.getActionSender().sendMessage(p, "You Cannot Logout While in GodWars!");
    		}
    under case 182: in actionbuttons but that doesnt work.

    Also i figured out how to make it be able to tele and remove interfaces without adding to every command. But idk which i should have. Do you think not being able to teleport in godwars is better then being able to?


    EDIT: Figured out how to not allow logout in godwars. But what should i do, Make it so you should be able to tele in godwars or make it so you cannot?
    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
  •