Thread: [pi] how the hell do you make portals?!?!

Results 1 to 8 of 8
  1. #1 [pi] how the hell do you make portals?!?! 
    Registered Member AtomicPK's Avatar
    Join Date
    May 2011
    Posts
    60
    Thanks given
    3
    Thanks received
    0
    Rep Power
    1
    IK they are an object, but how do I edit them to make them teleport you to a certain location / only give certain player rights to do it. Thanks (:
    Reply With Quote  
     

  2. #2  
    My TFLOP is better than yours
    Sonic chao's Avatar
    Join Date
    Aug 2011
    Posts
    298
    Thanks given
    51
    Thanks received
    13
    Rep Power
    24
    Easy!

    First, open up Actionhandler.java. Now let's assume your portal is object id... 2474.

    Now, add this:

    Code:
    case 2474:
                     if (c.playerRights >= 1) {
    
                     c.getPA().startTeleport(Xcoords, yCoords, Heightlevel, "modern");
                     } else {
                     c.sendMessage("You aren't allowed to use this portal.");
                     }
    break;
    Now, why 2474? Because that is the object id.

    if (c.playerRights >= 1) means that if a user with player rights 1 or higher clicks on this object, it will do something.

    Easy. Remember to edit, "Xcoords", "yCoords" and "HeightLevel" with real numbers.

    Now, you're probably wondering where the heck am i adding this? Search for, case 1765, and add the code under there.
    Reply With Quote  
     

  3. #3  
    Registered Member AtomicPK's Avatar
    Join Date
    May 2011
    Posts
    60
    Thanks given
    3
    Thanks received
    0
    Rep Power
    1
    +karma
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2011
    Posts
    476
    Thanks given
    57
    Thanks received
    43
    Rep Power
    17
    To spawn custom objects go to your objectmanager.class and search for public void loadCustomSpawns(Client c) {
    Reply With Quote  
     

  5. #5  
    Registered Member AtomicPK's Avatar
    Join Date
    May 2011
    Posts
    60
    Thanks given
    3
    Thanks received
    0
    Rep Power
    1
    [spoil]

    Quote Originally Posted by Sonic chao View Post
    Easy!

    First, open up Actionhandler.java. Now let's assume your portal is object id... 2474.

    Now, add this:

    Code:
    case 2474:
                     if (c.playerRights >= 1) {
    
                     c.getPA().startTeleport(Xcoords, yCoords, Heightlevel, "modern");
                     } else {
                     c.sendMessage("You aren't allowed to use this portal.");
                     }
    break;
    Now, why 2474? Because that is the object id.

    if (c.playerRights >= 1) means that if a user with player rights 1 or higher clicks on this object, it will do something.

    Easy. Remember to edit, "Xcoords", "yCoords" and "HeightLevel" with real numbers.

    Now, you're probably wondering where the heck am i adding this? Search for, case 1765, and add the code under there.
    [/spoil]

    Now how do I make it send a message? or edit the examine so it tells you where you are going. (Send a message like YOU MUST BE A DONATOR TO USE THIS PORTAL!)
    Reply With Quote  
     

  6. #6  
    My TFLOP is better than yours
    Sonic chao's Avatar
    Join Date
    Aug 2011
    Posts
    298
    Thanks given
    51
    Thanks received
    13
    Rep Power
    24
    I don't know about the examine one, but if you want players that aren't donator or staff to receive a message when clicking on the portal, do:

    Code:
    c.sendMessage("YOU MUST BE A DONATOR");
    Reply With Quote  
     

  7. #7  
    Registered Member AtomicPK's Avatar
    Join Date
    May 2011
    Posts
    60
    Thanks given
    3
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Sonic chao View Post
    I don't know about the examine one, but if you want players that aren't donator or staff to receive a message when clicking on the portal, do:

    Code:
    c.sendMessage("YOU MUST BE A DONATOR");

    Now why tanks you (:!
    Reply With Quote  
     

  8. #8  
    ~! Legit ~!

    Join Date
    Nov 2010
    Posts
    1,973
    Thanks given
    183
    Thanks received
    211
    Rep Power
    237
    Code:
    case 2474:
                     if (c.playerRights >= 4) {
    
                     c.getPA().startTeleport(Xcoords, yCoords, Heightlevel, "modern");
                      c.sendMessage("You teleport PLACENAME");
                     } else {
                     c.sendMessage("You must be a donator to use this.");
                     }
    break;
    change case to your object ID, like said above and the coords to the coords you want.
    [email protected]
    Spoiler for My Vouches:
    Quote Originally Posted by mattsforeal View Post
    I paid $5 went first, he fixed my problem and it worked. 100% legit would do it again.
    Quote Originally Posted by Mythic View Post
    Vouch for him, very smooth and fast trade, purchased his last 4m. Have fun with your new membership
    Quote Originally Posted by Harlan View Post
    Vouch, trustworthy guy.
    Quote Originally Posted by iPhisher™ View Post
    Vouch for Super-Man, he is a very legit and trustable guy.
    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: 16
    Last Post: 09-13-2014, 10:57 PM
  2. Replies: 6
    Last Post: 08-08-2011, 11:25 AM
  3. [Emulous] How to make portals teleport
    By 742fool in forum Help
    Replies: 5
    Last Post: 08-13-2009, 05:21 AM
  4. Replies: 1
    Last Post: 04-18-2009, 02:42 PM
  5. How To add portals and make them teleport you somewhere
    By Mr. Gangster in forum Tutorials
    Replies: 7
    Last Post: 04-07-2008, 05:37 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
  •