Thread: Making a Simple Trap system

Results 1 to 5 of 5
  1. #1 Making a Simple Trap system 
    Member
    Nour's Avatar
    Join Date
    May 2007
    Posts
    472
    Thanks given
    127
    Thanks received
    61
    Rep Power
    569
    Sadly this doesn't have the red splotch with the hitpoints but try it anyways

    First add this boolean to client.java
    Code:
    public boolean Traps(int anim, int hitpower) {
    if(misc.random(10) <= 5) {          
    staticAnimation(anim, absX, absY, 0);
    hitDiff = misc.random(hitpower);
    dmg = hitDiff;
    updateRequired = true;
    hitUpdateRequired = true;
    sendMessage("You've Activated a TRAP you lost "+dmg+" Hitpoints!");
    return true;
    }
    return false;
    }
    Heres how to implant it into an object

    use this example case's format
    Code:
    case test:
    Traps(GraphicIDhere, MAXhithere);
    if(Traps == false) {
    //add what you want to do if a trap isn't triggered
    }
    break;
    RIP Emps-scape 2006-2013.
    [SPOIL]
    [/SPOIL]

    i need 2 herd sum bots
    i need 2 steal sum zombies
    i need 2 open many slots
    to hold my ****in zombies
     

  2. #2  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,871
    Thanks given
    1,854
    Thanks received
    4,745
    Rep Power
    5000
    This will help if you like want to a maze with traps (Rogues den is one )
    Good tut! I like it
     

  3. #3  
    ~Legend Rene
    Guest
    To show the red hitball you could make the client call the method from player.java
     

  4. #4  
    Registered Member
    fabjan's Avatar
    Join Date
    Jul 2007
    Age
    30
    Posts
    552
    Thanks given
    0
    Thanks received
    0
    Rep Power
    101
    nice one
    i used a code similar to this one to create trapwires in isafdar
    works nice
    alot of ppl will apreciate this
    thanks for posting and euhm
    ok ok rep for u

    Quote Originally Posted by ~Legend Rene View Post
    To show the red hitball you could make the client call the method from player.java
    yer he's rite
    should change to playerhandler.hitupdaterequired = true; (can have some spell faults)
    Last edited by fabjan; 10-16-2007 at 06:04 PM. Reason: Double posting is not allowed!
    Please vote:

    btb.servegame.com:
     

  5. #5  
    JavaNerd
    Guest
    Nice this is awsome! Thank you for posting
     


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
  •