Thread: Creating a teleport..HELP!

Results 1 to 10 of 10
  1. #1 Creating a teleport..HELP! 
    Registered Member
    Join Date
    Jan 2012
    Posts
    161
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Hello Everyone!

    I need help with creating a teleport trough clicking on a object.
    In this case "Holy barrier" to staffzone.. Object Id 3443 (unneeded i guess)

    I would really need help with this!

    Thanks!

    Over and out, Andrezz.
    Reply With Quote  
     

  2. #2  
    Ain't Messin' Around - Gary Clark Jr.

    Wolfs Darker's Avatar
    Join Date
    Jul 2012
    Posts
    1,530
    Thanks given
    598
    Thanks received
    464
    Rep Power
    252
    ermm use this:

    Spoiler for code:

    Code:
    case 3443:
    		if (c.inWild()) 
    			return;
    		if (c.playerRights < 1)
    			return;
    			c.getPA().startTeleport(XXXX, YYYY, 0, "modern");	
    			c.sendMessage("Welcome to @gre@Staff Zone@bla@.");
    		}
    	}
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2012
    Posts
    148
    Thanks given
    26
    Thanks received
    14
    Rep Power
    11
    Take the tele tabs for example and replace the ids in the case.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jan 2012
    Posts
    161
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    But I need for an object that is placed on the ground..
    Reply With Quote  
     

  5. #5  
    Kneel before me.

    Join Date
    Sep 2012
    Posts
    200
    Thanks given
    202
    Thanks received
    91
    Rep Power
    125
    ActionHandler.java
    Code:
    FirstClickObject
    Code:
    case 3443: 
    c.getPA().startTeleport(XXXX, YYYY, H, "modern"); 
    c.sendMessage("You teleport to the staffzone."); 
    break;
    to place the object go to
    Code:
    objectmanager.java
    and go to
    Code:
    loadcustomspawns
    and spawn your own object in this case object 3343 and done.
    Reply With Quote  
     

  6. #6  
    Krator || Indie Dev

    Jordan Belfort's Avatar
    Join Date
    Dec 2012
    Posts
    1,051
    Thanks given
    535
    Thanks received
    485
    Rep Power
    1172
    Quote Originally Posted by Awviks View Post
    ActionHandler.java
    Code:
    FirstClickObject
    Code:
    case 3443: 
    c.getPA().startTeleport(XXXX, YYYY, H, "modern"); 
    c.sendMessage("You teleport to the staffzone."); 
    break;
    to place the object go to
    Code:
    objectmanager.java
    and go to
    Code:
    loadcustomspawns
    and spawn your own object in this case object 3343 and done.
    This, and don't forget in objectmanager.java, the format would look something like this;

    Code:
    c.getPA().checkObjectSpawn(3443,X, Y, 1, 10); //coal
    ^ Keep in mind that's where you want the object, not where you teleport to.

    If you need any further help PM me.
    Reply With Quote  
     

  7. #7  
    Ain't Messin' Around - Gary Clark Jr.

    Wolfs Darker's Avatar
    Join Date
    Jul 2012
    Posts
    1,530
    Thanks given
    598
    Thanks received
    464
    Rep Power
    252
    Quote Originally Posted by Awviks View Post
    ActionHandler.java
    Code:
    FirstClickObject
    Code:
    case 3443: 
    c.getPA().startTeleport(XXXX, YYYY, H, "modern"); 
    c.sendMessage("You teleport to the staffzone."); 
    break;
    to place the object go to
    Code:
    objectmanager.java
    and go to
    Code:
    loadcustomspawns
    and spawn your own object in this case object 3343 and done.
    it is wrong, if he just add the object to the ground and add this on action handler, every player will be able to teleport, it should be somethng like this:

    Code:
    case 3443: 
    if (c.playerRights < 1)
    return;
    c.getPA().startTeleport(XXXX, YYYY, H, "modern"); 
    c.sendMessage("You teleport to the staffzone."); 
    break;
    Attached image
    Reply With Quote  
     

  8. #8  
    Kneel before me.

    Join Date
    Sep 2012
    Posts
    200
    Thanks given
    202
    Thanks received
    91
    Rep Power
    125
    Quote Originally Posted by wolfs darker View Post
    it is wrong, if he just add the object to the ground and add this on action handler, every player will be able to teleport, it should be somethng like this:

    Code:
    case 3443: 
    if (c.playerRights < 1)
    return;
    c.getPA().startTeleport(XXXX, YYYY, H, "modern"); 
    c.sendMessage("You teleport to the staffzone."); 
    break;
    both are right lol.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Jokerrr's Avatar
    Join Date
    Jun 2012
    Posts
    468
    Thanks given
    56
    Thanks received
    52
    Rep Power
    108
    If you just want staff you do this:

    case 3443:
    if (c.playerRights >= 1)
    c.getPA().startTeleport(XXXX, YYYY, H, "modern");
    c.sendMessage("You teleport to the staffzone.");
    } else {
    c.sendMessage("You must be a member of staff to teleport to the staffzone.");
    break;
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Nov 2012
    Posts
    171
    Thanks given
    2
    Thanks received
    4
    Rep Power
    0
    .....................................
    New project I've been working on, Bettss ,
    Spoiler for BIG PICTURES :



    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. Replies: 1
    Last Post: 01-03-2013, 08:00 PM
  2. [PI] Adding a teleport and let it teleport
    By owner iwan in forum Help
    Replies: 6
    Last Post: 01-19-2011, 05:37 PM
  3. Creating a UID
    By CrazyPanda in forum Help
    Replies: 4
    Last Post: 10-26-2009, 12:33 AM
  4. Replies: 8
    Last Post: 08-01-2008, 09:08 AM
  5. Replies: 5
    Last Post: 03-22-2008, 04:55 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •