Visit www.forum.wow-dynasty.com :: (Tutorial) How to create Lua Portals [3.3.3a] - View topic 8
   
  FAQ Search Memberlist Usergroups Profile Register Log in  
     
 
(Tutorial) How to create Lua Portals [3.3.3a]

 
Post new topic   Reply to topic    Visit www.forum.wow-dynasty.com Forum Index -> Scripts
View previous topic :: View next topic  
Author Message
dMN
Administrator
Administrator


Joined: 21 Apr 2008
Posts: 17
Location: Ramnicu Sarat

PostPosted: 02/08/2011 23:05    Post subject: (Tutorial) How to lucrate Lua Portals [3.3.3a] Reply with quote

This guide will tell you how to make LUA scripted portals.
This is updated for 3.3.3a.

1) Open Notepad or Notepad++

2) Copy this LUA code into Notepad

Code:

function TELENAME_onUse (pUnit, Event, pMisc)
pMisc:Teleport (MapID, X, Y, Z)
end

RegisterGameObjectEvent (GameObjectID ,4, "TELENAME_onUse")

3) The parts highlighted in red, are the parts you change.

TELENAME: name your portal, no spaces, underscores are allowed. (Note: Everywhere where it says TELENAME, must be exactly the same for this to work.) ie. Portal_Dalaran

MapID: go in-game and go to where you want the portal to go. Type .gps and this will show.

X/Y/Z: go in-game and go to where you want the portal to go. Type .gps and this will show.


GameObjectID: This is the ID of the gameobject for your portal

4) Save the file as: "yourportalname.lua" [make sure it's .lua]

5) Put the LUA file in the "scripts" folder in your server's core

6) Open a new Notepad document.

7) Paste this code into it
Code:

INSERT INTO gameobject_names
(entry, Type, DisplayID, Name, Category, CastBarText, Unkstr, 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
(900000, 22, 7849, "Mall Portal", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

8) The parts in red are the parts you change.

ENTRY: this is your GameObjectID (Note: This must be the same as the ID you put in your LUA file. ie. 99990 etc..

DISPLAYID: this is the display ID of your portal. [This can be any gameobject's displayId]

"NAME": Name your gameobject. ie. "Portal to Mall" (Note: Make sure you leave the "Quotation" marks around the name)

9) Save the file as "yourportalnameGO.sql" [Make sure it is .sql]

10) Open your database in Navicat, SQLYog, etc. Dublu click your connection to open it, then double click world to open the database. Right click world and click execute sql file, then point to the directory of yourportalnameGO.sql.

11) Go on your server, spawn your gameobject by typing .go spawn ##### (your GameObjectID) and putting a 1 after it. [.go spawn ##### 1] you must put the 1 after or it will not stay after a restart.

12) Restart your server

13) Congratulations you have made a new LUA portal!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visit www.forum.wow-dynasty.com Forum Index -> Scripts All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 
     
Original World of Warcraft™ Horde forum design by boo, 2004 - ez-life.net
World of Warcraft™ is a trademark and Blizzard Entertainment is a trademark or
registered trademark of Blizzard Entertainment in the U.S. and/or other countries.


Powered by phpBB © 2001, 2002 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro