Making teleing easier due removing portals and adding new interfaces.
-Note: * means you need to add it there if you have a ZDR Server
[Only registered and activated users can see links. Click Here To Register...]
Description: What we will do here? We will make a new interface where we can place 5 teles on instead of portals. Portals only cause lagg. If u have the interface u can remove 5 portals so it's less lagg.
Difficulty: 2/10
Assumed Knowledge: Some copying and pasting.
Tested Server: Zdiddy
Files/Classes Modified: Client.java,(Buttons.java*),(Sendquest.java*) < * only for ZDR!
Picture is at the end of the tutorial
Procedure
Step 1: First we're going to add the portal. This will be the portal when you click on it you get the interface. You can replace an portal too. Go to case 185 at client.java (*or to Buttons.java and add before every sendquest and setsidebar a c.) Look for picture for more information of teles.
Code:
case ####:// PORTAL ID
setSidebarInterface(3, 3209);
sendQuest("Your 1th Tele here", 15240);// Tele 1
sendQuest("Your 2nd Tele here", 15241);// Tele 2
sendQuest("Your 3th Tele here", 15239);// Tele 3
sendQuest("Your 4th Tele here", 15243);// Tele 4
sendQuest("Your 5th Tele here", 15242);// Tele 5
break;
Now we've setten that it changes the interface and the SendQuests so the players can see where they tele to.
Step 2: Omg! If they click on something they don't tele? Yes that's good we need to make it now. Again go to case 185. If you want to know what tele's look at the end of the message for a picture.(* look above .. its the same but now with tele and sendmessage, interface)
Code:
case 59136: //Tele 1
teleportToX = ####; //Coord X here
teleportToY = ####; //Coord Y Here
sendMessage("Your message when you tele");
setSidebarInterface(3, 3213);
break;
case 59137: //Tele 2
teleportToX = ####; //Coord X here
teleportToY = ####; //Coord Y Here
sendMessage("Your message when you tele");
setSidebarInterface(3, 3213);
break;
case 59135: //Tele 3
teleportToX = ####; //Coord X here
teleportToY = ####; //Coord Y Here
sendMessage("Your message when you tele");
setSidebarInterface(3, 3213);
break;
case 59139: //Tele 4
teleportToX = ####; //Coord X here
teleportToY = ####; //Coord Y Here
sendMessage("Your message when you tele");
setSidebarInterface(3, 3213);
break;
case 59138: //Tele 5
teleportToX = ####; //Coord X here
teleportToY = ####; //Coord Y Here
sendMessage("Your message when you tele");
setSidebarInterface(3, 3213);
break;
case 17111: //Stop Viewing
c.setSidebarInterface(3, 3213); //Turns inventory back
break;
Now you're done. What it basically does: When you click a portal you get a Tzhaar View Orb in inventory. You now can click on one of the things then you tele and you get your inventory back. Look below for picture
[Only registered and activated users can see links. Click Here To Register...]
Credits:
20% - Delta for the idea of his server
80% - Me for making it