World of Warcraft Romania
Welcome to wow-dynasty
World of Warcraft Romania

Tutoriale, Ghiduri, Resurse World of Warcraft
AcasaAcasa  FAQFAQ  CautareCautare  MembriMembri  GrupuriGrupuri  InregistrareInregistrare  ConectareConectare  

Distribuiţi | 

 (Tutorial) How to create Lua Portals [3.3.3a]

In jos 

Mesaje : 56
Data de inscriere : 26/05/2010
Varsta : 25
Localizare : In your nightmare

MesajSubiect: (Tutorial) How to create Lua Portals [3.3.3a]   Sam Sept 11, 2010 5:12 am

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


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

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

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)
(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);

Cool 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. Double 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!
Sus In jos
Vezi profilul utilizatorului
(Tutorial) How to create Lua Portals [3.3.3a]
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
World of Warcraft Romania :: World of Warcraft :: Script-uri-
Mergi direct la: