[Lua] Quiz npc. menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Quiz npc.


    Sql

    Code:
    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('933333','Quiz Master','','','0','0','0','1','0','0','100','100','0','0','1','1',NULL,'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('933333','82','82','35','10000','100000','0','1','1','1000','0','39763','308222','0','0','0','0','36000','20582','0','0','0','0','0','0','1','1','0','1','23058','0','0','2.5','14','14','0','0','0','0','0','0','0');

    Lua

    Code:
    function On_Gossip(unit, event, player)
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(4, "Welcome to the Random Super quiz!", 1, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "Question 1.", 3, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "Who is the end boss of Moltern Core?", 4, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(0, "A = Ragnaros", 5, 0)
    unit:GossipMenuAddItem(0, "B = Baron Rivendale", 999, 0)
    unit:GossipMenuAddItem(0, "C = Pizza Hut", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(unit, event, player, id, intid, code)
    if(intid == 1) then
    unit:GossipComplete(player)
    end
    if(intid == 2) then
    unit:GossipComplete(player)
    end
    if(intid == 3) then
    unit:GossipComplete(player)
    end
    if(intid == 4) then
    unit:GossipComplete(player)
    end
    if(intid == 5) then
    unit:GossipCreateMenu(3583, player, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "Question 2.", 3, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "What is the Army that 'Arthas' commands?", 4, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(0, "A = The Scourge", 6, 0)
    unit:GossipMenuAddItem(0, "B = The Forsaken", 999, 0)
    unit:GossipMenuAddItem(0, "C = The Horde", 999, 0)
    unit:GossipSendMenu(player)
    end
    if(intid == 6) then
    unit:GossipCreateMenu(3593, player, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "Question 3.", 3, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "What is 'Arthas' also known as?", 4, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(0, "A = Kel'Thuzad", 999, 0)
    unit:GossipMenuAddItem(0, "B = The Lich King", 7, 0)
    unit:GossipMenuAddItem(0, "C = Baron Rivenstine", 999, 0)
    unit:GossipMenuAddItem(0, "D = The Ashbringer", 999, 0)
    unit:GossipSendMenu(player)
    end
    if(intid == 7) then
    unit:GossipCreateMenu(3013, player, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "Question 4.", 3, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "The Emerald Dream is based on what?", 4, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(0, "A = A Paladins Dream", 999, 0)
    unit:GossipMenuAddItem(0, "B = A sanctuary like 'Heaven'", 999, 0)
    unit:GossipMenuAddItem(0, "C = A Hell like 'Hell'", 999, 0)
    unit:GossipMenuAddItem(0, "D = A Druid's Sanctuary", 8, 0)
    unit:GossipSendMenu(player)
    end
    if(intid == 8) then
    unit:GossipCreateMenu(2523, player, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "Question 5.", 3, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "What does 2.0 symbolise?", 4, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(0, "A = The first WoW patch", 999, 0)
    unit:GossipMenuAddItem(0, "B = The first burning crusade patch", 9, 0)
    unit:GossipMenuAddItem(0, "C = A random number", 999, 0)
    unit:GossipMenuAddItem(0, "D = Binary for I win", 999, 0)
    unit:GossipSendMenu(player)
    end
    if(intid == 9) then
    unit:GossipCreateMenu(1523, player, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "Question 6 (Last one).", 3, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(4, "This was made in:", 4, 0)
    unit:GossipMenuAddItem(4, ".", 2, 0)
    unit:GossipMenuAddItem(0, "A = LUA", 999, 0)
    unit:GossipMenuAddItem(0, "B = Lua", 10, 0)
    unit:GossipMenuAddItem(0, "C = C++", 999, 0)
    unit:GossipMenuAddItem(0, "D = C++ and LUA", 999, 0)
    unit:GossipSendMenu(player)
    end
    if(intid == 10) then
    unit:SendChatMessage(12,0,"You win! Come back and play another time.")
    unit:FullCastSpellOnTarget(58451, player)
    unit:FullCastSpellOnTarget(48100, player)
    unit:FullCastSpellOnTarget(58453, player)
    unit:FullCastSpellOnTarget(48104, player)
    unit:FullCastSpellOnTarget(48102, player)
    unit:FullCastSpellOnTarget(58449, player)
    unit:GossipComplete(player)
    end
    if(intid == 999) then
    unit:FullCastSpellOnTarget(5, player)
    unit:SendChatMessage(14,0,"You fail!")
    unit:GossipComplete(player)
    end
    end
    print("                 -                ")
    print("  Lua script made by stoneharry   ")
    print("          Have fun                ")
    print("  Report bugs to mmowned.com      ")
    print("                 -                ")
    RegisterUnitGossipEvent(933333, 1, "On_Gossip")
    RegisterUnitGossipEvent(933333, 2, "Gossip_Submenus")
    Yes I know I suck at Graphics

    [Lua] Quiz npc.
  2. #2
    Nymphx's Avatar Active Member
    Reputation
    83
    Join Date
    Sep 2008
    Posts
    212
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Love this . Nice and unique. Maybe add a

    Code:
    pUnit:AddItem(IDHERE)
    At the end? Would be nice if they customised it for server questions that are relative to that server itself.

    +Rep

  3. #3
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    As far as I know that function was only added and functioning with Lua++ and Blua. If they have compiled that and managed to do it then they wont be a complete noob and I figured they would know how to do that. Also it's a tad easy and anyone can whip out a good old google search. Thanks.
    Last edited by stoneharry; 01-21-2009 at 04:55 PM.

  4. #4
    Zaeran's Avatar Active Member
    Reputation
    16
    Join Date
    Dec 2008
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    apparently the wonder of your spelling in the contest script doesnt apply here

  5. #5
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, Great work again Stoneharry +Rep

  6. #6
    Plq's Avatar Member
    Reputation
    2
    Join Date
    Jan 2009
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice job, gonna use this myself one time.

  7. #7
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Really neat +Rep

  8. #8
    rofldestroyer's Avatar Member
    Reputation
    31
    Join Date
    Sep 2008
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    first lua of this that i have seen +Rep
    You MUST +Rep GOD ----------- LOL he probably has ∞ rep rofl ---------- Special Symbols that i found!!!!!!! :O - ∞,‽,℅,‰,Ω,«,»,º,£,°,¿,¢,µ,±,§,¤

  9. #9
    zadarkangel's Avatar Member
    Reputation
    1
    Join Date
    Sep 2008
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    y nice one +Rep

  10. #10
    mglatt's Avatar Member
    Reputation
    1
    Join Date
    Dec 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good, at lease something extra to add to my private server.

  11. #11
    thelastsurviver123's Avatar Member
    Reputation
    2
    Join Date
    Nov 2007
    Posts
    74
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting, ill take a look at it when I'm back from school, also ill start posting my own stuff soon, mostly events with lua and crap, just need to make a contribution to the forums!

  12. #12
    Lilltimmy's Avatar Member
    Reputation
    20
    Join Date
    Jun 2007
    Posts
    275
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice one, just wondering, and i think it is; Can they repeat it? And gain unlimited epix?

    Btw +Rep x2

  13. #13
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Motivet262 View Post
    Nice one, just wondering, and i think it is; Can they repeat it? And gain unlimited epix?
    Yes, all to true, thats why I put the reward only as some buffs. It's pretty simple to change the questions and answers yourself if you want to edit it. I'm currently working on one that picks random questions from a huge list till you get 10 right then moves onto give you a real reward. Thanks

  14. #14
    Lilltimmy's Avatar Member
    Reputation
    20
    Join Date
    Jun 2007
    Posts
    275
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow :P Im looking forward to it.

  15. #15
    xenyoo's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have a problem whit the npc >.<

    when i answer the question right it close the window, if its wrong it shouts Its wrong or something like this.


    no problem anymore
    its done

    +REP
    Last edited by xenyoo; 01-23-2009 at 08:05 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Guide] LUA teleporter NPC template and guide!!
    By Jackie Moon in forum WoW EMU Guides & Tutorials
    Replies: 34
    Last Post: 04-07-2009, 03:36 PM
  2. [LUA]Music NPC
    By Edude in forum WoW EMU General Releases
    Replies: 19
    Last Post: 11-08-2008, 06:59 AM
  3. [Release] Quiz NPC
    By mager1794 in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 06-28-2008, 07:00 PM
  4. Lua Warp Npc , but it wont load -.-
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 06-28-2008, 02:58 AM
  5. LUA Tele NPC.
    By Ickybad in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-08-2008, 06:08 AM
All times are GMT -5. The time now is 12:49 AM. 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