Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Results 1 to 2 of 2
  1. #1
    Scout
    ^_^ Electrify's Avatar
    Join Date
    Jul 2011
    Posts
    20
    Rep Power
    15
    Reputation
    19

    [Lua]How to create an easy portal in Lua


    Register to remove this ad
    Code:
    function TELENAME1_onUse (pUnit, Event, pMisc)
    pMisc:Teleport (MAPID, X, Y, Z)
    end
    
    RegisterGameObjectEvent (ID1 , 4, "TELENAME1_onUse")
    TELENAME1 - You don't have to change it
    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!

  2. #2
    Beginner

    Join Date
    Apr 2009
    Posts
    27
    Rep Power
    17
    Reputation
    1

    Register to remove this ad
    Nice tutorial. Very useful.
    Thanks.

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 01:21 AM.
Powered by vBulletin® Copyright ©2000-2026, Jelsoft Enterprises Ltd.
vBulletin Licensed to: MMOPro.org
vBulletin Skin By: PurevB.com