[LUA, SQL] Teleporter menu

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 37
  1. #1
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LUA, SQL] Teleporter

    Greetings Boys and Girls! This is my first Custom Teleporter I've ever made, it took me some time, but here it is. I will explain a bit further bellow how to make it port you to the exact point you want it to.

    Red = Cords
    Blue = MapID
    Yellow = Name of the buttons and cities on the menu when you press the NPC
    Green = Different pages, for each section
    Pink = Entry ID


    function On_Gossip(pUnit, event, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(2, "Alliance_and_Horde_Cities", 1, 0)
    pUnit:GossipMenuAddItem(2, "The_Good_Side", 2, 0)
    pUnit:GossipMenuAddItem(2, "The_Evil_Side", 3, 0)
    pUnit:GossipSendMenu(player)
    end

    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    if(intid == 999) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(2, "Alliance_and_Horde_Cities", 1, 0)
    pUnit:GossipMenuAddItem(2, "The_Good_Side", 2, 0)
    pUnit:GossipMenuAddItem(2, "The_Evil_Side", 3, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 1) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "Dalaran", 300, 0)
    pUnit:GossipMenuAddItem(1, "Shattrath", 309, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 2) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "Stormwind", 301, 0)
    pUnit:GossipMenuAddItem(1, "Ironforge", 302, 0)
    pUnit:GossipMenuAddItem(1, "Darnassus", 303, 0)
    pUnit:GossipMenuAddItem(1, "Exodar", 304, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 3) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)
    pUnit:GossipMenuAddItem(1, "Undercity", 306, 0)
    pUnit:GossipMenuAddItem(1, "Thunder_Bluff", 307, 0)
    pUnit:GossipMenuAddItem(1, "Silvermoon", 308, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 300) then
    player:Teleport(571, 5807.821289, 587.875366, 660.938782)
    unit:GossipComplete(player)
    end

    if(intid == 301) then
    player:Teleport(0, -8932.045898, 538.432983, 94.355003)
    unit:GossipComplete(player)
    end

    if(intid == 302) then
    player:Teleport(0, -4910.066406, -954.944641, 501.485260)
    unit:GossipComplete(player)
    end

    if(intid == 303) then
    player:Teleport(1, 9946.203125, 2614.886230, 1316.321777)
    unit:GossipComplete(player)
    end

    if(intid == 304) then
    player:Teleport(530, -4044.313477, -11908.476563, -2.447248)
    unit:GossipComplete(player)
    end

    if(intid == 305) then
    player:Teleport(1, 1492.897095, -4415.085449, 23.071123)
    unit:GossipComplete(player)
    end

    if(intid == 306) then
    player:Teleport(0, 1735.158936, 238.984070, 62.853424)
    unit:GossipComplete(player)
    end

    if(intid == 307) then
    player:Teleport(1, -1290.126099, 148.322083, 129.706223)
    unit:GossipComplete(player)
    end

    if(intid == 30 then
    player:Teleport(530, 9483.235352, -7290.837891, 14.293912)
    unit:GossipComplete(player)
    end

    if(intid == 309) then
    player:Teleport(530, -1866.214478, 5410.462402, -12.427251)
    unit:GossipComplete(player)
    end
    end

    RegisterUnitGossipEvent(222334, 1, "On_Gossip")
    RegisterUnitGossipEvent(222334, 2,"Gossip_Submenus")
    The script above, is the script for the Teleporter. In order to get this file into you're server you just make a new file in notepad, save the file as nameyouwant.lua

    Okey, I will now explain a bit about the different stuff you might need to know in order to make a Teleporter yourself. I will first start explaining what cords and MapID's are for. Cords is the numbers of a spot in a area you want the players to be ported to when they press a certain area on the NPC. MapID is the number of the area, for example Orgrimmar's MapID is 1, and MapID's are totally different from each area. In order to find the MapID's of areas you can type .gps, which is a command every [a] or [az] flagged player should be able to use in-game. This command will show you the MapID first, than the numbers following is the cords.

    Entry ID's are the numbers you type in to spawn your creature, no matter if it's a Teleporter or any other kind of NPC. Entry ID's can be everything between 100000 - 600000 (Maybe higher), but you need to make sure your entry ID is not already taken by something else in your database.

    You can change name of the different sections to what ever you want, but I would recommend that you don't change the name of the cities! They should have the same name as they have in-game.

    PS: I use forward slash instead of space because some servers doesn't handle space. Forward slash and space has the same effect.

    Now to the SQL for the NPC. The SQL is the file / script for the NPC, and in the SQL file you can modify how much health, mana and other stats you want it to have. You can also mod his display ID from here, and if he's gonna be friendly for both factions.

    Pink = Entry ID
    Red = Faction ID
    Blue = Display ID


    insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
    values ('222334', "Teleporter", "Teleporter Services", '', '0', '7', '0', '3', '0', '0', '27545', '27545', '27545', '27545', '1', '1', '1', '0');

    insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
    values ('222334', '90', '90', '7', '9000000', '9000000', '100000', '1', '1', '1000', '0', '99999', '99999', '0', '0', '0', '0', '3600', '20000', '9999', '9999', '9999', '9999', '9999', '9999', '0', '0', "0", '1', '0', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
    The entry ID has to be the same as in the LUA script. This is very important, else they will not co-work, and they will not find each other. If they don't find each other you, when you spawn the NPC you will just have a empty NPC saying "Greetings <name>! Is there anything I can help you with?". So these need to be the same!!!

    The faction is the ID that will depend if both factions (Alliance and Horde) should be able to use it, or only one of the factions. 7 is the ID which will make the NPC neutral to all factions, and that means all factions are able to use it. 2 is the ID for the NPC to be horde, which means alliance can't use him, and 1 is the ID for the NPC to be Alliance, which means Horde can't use him.

    Display ID is the ID you want the NPC to look like. For example if you want the NPC to look like The Lich King you just go in-game and spawn him, than you use the command .npc info on The Lich King and you will get the display ID of him.


    Remember guys, this is my first Teleporter I've ever made! Please give me responds and comments on it! I'm thankful for any comments! And if the Teleporter doesn't work please give a comment below, and I will try to fix it.
    +Rep would also be nice!


    - Buffy
    Last edited by Evilbuffy; 03-21-2009 at 05:22 PM.

    [LUA, SQL] Teleporter
  2. #2
    Found's Avatar Banned
    Reputation
    239
    Join Date
    Mar 2009
    Posts
    642
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well it doesn't work though it looks very very nice! +Rep

  3. #3
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, Last time I tested it, it worked perfectly so.. But I think you might need to change this :

    RegisterUnitGossipEvent(222334, 2,"Gossip_Submenus")

    To this

    RegisterUnitGossipEvent(222334, 2, "Gossip_Submenus")

    It's just a tiny mistake which appeared when I copy, pasted it from my file to this thread. The space didn't come. Try after you have done that.
    And thanks for the +Rep
    Last edited by Evilbuffy; 03-21-2009 at 05:15 PM.

  4. #4
    Found's Avatar Banned
    Reputation
    239
    Join Date
    Mar 2009
    Posts
    642
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That Fixed it nice

  5. #5
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great to hear! I started with LUA and SQL for 3 weeks ago, and I think I've done good work so fare.

  6. #6
    Found's Avatar Banned
    Reputation
    239
    Join Date
    Mar 2009
    Posts
    642
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do agree I started bout 3 years ago with emulation so I started learning when Antrix released. But I love it!

  7. #7
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I find scripting really fun! When I first started with it for 3 weeks ago, I didn't even know how to make a custom boss, I had no idea what anything meant. It took me 3 single weeks to get so "fare" as I am now. And I find it really fun, actually I can't stop scripting now after I've started with it.

  8. #8
    Found's Avatar Banned
    Reputation
    239
    Join Date
    Mar 2009
    Posts
    642
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's very fun in every way!

  9. #9
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okey, I've had 66 views but Mello1337 is the only one giving comments. : / I'd hope for more comments!! :P
    Last edited by Evilbuffy; 03-23-2009 at 04:56 PM.

  10. #10
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Guys, If I don't get more comments I will remove the Script. It's not here for you guys to just copy it, I want comments on how it works and stuff.
    Last edited by Evilbuffy; 04-03-2009 at 02:59 PM.

  11. #11
    Mircast's Avatar Member
    Reputation
    14
    Join Date
    Sep 2008
    Posts
    139
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Even if you briefly explained it, it's not really a guide.
    More of a share/release

  12. #12
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Briefly? I have explained every move people know to make it. I have not bothered to write down what every single function and stuff does, because people can just use my template or something.

  13. #13
    mako1's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    35
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    awesome been wanting one of these

  14. #14
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice to hear that you like it.. I will come with more scripts later on, I'm working on some stuff and you guys will be one of the first ones to see it.

    Please +Rep me for the scripts I add. =)

  15. #15
    pandasoup12's Avatar Member
    Reputation
    1
    Join Date
    Nov 2007
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, i changed that script for my server, but the new page i made does not work(Malls), it shows up in the taxi, but when i click on it, nothing happens. all the other ports are working. here is my script.

    Code:
    function On_Gossip(pUnit, event, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(2, "Nutral Cities", 1, 0)
    pUnit:GossipMenuAddItem(2, "Alliance", 2, 0)
    pUnit:GossipMenuAddItem(2, "Horde", 3, 0)
    pUnit:GossipMenuAddItem(2, "Malls", 4, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    if(intid == 999) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(2, "Nutral Cities", 1, 0)
    pUnit:GossipMenuAddItem(2, "Alliance", 2, 0)
    pUnit:GossipMenuAddItem(2, "Horde", 3, 0)
    pUnit:GossipMenuAddItem(2, "Malls And PvP", 4, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 1) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "Dalaran", 300, 0)
    pUnit:GossipMenuAddItem(1, "Shattrath", 309, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 2) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "Stormwind", 301, 0)
    pUnit:GossipMenuAddItem(1, "Ironforge", 302, 0)
    pUnit:GossipMenuAddItem(1, "Darnassus", 303, 0)
    pUnit:GossipMenuAddItem(1, "Exodar", 304, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 3) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)
    pUnit:GossipMenuAddItem(1, "Undercity", 306, 0)
    pUnit:GossipMenuAddItem(1, "Thunder_Bluff", 307, 0)
    pUnit:GossipMenuAddItem(1, "Silvermoon", 308, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 4) then
    pUnit:GossipMenuAddItem(1, "Horde Mall", 310, 0)
    pUnit:GossipMenuAddItem(1, "Alliance Mall", 311, 0)
    pUnit:GossipMenuAddItem(1, "Gurubashi Arena", 312, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    end
    
    if(intid == 300) then
    player:Teleport(571, 5807.821289, 587.875366, 660.938782)
    unit:GossipComplete(player)
    end
    
    if(intid == 301) then
    player:Teleport(0, -8932.045898, 538.432983, 94.355003)
    unit:GossipComplete(player)
    end
    
    if(intid == 302) then
    player:Teleport(0, -4910.066406, -954.944641, 501.485260)
    unit:GossipComplete(player)
    end
    
    if(intid == 303) then
    player:Teleport(1, 9946.203125, 2614.886230, 1316.321777)
    unit:GossipComplete(player)
    end
    
    if(intid == 304) then
    player:Teleport(530, -4044.313477, -11908.476563, -2.447248)
    unit:GossipComplete(player)
    end
    
    if(intid == 305) then
    player:Teleport(1, 1492.897095, -4415.085449, 23.071123)
    unit:GossipComplete(player)
    end
    
    if(intid == 306) then
    player:Teleport(0, 1735.158936, 238.984070, 62.853424)
    unit:GossipComplete(player)
    end
    
    if(intid == 307) then
    player:Teleport(1, -1290.126099, 148.322083, 129.706223)
    unit:GossipComplete(player)
    end
    
    if(intid == 308) then
    player:Teleport(530, 9483.235352, -7290.837891, 14.293912)
    unit:GossipComplete(player)
    end
    
    if(intid == 309) then
    player:Teleport(530, -1866.214478, 5410.462402, -12.427251)
    unit:GossipComplete(player)
    end
    
    if(intid == 310) then
    player:Teleport(1, 2177.929199, -4765.253418, 54.911053)
    unit:GossipComplete(player)
    end
    
    if(intid == 311) then
    player:Teleport(0, -8856.007813, 599.473816, 92.058683)
    unit:GossipComplete(player)
    end
    
    if(intid == 312) then
    player:Teleport(0, -13204.020508, 274.802765, 21.857243)
    unit:GossipComplete(player)
    end
    end
    
    RegisterUnitGossipEvent(222334, 1, "On_Gossip")
    RegisterUnitGossipEvent(222334, 2,"Gossip_Submenus")
    i have never done LUA coding before, but it looked self explanatory enough.
    anyone know what i did wrong here. any help would be great, thanks.

Page 1 of 3 123 LastLast

Similar Threads

  1. [LUA][SQL] Kil'jaeden Script
    By BrantX in forum World of Warcraft Emulator Servers
    Replies: 47
    Last Post: 06-21-2008, 10:51 AM
  2. [Lua, SQL] Kil'tazoor, The Kobold Lord. (My first try at LUA!)
    By Zordin in forum World of Warcraft Emulator Servers
    Replies: 23
    Last Post: 06-11-2008, 03:19 PM
  3. [LUA][SQL] Angel Script
    By BrantX in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 06-11-2008, 02:21 PM
  4. SQL Teleporter
    By Bapes in forum World of Warcraft Emulator Servers
    Replies: 22
    Last Post: 06-01-2008, 12:02 PM
  5. [Release][LUA][SQL] Selin Fireheart
    By sheepking in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 05-11-2008, 11:40 AM
All times are GMT -5. The time now is 10:23 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