Offical forum of LASP, a project to script all the areas in wow via LUA
HomeHome  ­FAQFAQ  ­SearchSearch  ­MemberlistMemberlist  ­UsergroupsUsergroups  ­Donate!  ­RegisterRegister  ­Log inLog in  
Post new topic   Reply to topicShare | 
 

 Shadowstalkr AkA Jgro1413 Scripter App Version 1

View previous topic View next topic Go down 
AuthorMessage
Shadowstalkr
New guy


Posts: 3
Join date: 2008-06-06

PostSubject: Shadowstalkr AkA Jgro1413 Scripter App Version 1   Fri Jun 06, 2008 5:56 pm

Yo well my name is Justin and ive been working with lua and recently started some C++. I would say im pretty good with lua and i actually just started it a few weeks ago.
Heres some things i have scripted in the past for my server.
I have scripted many things such as mobs and others and i think i would make a great addition to the team

Code:
--*****************************************
--*UniversalTeleNPC script by Oxin v1.0        *
--*Made for UniversalWoW(www.universal-wow.com)  *
--*Everyone is free to distribute and modify to their  *
--*needs but please leave the original credits        *
--*****************************************
local menunum = 33310
local menuicon = 4
local teleicon = 2
local menu =
{
  {"Arena", 0, -13246.041016, 198.820190, 30.952898},
}
           
function TeleNPC_MainMenu(Unit, Player)
  local i = 0
  Unit:GossipCreateMenu(menunum, Player)
  for k,v in pairs(menu) do
      i = i + 1
      if type(v[2]) == "table" then
        Unit:GossipMenuAddItem(Player, menuicon, v[1], i, 0)
        i = i + #(v[2])
      else
        Unit:GossipMenuAddItem(Player, teleicon, v[1], i, 0)
      end
  end
  Unit:GossipSendMenu(Player)
end

function TeleNPC_SubMenu(Unit, Player, i, Submenu)
  Unit:GossipCreateMenu(menunum-i, Player)
  Unit:GossipMenuAddItem(Player, 7, "<--Back", 0, 0)
  for k,v in pairs(Submenu) do
      i = i + 1
      Unit:GossipMenuAddItem(Player, teleicon, v[1], i, 0)
  end
  Unit:GossipSendMenu(Player)
end

function TeleNPC_OnGossipTalk(Unit, Event, Player)
  TeleNPC_MainMenu(Unit, Player)
end

function TeleNPC_OnGossipSelect(Unit, Event, Player, MenuId, Id, Code)
  local i = 0
  if(Id == 0) then
      TeleNPC_MainMenu(Unit,Player)
  else
      for k,v in pairs(menu) do
        i = i + 1
        if (Id == i) then
            if type(v[2]) == "table" then
              TeleNPC_SubMenu(Unit, Player, i, v[2])
            else
              Player:Teleport(v[2], v[3], v[4], v[5])
              Player:GossipComplete()
            end
            return
        elseif (type(v[2]) == "table") then
            for j,w in pairs(v[2]) do
              i = i + 1
              if (Id == i) then
                  Player:Teleport(w[2], w[3], w[4], w[5])
                  Player:GossipComplete()
                  return
              end
            end
        end
      end
  end
end

RegisterGossipEvent(45402, 1, "TeleNPC_OnGossipTalk")
RegisterGossipEvent(45402, 2, "TeleNPC_OnGossipSelect")



Code:

    local timebetweenannounce = 3500 --Time between messeges the NPC sends
    local restarttime = 12000 --How long you want until it restarts all over again.
    local npcid = 998802 --The NPC's ID

    --Change the folowing text to whatever you want
    local message1 = "Hello! Welcome to our server!"
    local message2 = "Welcome To Hell WoW PvP/Funserver"
    local message3 = "Log onto http://hellwow.ucoz.com and vote for us now."
    local message4 = "Visit our site at http://hellwow.ucoz.com/"
    local message5 = "If We dont Reach rank 90 on xtreme top 100 we will be shutting down so remember to vote for us!"


    function Announcer_Yell(pUnit, Event)
      pUnit:SendChatMessage(12, 0, message1)
      pUnit:RemoveEvents();
      pUnit:RegisterEvent("Announcer2_Yell", timebetweenannounce, 0)
    end

    function Announcer2_Yell(pUnit, Event)
      pUnit:SendChatMessage(12 ,0, message2)
      pUnit:RemoveEvents();
      pUnit:RegisterEvent("Announcer3_Yell", timebetweenannounce, 0)
    end

    function Announcer3_Yell(pUnit, Event)
      pUnit:SendChatMessage(12, 0, message3)
      pUnit:RemoveEvents();
      pUnit:RegisterEvent("Announcer4_Yell", timebetweenannounce, 0)
    end

    function Announcer4_Yell(pUnit, Event)
      pUnit:SendChatMessage(12, 0, message4)
      pUnit:RemoveEvents();
      pUnit:RegisterEvent("Announcer5_Yell", timebetweenannounce, 0)
    end

    function Announcer5_Yell(pUnit, Event)
      pUnit:SendChatMessage(12, 0, message5)
      pUnit:RemoveEvents();
      pUnit:RegisterEvent("Announcer2_Yell", restarttime, 0)
    end

    function Announcer_Start(pUnit, Event)
      pUnit:RegisterEvent("Announcer_Yell", 1000, 0)
    end
    RegisterUnitEvent(npcid, 6, "Announcer_Start")


I also have alot more examples if you need some and i think i would make a great addition to this team
Back to top Go down
View user profile
Darhan
Admin
Admin


Posts: 63
Join date: 2008-04-23

PostSubject: Re: Shadowstalkr AkA Jgro1413 Scripter App Version 1   Sat Jun 07, 2008 10:40 am

I need npc casting examples, not lua scripts build on the Lua++ engine + these are edited scripts.

So, show me some examples of your own scripts please Razz
Back to top Go down
View user profile
Shadowstalkr
New guy


Posts: 3
Join date: 2008-06-06

PostSubject: Re: Shadowstalkr AkA Jgro1413 Scripter App Version 1   Sun Jun 08, 2008 5:51 am

yes mr.darhan let me go get some examples ok.
Back to top Go down
View user profile
Darhan
Admin
Admin


Posts: 63
Join date: 2008-04-23

PostSubject: Re: Shadowstalkr AkA Jgro1413 Scripter App Version 1   Sun Jun 08, 2008 8:27 am

Sorry for being "rude" but I want to make sure that you're not one of those guys that edit scripts and show them to their friends and say: "Look what I've made, I'm so fucking cool now!" you know?
Back to top Go down
View user profile
Shadowstalkr
New guy


Posts: 3
Join date: 2008-06-06

PostSubject: Re: Shadowstalkr AkA Jgro1413 Scripter App Version 1   Sun Jun 08, 2008 6:35 pm

Ok i understand let me just make some scripts right now i would have posted them last night but it was 2 am. and i was tired so ill do some today at some point
Back to top Go down
View user profile
 

Shadowstalkr AkA Jgro1413 Scripter App Version 1

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
LUA Area Scripting Project :: General :: Applications-
Post new topic   Reply to topic