PDA

View Full Version : Tutorial. Portals


toxic11b
11-17-2007, 03:06 PM
Ok Im not really good at this so hang in there with me. This was the best way for me to create my own portals and I thought of it to be easy. If you want to give it a try by all means.

Ok first go ingame to the location that you want your visitors to spawn in at and type .gps

http://img164.imageshack.us/img164/6156/gpsix7.jpg


2nd. Create a new document on your desktop copy and paste the code below into it.



global YOURNAME=function(plr)
{
plr.Teleport(MAP,X,Y,Z);
};
.RegisterGameObjectEvent(YOURNUMBER, 2, YOURNAME);




Edit the script where it says YOURNAME to fit the name of your portal " The Mall " Something like that.

Then you edit Map, X,Y,Z Go back to step 1 where you did .gps enter the coords there.

And the last line edit YOURNUMBER and YOURNAME. YOURNUMBER has to match the same NUMBER that you use for your entry ID of your Portal. YOURNAME just name it as you named it in line 1. If it is a 2 word name make sure that you put it like this The_Mall if you do not it will not work.

Ok after that is done save the file as Mall.gm or whatever you want to name it.



Ok I find doing this easier than just going in and making changes or making new lines so hang in there with me.

The SQL Query below will create everything for you . All you have to do is copy and paste it in a text file and edit it to fit your portal.

Step 1. See where it says 35550? Edit that number to what you want just make sure it is available in your DB.

Step 2. The Mall ? Name that what your named it in the GM Script

Step 3. 1 = Map , -18649.228516 = X, 1965.398560 = Y, 103.975739 = Z, 0= Leave it alone. Just enter in your Coords to replace them.

Step 4. The 3rd line where it says 600500 That is the entry ID, Name it to fit your DB or use mine if it helps.

Step 5. The Mall Name it to fit your name.

Step 6 Put the same number that you put in Step 1


INSERT INTO teleport_coords VALUES(35550,'The Mall',1,-8649.228516,1965.398560,103.975739,0);
INSERT INTO gameobject_names VALUES('600500','22','1327','The Mall','35550','0','0','0','0','0','0','0','0','0', '0','0','0','0','0','0','0','0','0','0','0','0','0 ','0');



Now just open HeidiSQL locate the Ascent table . On the right side you will see tabs. One of them will say Query. Paste the code that you edited in there and push the execute SQL arrow on the top right.

Now you are done . Restart your server and spawn the portal with

.go spawn 600500 1 " If you used my numbers " If not then spawn it the same way but with the Entry ID that you created. NOTE!! Make sure you place a 1 at the end of the line. If you do the portal will stay there if not it will go away after a restart.

I hope this helped lol I found this way easy for me.

Superfire
11-17-2007, 09:59 PM
You skipped what to do after saving it as "Mall.gm" and went into other explanations, what is it you do inbetween that step?

toxic11b
11-17-2007, 11:00 PM
You skipped what to do after saving it as "Mall.gm" and went into other explanations, what is it you do inbetween that step?


Thats all you do. Save the .gm file and edit the SQL code to fit your portal . Submit it into a SQL Query . Reload or restart your server and spawn the portal



btw. Let me know if this guide actually helps anyone. I see a decent amount of hits but few replys. If it does not help ill take it down.

jakx
11-18-2007, 07:51 PM
thx man this rox

z3r0
11-18-2007, 10:55 PM
ok i have 1 think to say and 2 questions

1: This is very helpful
2: how can i make it that only GM's can acces it???
3: where to put the .gm script???? (dont get me wrong i never done this)

toxic11b
11-19-2007, 03:22 AM
ok i have 1 think to say and 2 questions

1: This is very helpful
2: how can i make it that only GM's can acces it???
3: where to put the .gm script???? (dont get me wrong i never done this)

Well Only GM'S? Gen only a Admin would be able to get to the file being he would be in direct contact with the server.

The .GM script would go in /Ascent/Scripts/ Inside your Scripts folder.

If you have not already created one I would suggest you use this

http://svn2.assembla.com/svn/venice/Venice%20(%20Portal%20Creator%20).html

Has to be 1 of the best tools I have seen out there =D Was not made by me btw its a portal creation tool from Venice. Its pretty much the same way that I suggest to create a portal.

KingOfWar
11-19-2007, 05:33 AM
Whats the point of making a script? Cant you just do it in the Database... thats what I did. Edit teleport_coords to fit the Coords and stuff then make a new Gameobject..

lilnate22
11-19-2007, 11:15 AM
or...if ur REALLLy skilled, u can c++ it

z3r0
11-19-2007, 08:56 PM
tks toxic u realy helped :D but when i kilck it nothink hapens there is no spell nothink and the gm script it wont worck (do i have to start the .gm from game if so how?)

toxic11b
11-19-2007, 09:30 PM
tks toxic u realy helped :D but when i kilck it nothink hapens there is no spell nothink and the gm script it wont worck (do i have to start the .gm from game if so how?)

Did you restart the server or .reloadscripts ?

KingOfWar
11-20-2007, 01:08 AM
Like I said before... there is NO need for the scriping part. All you have to do is edit the telelport_coords and make a new entry in Gameobject_names.

toxic11b
11-20-2007, 01:45 AM
Like I said before... there is NO need for the scriping part. All you have to do is edit the telelport_coords and make a new entry in Gameobject_names.

If that is how you do it fine . On the other hand this tutorial isnt done that way. If you want to express that then go and create one on your way. As it says at the start. This way is EASIER for me and maybe for OTHERS!!