Original Post: Moparscape
NOTE:I AM REDFRODUDE27Objective:To add a portal and make it teleport youServer Base:AnyDifficulty:1/10Assumed Knowledge:Being able to read and understand basic javaFiles Modified:Client.javaIn this tut I will show you how to add a portal and make it teleport you somewhere.
Beginning of tut:
You should have used Fedexers tut. If not here is one that is very simple:
http://www.sythe.org/showthread.php?t=365648I got a few errors when I first used it but it would work god for all of you guys. If you get errors post 'em.
So once you have done that tut do this:
First, to add the portal search for:
public void NewObjects()
Than you should see something like this:
makeGlobalObject(3004, 3383, 2469, 0, 10);//portal
I will tell you which part means what.
The '3004' is the X axis and the '3383' is the Y axis. The '2469' is the portal ID. The '0' is the face and the '10' is the Object Type. This should help for that stuff:
//FACE: 0= WEST | -1 = NORTH | -2 = EAST | -3 = SOUTH
//ObjectType: 0-3 wall objects, 4-8 wall decoration, 9: diag. walls, 10-11 world objects, 12-21: roofs, 22: floor decoration
See very easy!!!
Here is the object list if you need to pick a portal:
http://uppit.com/X8GAGCNOTE: I added it as an attachment just in case this link gets deleted or messed up
I posted on this site the attachment if you need:
http://moparscape.org/smf/index.php/topic,240371.0.htmlNow it is time to do the teleporting portal stuff.
Ok now search for:
case ####
Replace #### with the portal's ID. If it is not there create it by adding:
case ####:
break;
Replace #### with the portal's ID.
Than add this in between the case and break:
if(actionTimer == 0) {
teleportToX = ####;
teleportToY = &&&&;
sendMessage("Your message here");
updateRequired = true;
appearanceUpdateRequired = true;
actionTimer = 5;
}
The #### is the X axis of where you want to teleport and the &&&& is the Y axis of where you want to teleport. Than put your message in the "your message here" area. I know there was a telportToX and Y thing but I felt like saying that =] It's easier
So, I advise you to put your X, Y, and message in the spots I told you.
NOTE: Make sure that the case is the portals ID.
And if you want it to make an emote or gfx use this:
stillgfx(gfxID, absY, absX);
That is for the GFX which you should replace with a GFX's ID
This is for the emotes:
setAnimation(ID);
And replace the ID with the emote's ID.
Here is a GFX list:
http://s1.uppit.com/d/DTXFQMAnd here is the emote list:
http://s1.uppit.com/d/3MX46DSo you finished product should look like this:
case ####:
if(actionTimer == 0) {
stillgfx(gfxID, absY, absX);
setAnimation(ID);
teleportToX = ####;
teleportToY = &&&&;
sendMessage("Your message here");
updateRequired = true;
appearanceUpdateRequired = true;
actionTimer = 5;
}
break;
But I suggest that you only use either the GFX or emote. It may lag if you do one. So if you want it to not lag remove it.
Credits:10% to Fedexer on how to add object's. And 90% to me for showing you guys how =]
This is very easy so please post your feedback. =]