Likes: 0
Results 1 to 2 of 2
-
20-07-11, 05:06 PM #1
[Lua]How to create an easy portal in Lua
Register to remove this adCode:function TELENAME1_onUse (pUnit, Event, pMisc) pMisc:Teleport (MAPID, X, Y, Z) end RegisterGameObjectEvent (ID1 , 4, "TELENAME1_onUse")
Now go in-game and type .gps at the location your portal want teleport.
Now fill MAPID, X , Y, Z to look like it is in-game.
ID1 - Put the entry of the Portal.
Copy the code to your notepad and save it as a .lua, and copy it to your scripts folder.
Now all you have to do is to add the portal in-game.Make a new notepad and copy this modifyed code and save it as .sql and insert it in DB.
INSERT INTO `gameobject_names` VALUES (ID1,22,Displayid,'Name1',0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0)
ID1 - Entry you've written in the lua script.
22 - Must remain 22 or the portal won't work
Displayid - Choose 8196, is a good one.
Name1 - Name what will show after you click on it.
Restart the server and you'r done!
› See More: [Lua]How to create an easy portal in Lua
-
28-07-11, 04:33 PM #2
Register to remove this adNice tutorial. Very useful.
Thanks.