Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 6 of 6

Thread: Announcing NPC

  1. #1
    Scout
    Synthetic's Avatar
    Join Date
    Aug 2008
    Posts
    25
    Post Thanks / Like
    Rep Power
    16
    Reputation
    13

    Announcing NPC


    Register to remove this ad
    This is a simple very easy lua script, that makes and npc that yells to vote for your server, this npc needs to config before u put it into u scripts folder.

    Code:
    Made by Synthetic for MMOPRO < ------------ Delete all this including this!
    
    
    
    function npc_OnSpawn(pUnit, event)
        pUnit:RegisterEvent("Npc_Yell", 300000, 0)                                           
    end
    
    function Npc_Yell(pUnit)
        local yell = math.random(1,3)
        if(yell == 1) then
            pUnit:SendChatMessage(14, 0, "First Text")
        end
        if(yell == 2) then
            pUnit:SendChatMessage(14, 0, "Second Text")
        end
        if(yell == 3) then
            pUnit:SendChatMessage(14, 0, "Third Text")
        end
    end
    
    RegisterUnitEvent(EntryID, 6, "npc_OnSpawn")
    
    Remember to change the entry id! <----- Delete!

    Update, Modified to say 10 Messages, this is really for the big stuff's

    Code:
     function npc_OnSpawn(pUnit, event)
        pUnit:RegisterEvent("Npc_Yell", 300000, 0)
    end
    
    function Npc_Yell(pUnit)
        local yell = math.random(1,3)
        if(yell == 1) then
            pUnit:SendChatMessage(14, 0, "First Text")
        end
        if(yell == 2) then
            pUnit:SendChatMessage(14, 0, "Second Text")
        end
        if(yell == 3) then
            pUnit:SendChatMessage(14, 0, "Third Text")
        end
    if(yell == 4) then
             pUnit:SendChatMessage(14, 0, "Text Here")
         end
    if(yell == 5) then
             pUnit:SendChatMessage(14, 0, "Text here")
         end
    if(yell == 6) then
             pUnit:SendChatMessage(14, 0, "Text here")
         end
    if(yell == 7) then
             pUnit:SendChatMessage(14, 0, "Text here")
         end
    if(yell == 8) then
             pUnit:SendChatMessage(14, 0, "Third Text")
         end
    if(yell == 9) then
             pUnit:SendChatMessage(14, 0, "Text here")
         end
    if(yell == 10) then
             pUnit:SendChatMessage(14, 0, "Text here")
         end
    end
    
    RegisterUnitEvent(EntryID, 6, "npc_OnSpawn")


    Put this together with the announcing NPC! Else it wont work.

    Want teleportation to? here u got it! U need to configure it yourself, u need will need more than normal knowledge to do it, else if u need it specific ask me.
    Code:
    function warp_on_gossip_talk(unit, event, player)
    unit:CreateGossipMenuForPlayer(3543, player)
    unit:MenuAddItem(player, 0, "Events", 1, 0)
    unit:MenuSendToPlayer(player)
    end
    
    function warp_on_gossip_select(unit, event, player, id, intid, code)
    if(intid == 1) then
    unit:CreateGossipMenuForPlayer(3542, player)
    unit:MenuAddItem(player, 5, "Event1", 9, 0)
    unit:MenuAddItem(player, 5, "Event2", 10, 0)
    unit:MenuAddItem(player, 5, "Event3", 11, 0)
    unit:MenuAddItem(player, 5, "Event4", 12, 0)
    unit:MenuAddItem(player, 5, "[Back]", 100, 0)unit:MenuSendToPlayer(player)
    end 
    
    f(intid == 9) then
    player:Teleport(The Teleportation Direction)
    end
    if(intid == 10) then
    player:Teleport(The Teleportation Direction)
    end
    if(intid == 11) then
    player:Teleport(The Teleportation Direction)
    end
    if(intid == 12) then
    player:Teleport(The Teleportation Direction)
    end
    
    end
    intid = 0
    end



    How to use


    Config it (Should be easy!)

    Put it into scripts folder then restart server.

    Enjoy, now u got and announcing npc for you server.



    › See More: Announcing NPC
    Last edited by Synthetic; 02-09-08 at 02:49 PM.

  2. #2
    Beginner

    Join Date
    Aug 2008
    Posts
    2
    Post Thanks / Like
    Rep Power
    16
    Reputation
    1
    Gosh, nice man! i'll love it! I will use it in my server.

  3. #3
    Beginner

    Join Date
    Sep 2008
    Posts
    1
    Post Thanks / Like
    Rep Power
    16
    Reputation
    1
    nice..

  4. #4
    Scout
    Synthetic's Avatar
    Join Date
    Aug 2008
    Posts
    25
    Post Thanks / Like
    Rep Power
    16
    Reputation
    13
    Thanks for the good words
    Synth's Scripting


    If u need somekind of help scripting? ask me! i'll gladly make u and simple script for free. These script lang's i know. C++ Blua Lua

  5. #5
    Sergeant
    Coldmrn's Avatar
    Join Date
    Aug 2008
    Location
    durban
    Posts
    91
    Post Thanks / Like
    Rep Power
    16
    Reputation
    25
    Please can u compile this for me, i dont have that program to compile the script!

    Thanks
    if you compile
    Please goto this site "http://wwww.bux.to/index.php" and refer me when signing up, i have got paid $5,000 to my PayPal account

  6. #6
    Scout
    Synthetic's Avatar
    Join Date
    Aug 2008
    Posts
    25
    Post Thanks / Like
    Rep Power
    16
    Reputation
    13

    Register to remove this ad
    Dude, Download and Lua Compiling program, alot easier. Then i dont have to do the job

    Synth's Scripting


    If u need somekind of help scripting? ask me! i'll gladly make u and simple script for free. These script lang's i know. C++ Blua Lua



  7. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

 

 

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

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 11:52 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org