[Trinity] How to Create SQL Teleport NPC (2013) menu

User Tag List

Results 1 to 5 of 5
  1. #1
    123shadowraider123's Avatar Private
    Reputation
    1
    Join Date
    Sep 2013
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Trinity] How to Create SQL Gossip Teleport NPC (2013)

    Hello, I tried to find a guide How to make teleport NPC via SQL, that will work with the latest Trinity DB. My searching was unsuccessful. So i decided to make a new one by myself.

    I will show you how to make Teleport NPC from the scratch via SQL step-by-step.


    What we need:

    1.) Trinity Compiled Server or Repack (If you want to test the Teleport NPC by yourself)
    2.) Trinity Database (version 335.52) >>> DOWNLOAD
    3.) SQL Editor Tool - I use SQLyog, but you can also use HeidiSQL or Navicat or whatever, it doesn't really matter. >>>DOWNLOAD SQLyog
    4.) Truice - Trinity database tool for creating NPCs, Items, Quests, GObjects. >>>DOWNLOAD
    5.) Event Horizon - Smart AI creating and editing tool. Very user-friendly interface.>>>DOWNLOAD


    Okay, so let's say that you have all the things installed, your SQL server is running and you are ready to go. So we can begin.


    Step 1 - Create NPC

    At first you must create the NPC, which will teleport you. Open the Truice and connect to your database. At the top of the window which appeared, click on the "Creature" tab.

    Now at the bottom of the window click on "New Creature"

    Suddenly, a wild window with many boxes appeared. You don't need to understand them all, all you need to change is below.

    Now take a look at the numbers, which you need to change.

    1 - Entry - Use an empty entry in your database.
    2 - Name - Use name on your own.
    3 - Model ID - This is how the creature will look like. For example, display id of Medivh is 18718. You can find the NPC's display id by typing ".npc info" or just find something HERE (Evermorph Codes full list.).
    4 - Level - It doesn't really matter what level you use.
    5 - Unit Class - Set it to 1 (warrior) to prevent DB errors.
    6 - Faction - This is how the creatures reacts to each other and to players. Set both faction_A and faction_H to 35, so the creature will be friendly to both factions.
    7 - NPC Flag - Set it to 1, so the creature can use gossip.
    8 - Unit Flag - Set it to 4, so the creature will not move.
    9 - AI Name - Set it to SmartAI, so the creature can use Smart AI.
    10 - Gossip Menu ID - Set it to 60000, I will explain this later. (ID 60000 should be empty by default in DB)

    Now click in the right bottom corner at "Show Creature Template Script". Now you can manually copy-paste the script into your SQLyog or whatever you use or just click "Execute Script" in the right bottom corner and this will copy the NPC into your database. You should see a massage "Script executed successfully". If you don't, then you probably typed something wrong.

    We are done with creating NPC. Now open your SQLyog or whatever you use.

    Step 2 - Create Gossip

    1.) At first we must create, what will the creature say, when you right-click on it.
    In SQLyog or whatever you use, open npc_text table, insert a new row with ID 60000 and text0_0 write whatever you want. In SQLyog, you have to uncheck the "Set Null" in the text window to start typing.

    2.) Now open the gossip_menu table. This table connects the creature_template with the gossip. Insert a new row with entry which you wrote to truice (60000) and text_id is the id from npc_text table, so set it to 60000.
    Now the creature will say the text when you right-click on it.

    Step 3 - Create Gossip Options

    Open the gossip_menu_option table and insert new row.

    menu_id is the id from gossip_menu table, set this to 60000. If you want to create more gossip options at 1 NPC, they will all have the same number.

    id is the unique number according to each menu_id, set this to 1. If you want to create more gossip options at 1 NPC, they will all have a unique number. If you want to create next gossip option, then the number will be 2, if next, the number will be 3 and so on........

    option_icon is what the gossip_option icon will look like, here are some of them:
    Code:
    White chat bubble - 0
    Brown bag - 1
    Flight - 2
    Book - 3
    Interaction wheel - 4
    Interaction wheel - 5
    Brown bag with yellow dot - 6
    White chat bubble with black dots - 7
    Tabard - 8
    Two swords - 9
    Yellow dot - 10
    option_text is what the gossip option says. We will create a teleport to Stormwind, so write something like "Teleport to Stormwind!"

    option_id - I can't explain this, set it to 1.

    npc_option_npcflag - Set this to 1 too.


    Now you have the gossip_option on which you can click. But since it's only option, it will don't do anything, so we need to add a teleport script to it.


    Step 3 - Create Teleport Script

    Open the Event Horizon and connect to your DB.

    1.) Write the Entry of the Teleport NPC to the upper left corner. When it loads, make sure that the text under the NPC name is green and says "Smart AI is enabled" or the teleport will dont work.

    2.) Click on Prepare New. Script Description is only for description, it does not affect how the script will work. Write something like Teleport to Stormwind!

    3.) In On Event box choose GOSSIP_SELECT (or write 62 where is 0), so the script will be execute when you click on gossip. Now the 2 options in the right part appeared. We must set on which gossip option will the script execute. Menu Id is the menu_id from gossip_menu_option table, set it to 60000. Action ID is the id from gossip_menu_option, set it to 1

    4.) In Do Action box choose TELEPORT (or write 62 where is 0), so when you click the gossip, it will teleport you. Now in the right part 1 option appeared. Map ID is the id if the map to which you want to teleport. You can find the Map ID by typing .gps in game.
    HTML Code:
    Eastern Kingdoms - 0
    Kalimdor 1
    Outland 530
    Northrend 571.
    5.) In At Target box choose ACTION INVOKER (or write 7 where is 0), so when you click the gossip, it will teleport the player who clicked on the gossip (you). Now you must write the teleport coordinates somewhere. The X Y Z coordinates + orientation will be written to the last 4 boxes in the right part (Target Tab). Take a look at THIS. The coordinates of Stormwind (Trade District) are X: -8832 Y: 630 Z: 94 Orientation: 0

    Orientation is: North - 0 West - 1,5 South - 3 East - 4,5

    6.) Now click on Save New and the script should appear in the big box with title "Teleport to Stormwind" or whatever you typed to description. The script is now saved to your DB (smart_scripts table)

    Now restart your server and try if it works. If not, then check every step you made.


    Adding More Teleports

    If you want to add more teleports to the Teleport NPC, then follow these steps.


    1.) Insert new row into gossip_menu_option , since we want create more teleports in this menu, the menu_id will be 60000.

    The id must be unique with each menu_id, so if you set "Teleport to Stormwind" id 1, then this id will be 2.

    Set text to whatever you want, it depends on the teleport destination.

    Dont forget to set the option_id and npc_option_npcflag to 1 or your gossip will not work.


    2.) Head to the Event Horizon, open the Teleport NPC if you already dont have.

    Then click on the "Teleport to Stormwind" script in the big white box, then click to Duplicate.

    Now in the "Parameters" Part, Event tab change Action ID to 2, since you want to create script for the second gossip option.

    Click on the Action tab and set the Map ID.

    Then click on Target tab and change current coordinates to desired coordinates where you want to teleport.

    Now click on the Save New, if you clicked on Duplicate before changing these datas, it should create a new script. If you did not, you will edit the current script.

    Now restart your server and try if this one works too.


    This guide was created by ShadowRaider




    You can copy this guide wherever you want, but do not take credit for it.
    Last edited by 123shadowraider123; 10-02-2013 at 06:12 AM.

    [Trinity] How to Create SQL Teleport NPC (2013)
  2. #2
    Plikaplouk's Avatar Member
    Reputation
    1
    Join Date
    Apr 2010
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very usefull
    Thank you !
    It works great

  3. #3
    wiklopa's Avatar Private
    Reputation
    1
    Join Date
    Dec 2013
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not work Please add me skype and help me, Gio_wk

  4. #4
    fallen empire's Avatar Member
    Reputation
    1
    Join Date
    Dec 2014
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all i have to say Really good guide it helped me alot! but i have something what i cant figure it out hope you can help me with it:

    I created the npc <gnome> with 2 teleports they work but when a person (for example) press Portal to stormwind, and a other player comes and he press it it wont teleport anymore so what i mean is people can only use the teleport once do you have any idea how to fix this?

    Thanks,
    fallen
    Last edited by fallen empire; 12-26-2014 at 07:59 AM.

  5. #5
    Kuliak123's Avatar Member
    Reputation
    1
    Join Date
    Sep 2015
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [Trinity] How to Create SQL Teleport NPC (2013)-wowscrnshot_092115_143758-jpg

    Hi ive followed all the steps.. but when I talk to him all that comes up is this..

Similar Threads

  1. [Trinity] How to create a custom npc in either Navicat or HeidiSQL
    By stubbsy27993 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 04-30-2020, 07:46 PM
  2. How to create a heal NPC
    By ziPlet in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 03-10-2009, 02:10 PM
  3. How to make a teleporter npc for dummies :D
    By Maceaxe in forum WoW EMU Guides & Tutorials
    Replies: 18
    Last Post: 03-01-2009, 03:59 PM
  4. How to create a warp NPC in C++
    By mager1794 in forum WoW EMU Guides & Tutorials
    Replies: 21
    Last Post: 09-09-2008, 06:18 PM
  5. [Guide] How to create a Warp-NPC (Teleporter)
    By nikey_007 in forum WoW EMU Guides & Tutorials
    Replies: 19
    Last Post: 06-26-2008, 08:30 AM
All times are GMT -5. The time now is 01:45 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search