Thread: Trap id help

Results 1 to 4 of 4
  1. #1 Trap id help 
    #packeting

    God's Avatar
    Join Date
    Feb 2011
    Posts
    1,007
    Thanks given
    315
    Thanks received
    115
    Rep Power
    181
    Hey, i am currently working on expanding hunter A LOT...

    i now have box traps, implings, snares, butterflies, and dead fall traps working perfectly....


    the only problem is that with the dead fall traps, here is an example:

    OK, you set your dead fall trap. you catch an npc. Someone else comes along, and steals your loot. You then proceed to hang yourself with an Ethernet chord.

    So i need a way to have it recognize that a specific trap belongs to a specific person.....

    any ideas?




    LOL^

    [Today 12:51 AM] Stewie: If at first you don't succeed, you probably just realized you're a woman.

    ...oh stewie
    Reply With Quote  
     

  2. #2  
    #packeting

    God's Avatar
    Join Date
    Feb 2011
    Posts
    1,007
    Thanks given
    315
    Thanks received
    115
    Rep Power
    181
    *bump*




    LOL^

    [Today 12:51 AM] Stewie: If at first you don't succeed, you probably just realized you're a woman.

    ...oh stewie
    Reply With Quote  
     

  3. #3  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Not 100% sure how objects work but can't you make objects only spawn for certain people?

    public void object(int objectId, int objectX, int objectY, int face, int objectType) {
    if(c.getOutStream() != null && c != null) {
    c.getOutStream().createFrame(85);
    c.getOutStream().writeByteC(objectY - (c.getMapRegionY() * 8));
    c.getOutStream().writeByteC(objectX - (c.getMapRegionX() * 8));
    c.getOutStream().createFrame(101);
    c.getOutStream().writeByteC((objectType<<2) + (face&3));
    c.getOutStream().writeByte(0);

    if (objectId != -1) { // removing
    c.getOutStream().createFrame(151);
    c.getOutStream().writeByteS(0);
    c.getOutStream().writeWordBigEndian(objectId);
    c.getOutStream().writeByteS((objectType<<2) + (face&3));
    }
    c.flushOutStream();
    }
    }
    That method only spawns objects for me, no one else can see them. You probs already have it in your client.
    Reply With Quote  
     

  4. #4  
    #packeting

    God's Avatar
    Join Date
    Feb 2011
    Posts
    1,007
    Thanks given
    315
    Thanks received
    115
    Rep Power
    181
    I might do that, i was aware of that... I was thinking that i could make it so that when you set the trap it initialized a trapId variable, then in the actionHandler i would have it check the variable, and if it isnt equal to that variable, it returns the message "This is not your trap!" or somthing like that then when you dismantle or loot the trap it sets the variable back to 0




    LOL^

    [Today 12:51 AM] Stewie: If at first you don't succeed, you probably just realized you're a woman.

    ...oh stewie
    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

Similar Threads

  1. [Help] Removing Box Trap
    By Aconitic in forum Help
    Replies: 1
    Last Post: 06-18-2010, 12:12 AM
  2. Making a Simple Trap system
    By Nour in forum Tutorials
    Replies: 4
    Last Post: 10-16-2007, 10:02 PM
  3. iban trap
    By Crysis in forum Tutorials
    Replies: 3
    Last Post: 09-15-2007, 04:34 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •