Hi people.
I'm gonna say now, how you can create custom portals with Ascent in a LUA Script.
You need this script: ( Open a notepad and save it as a .Lua exanple Teleport.Lua)
function Teleporting_onUse (pUnit, Event, pMisc)
pMisc:Teleport (MAPID, X, Y, Z)
end
RegisterGameObjectEvent (PORTALGUID, 2, "Teleporting_onUse")
and then for the database:
INSERT INTO gameobject_names
(entry, Type, DisplayID, Name, spellfocus, sound1, sound2, sound3, sound4, sound5, sound6, sound7, sound8, sound9, unknown1, unknown2, unknown3, unknown4, unknown5, unknown6, unknown7, unknown8, unknown9, unknown10, unknown11, unknown12, unknown13, unknown14)
VALUES
(PORTALGUID, 1, DISPLAYID, "NAMEOFTHEPORTAL", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Portalguid: Must be a number which ain't in gameobject_names table. The number must be the same in the script and in the database.
Displayid: As example: 1327, the look of the portal.
NameofthePortal: A name for your portal, example: "Portal to Shoppingcenter".
Mapid: The coordinates for the teleport location, the map id, example for Azeroth: 0.
X,Y,Z: The coordinates of the teleport location.
As example for the coordinates: MAPID (0), -2568.733643, -2508.758789, 133.030594
The follow example is x , y , z. When you got a position ingame, which you wanna got as teleportlocation, write ".gps" as chat message. Then you see the coordinates.
So, now you must insert the databaseitem in your ascentdatabase.
The script you must save in a file with the ending .lua, example: Portal.lua. Then you must create a folder in your ascent folder with the name "scripts", there you put in the .lua script.
If u already have one just put it there lolz:P Also for those who havent enable their Lua u need to open ascent-world.config and near bottom u will see them
I hope I could help with my tutorial for creating custom portals. There is too a solution to create portals without some scripts, but I favor the method with scripts.
It noob and easy guide to follow...
P.S I know this has been repost... plz dont flame me... i find this guide more usefull to use than any other ...
P.S2 Have fun!
EDIT---------------
function Teleporting_onUse (pUnit, Event, pMisc)
pMisc:Teleport (MAPID, X, Y, Z)
end
RegisterGameObjectEvent (PORTALGUID, 2, "Teleporting_onUse")
Do u see the RegisterGameObjectEvent??? good... U see Teleport_onUse?.... good
Oki now if u are going to make multi portals MAKE SURE that portyals doesnt have the same Teleport_onUse i mean change the value wit Teleport_onUse1 or Teleport_onUse2 ETC if u want to have ur portal working!! Also changeing the Teleport_onUse(1,2,3,4) dont forget to change the * fuction Teleport_onUse (with ur personal id number u give!!!)
Example!!!!!
function Teleporting_onUse 2000000(pUnit, Event, pMisc)
pMisc:Teleport (MAPID, X, Y, Z)
end
RegisterGameObjectEvent (PORTALGUID, 2, "Teleporting_onUse2000000")
This help u a lot to make EVEN UR CUSTOM LUA PORTAL EVENT!!!!! If u need more help let me know i will be glad to help u guyes out!!
Also Try to make the portal Away from instance portal or else it will crush the server!
P.S Have more fun now lol! :P
P.S 2 I Add the color green on the Lua script that u need to change in order to have this work:P