VCN WOW OLD FORUMS

VISIT VCNWOW.COM
 
HomeFAQRegisterLog in
VCN WOW IS NOW ON VCNWOW.COM
If you are looking for V.C.N






Similar topics
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» INTRODUCTION Destiny
Thu 18 Oct 2018, 6:54 pm by Destiny

» 2.4.3 oldfags still here? whats up?
Thu 18 Oct 2018, 10:05 am by Zanukan

» An Thread dedicated to Old School 2.4.3 and all its memories
Sat 19 Mar 2016, 8:56 am by Shifthappens

» Hey sexy Gentlemen and Ladies
Thu 24 Jan 2013, 11:21 am by Suspect2

» yoo
Mon 13 Aug 2012, 1:34 pm by Casp'

» hay gm
Thu 09 Aug 2012, 11:47 pm by sevenhuehuelol

» Ques for GM
Thu 09 Aug 2012, 11:43 pm by sevenhuehuelol

» YES IT IS I
Mon 30 Jul 2012, 11:21 am by Casp'

» oldfags asemble
Tue 03 Jul 2012, 3:19 pm by -BoomBox

» Oh hai...
Tue 19 Jun 2012, 3:55 pm by Queshi

» hey windir bro guess what
Tue 19 Jun 2012, 3:55 pm by Queshi

» Downpatch from 3.0.8 to 3.0?
Mon 20 Jun 2011, 12:54 pm by windir2

» Mouthless asking me for RESS! LOOL
Thu 26 May 2011, 5:29 pm by Feel

» Need an unstuck
Tue 24 Nov 2009, 2:48 am by ombladon123

» Idea for Arena Rating and Arena Rewards
Mon 23 Nov 2009, 7:58 pm by Raddau

» shammy bug
Mon 23 Nov 2009, 1:35 pm by stomstrikes

» Gentlemen?
Mon 23 Nov 2009, 1:33 pm by stomstrikes

» Rous aka Zanukan attention please
Mon 23 Nov 2009, 3:36 am by ryonis

» I cant get my tokens when i vote.
Sun 22 Nov 2009, 1:26 pm by demonolator12345

» Hi again --- imweedy
Sun 22 Nov 2009, 12:04 am by imweedy

Who is online?
In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests

None

Most users ever online was 395 on Sun 18 May 2008, 12:28 pm
Top posters
ServerBot (7646)
 
Swifteh (7171)
 
Charlie Face (4524)
 
Lisyhalath (3900)
 
Scruffay (3896)
 
kitch (3536)
 
Min0rity (3192)
 
Ubberpownage88 (3023)
 
bacongrease2 (2761)
 
Juicy (2649)
 
Keywords

Share | 
 

 How to make a real live World of Warcraft BOSS!

Go down 
Go to page : 1, 2  Next
AuthorMessage
Dreaddie
Sentino
Sentino
avatar

Number of posts : 46
Joined : 2009-04-06
Points : 3531
Reputation : -10

PostSubject: How to make a real live World of Warcraft BOSS!   Tue 28 Apr 2009, 1:14 am

Some Basic LUA


How a LUA script is built

LUA is a scripting method that allows you to scripts monster's to do things likecast spells speak spawn other mobs and much more. You would mainly want to use it to script an instance


In this TUT i'm going to show you very basic LUA scripting

Everything an npc needs to do starts with FUNCTION and is going to end with END
so we have this:

Code:
function nameoffuntion(Unit, Event)
end

An Example would be

Code:
function NPCNAME_OnCombat(Unit, Event)
end

This is how the beginning of a script will look like.

Also for the functions like

Code:
function NPCNAME_OnDied
or
function NPCNAME_OnKilledTarget

Make sure that you add a RemoveEvents() so that your mob doesnt keep on looking for functions when he is not even in combat


First TUT: Making an NPC speak

We can make an NPC speak by adding this under one of our functions

Code:
Unit:SendChatMessage(type, language, "what am i going to say?")

If we wanted him to say Hello there noob! when he enters combat we do this

Code:
function NPCNAME_OnCombat(Unit, Event)
Unit:SendChatMessage(11, 0, "Hello there noob!")
end

The two most basic types are 11 and 12
11= monster say
12= monster yell

For a language anyone can understand use 0
0 is universal, so obviously everyone understands it.

Lets start a basic script.

Code:
function NPCNAME_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "I Shall PWN YOU!")
end

Now we need add a unit register for the Oncombat function and we do that by adding this to the bottom of our script

Code:
RegisterUnitEvent(npcentry, event, "functionname")


Now your script should look like THIS:

Code:
function NPCNAME_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "I Shall PWN YOU!")
end
 
RegisterUnitEvent(npc_entry, 1, "NPCNAME_OnCombat")

What this does is when our NPCNAME enters combat he/she will yell out I Shall PWN YOU!

Now for some more functions


Second Part: More Functions

A LUA script can have very many functions. four basic functions are:
< OnCombat >
< OnDied >
< OnKilledTarget >
< OnLeaveCombat >

Once we add those in it will look like

Code:
function NPCNAME_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "I Shall PWN YOU!")
end
 
function NPCNAME_OnDied(Unit, Event)
RemoveEvents()
end
 
function NPCNAME_OnKilledTarget(Unit, Event)
end
 
function NPCNAME_OnLeaveCombat(Unit, Event)
RemoveEvents()
end
 
RegisterUnitEvent(npc_entry, 1, "NPCNAME_OnCombat")
RegisterUnitEvent(npc_entry, 2, "NPCNAME_OnLeaveCombat")
RegisterUnitEvent(npc_entry, 3, "NPCNAME_OnKilledTarget")
RegisterUnitEvent(npc_entry, 4, "NPCNAME_OnDied")

What these will do is let our mob
enter combat
register he died
register he killed someone
register when he leave combat



THIRD PIECE: Casting Spells

Non-AoE Spell On Everyone.
An npc is pretty boring if he doesnt cast spells on you, so it's time for us to make him

We can do this by a new function in the script:

Code:
function NPCNAME_SpellName(Unit, Event)
end

Pnce you make the function, you have to add a:

Code:
Unit:CastSpellOnTarget(spellid, Unit:WhoShouldITarget)  CastSpellontarget means its without casting time

or we use

Code:
Unit:FullCastSpellOnTarget(spellid, Unit:whodoiattack?)  this one is  with casting time

soooo if we use no casting time we get

Code:
function NPCNAME_Spellname(Unit, Event)
Unit:CastSpellOnTarget(spellid, Unit:whoiattack?)
end

OR

we do a casting time spell and have

Code:
function NPCNAME_Spellname(Unit, Event)
Unit:FullCastSpellOnTarget(spellid, Unit:whoiattack?)
end

Code:
whoiattack can be:
- GetRandomPlayer(0) this is a Random Player
- GetRandomPlayer(1) this is a Random guy in Short-Range
- GetRandomPlayer(2) this is aRandom guy in Mid-Range
- GetRandomPlayer(3) this is a Random guy in Long-Range
- GetRandomPlayer(4) = Random guy with Mana
- GetRandomPlayer(5) = Random guy with Rage
- GetRandomPlayer(6) = Random guy With Energy
- GetRandomPlayer(7) = Random guy WILL NOT BE Main-Tank
- GetMainTank()
- GetClosestPlayer()
- GetAddTank()

Ok, now I want you to add to your script, and we can do this by adding:

Code:
Unit:RegisterEvent("functionname", timeinMS, HowManyTimes?)

to your OnCombat function:

Code:
function NPCNAME_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "I Shall PWN YOU!")
Unit:RegisterEvent("NPCNAME_Spellname", 10000, 0)
end
 
function NPCNAME_Spellname(Unit, Event)
Unit:CastSpellOnTarget(spellid, Unit:GetRandomPlayer(0))
end[/color]
 
function NPCNAME_OnDied(Unit, Event)
RemoveEvents()
end
 
function NPCNAME_OnKilledTarget(Unit, Event)
end
 
function NPCNAME_OnLeaveCombat(Unit, Event)
RemoveEvents()
end
 
RegisterUnitEvent(npcentry, 1, "NPCNAME_OnCombat")
RegisterUnitEvent(npcentry, 2, "NPCNAME_OnLeaveCombat")
RegisterUnitEvent(npcentry, 3, "NPCNAME_OnKilledTarget")
RegisterUnitEvent(npcentry, 4, "NPCNAME_OnDied")

If your npc casts on itself instead of who you want use this

Code:
function Name_Event(pUnit, Event)
local plr = pUnit:GetRandomPlayer(0) <-- Or something else
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(SpellID, player)
end
end

Dont need to use pUnit you can if you want but better off using Unit for this script


AoEffect Spells:
Sometimes you want your NPC to cast an AoE liked earthquake
Heres how

Code:
function NPCNAME_Earthquake(Unit, Event)
Unit:CastSpell(Spellid)
end

Remember we need to make a register also:

Code:
Unit:RegisterEvent("function_name", timeinms, howManyTimes?)

to our oncombat function:

After adding that our sccript looks like this

Code:
function NPCNAME_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "I Shall PWN YOU!")
Unit:RegisterEvent("NPCNAME_Spellname", 10000, 0)
Unit:RegisterEvent("NPCNAME_Earthquake", 20000, 5)
end
 
function NPCNAME_Spellname(Unit, Event)
Unit:CastSpellOnTarget(Spellid, Unit:GetRandomPlayer(0))
end
 
function NPCNAME_Earthquake(Unit, Event)
Unit:CastSpell(Spellid)
end
 
function NPCNAME_OnDied(Unit, Event)
RemoveEvents()
end
 
function NPCNAME_OnKilledTarget(Unit, Event)
end
 
function NPCNAME_OnLeaveCombat(Unit, Event)
RemoveEvents()
end
 
RegisterUnitEvent(npcentry, 1, "NPCNAME_OnCombat")
RegisterUnitEvent(npcentry, 2, "NPCNAME_OnLeaveCombat")
RegisterUnitEvent(npcentry, 3, "NPCNAME_OnKilledTarget")
RegisterUnitEvent(npcentry, 4, "NPCNAME_OnDied")

More Events to See:

Code:
SendChatMessage
type:
11   say 
12   yell
13   whisper
 
Languages
0 = UNIVERSAL // Anyone can see this
1 = ORCISH
2 = DARNASSIAN
3 = TAUREN
6 = DWARVISH
7 = COMMON
8 = DEMONIC
9 = TITAN
10 = THELASSIAN
11 = DRAGONIC
12 = KALIMAG
13 = GNOMISH
14 = TROLL
33 = GUTTERSPEAK
35 = DRAENEI
 
RegisterUnitEvents events:
type:
1 = Enter Combat  <Needed
2 = Leave Combat  <Needed
3 = Killed Target <Needed
4 = Died          <Needed
5 = AI Tick
6 = Spawn       
7 = Gossip Talk
8 = Reach Waypoint
9 = On Leave Limbo
10 = Player Enters Range

A nice little example script is this

Code:
function Dark Illidan_ArcaneExplosion(Unit, Event)
Unit:SendChatMessage(12, 0, "To...much...ENNNNNNNNNEEEEEERRRRGGGGGGGYYYYYY!")
Unit:CastSpell(29973)
ArcaneTimer=math.random(25000,35000)
end
 
function Dark Illidan_Phase4(Unit, Event)
if Unit:GetHealthPct() < 30 then
RemoveEvents()
Unit:SendChatMessage(12, 0, "Impressive... Time for some fun!")
Unit:CastSpell(20620)
end
end
 
function Dark Illidan_Phase3(Unit, Event)
if Unit:GetHealthPct() < 50 then
RemoveEvents()
Unit:SendChatMessage(11, 0, "Congratulations on making it this far... but your luck has just run out")
Unit:CastSpell(45031)
end
end
 
function Dark Illidan_Phase2(Unit, Event)
if Unit:GetHealthPct() < 75 then
RemoveEvents()
Unit:SendChatMessage(11, 0, "I underestimated you mortals at first. It wont happen again. Let's start over and you will see what i mean!")
Unit:CastSpell(25840)
end
end
 
function Dark Illidan_Earthquake(Unit)
Unit:SendChatMessage(12, 0, "You will not prevail!")
Unit:CastSpell(35569)
end
 
function Dark Illidan_Garrote(Unit)
Unit:CastSpellOntarget(37066, Unit:GetRandomPlayer(0))
Unit:SendChatMessage(12, 0, "Haha! Gotcha!")
end
 
function Dark Illidan_OnCombat(Unit, Event)
Unit:SendChatMessage(11, 0, "Who dares disturb me in my lair!")
Unit:CastSpell(43648)
Unit:CastSpellOnTarget(37066, Unit:GetRandomPlayer(0)
ArcaneTimer=math.random(25000,35000)
Unit:RegisterEvent("Dark Illidan_ArcaneExplosion",ArcaneTimer,20)
Unit:RegisterEvent("Dark Illidan_Garrote",20000,4)
Unit:RegisterEvent("Dark Illidan_Earthquake",60000,10)
Unit:RegisterEvent("Dark Illidan_Phase2",1000,1)
Unit:RegisterEvent("Dark Illidan_Phase3",1000,1)
Unit:RegisterEvent("Dark Illidan_Phase4",1000,1)
end
 
function Dark Illidan_OnLeaveCombat(Unit, Event)
RemoveEvents()
end
 
function Dark Illidan_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "You are no match for me!")
end
 
function Dark Illidan_OnDied(Unit, Event)
Unit:SendChatMessage(12, 0, "But...but..How! how could i be defeated by mere mortals...")
RemoveEvents()
end
 
RegisterUnitEvent(22, 1, "Dark Illidan_OnCombat")
RegisterUnitEvent(22, 2, "Dark Illidan_OnLeaveCombat")
RegisterUnitEvent(22, 3, "Dark Illidan_OnKilledTarget")
RegisterUnitEvent(22, 4, "Dark Illidan_OnDied")
Back to top Go down
flourescent
KGB
KGB
avatar

Number of posts : 208
Joined : 2009-04-18
Points : 3642
Reputation : 2

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Tue 28 Apr 2009, 7:17 pm

Tower of Text crits you for 133337 damage, eyes die.
Back to top Go down
bkhorizon
CIA
CIA
avatar

Number of posts : 739
Age : 25
Joined : 2009-04-11
Points : 4191
Reputation : 23

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Tue 28 Apr 2009, 7:20 pm

this is interesting.

ima try some of this and try it on my own screw around server. you just need a LUA core don't you?
Back to top Go down
jack5577
CIA
CIA
avatar

Number of posts : 1714
Age : 28
Joined : 2008-12-11
Points : 4164
Reputation : -9

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Tue 28 Apr 2009, 7:49 pm

tl;dr
Back to top Go down
Uzed.V3
Bandito
Bandito
avatar

Number of posts : 108
Joined : 2009-04-21
Points : 3571
Reputation : -3

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Tue 28 Apr 2009, 7:50 pm

Nice copypasta guide.
Back to top Go down
Min0rity
CIA
CIA
avatar

Number of posts : 3192
Age : 27
Joined : 2008-09-14
Points : 5537
Reputation : 119

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Tue 28 Apr 2009, 8:08 pm

flourescent wrote:
Tower of Text crits you for 133337 damage, eyes die.

The huge wall of tower text crits me for 1 dmg. I am now blind
Back to top Go down
/B/oxxyy
KGB
KGB
avatar

Number of posts : 186
Joined : 2009-01-26
Points : 3689
Reputation : -1

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Tue 28 Apr 2009, 8:27 pm

Uzed.V3 wrote:
Nice copypasta guide.
Back to top Go down
Toumpaniaris
Assassin
Assassin
avatar

Number of posts : 86
Joined : 2009-02-21
Points : 3563
Reputation : 4

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:36 am

Wall of text...
Guess we are gonna kill it with fire
amirite?
Back to top Go down
babouna
CIA
CIA
avatar

Number of posts : 1376
Age : 59
Joined : 2008-07-07
Points : 4264
Reputation : -19

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:40 am

flourescent wrote:
Tower of Text crits you for 133337 damage, eyes die.

i haz shield wall or w.e
how much dmg nao?
Back to top Go down
Juicy
CIA
CIA
avatar

Number of posts : 2649
Age : 26
Joined : 2009-03-10
Points : 5673
Reputation : 81

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:41 am

Whats a "real live World of Warcraft BOSS"?
I smell copy pasta.
Back to top Go down
Fraggy
Begginer
Begginer
avatar

Number of posts : 13
Joined : 2009-04-24
Points : 3508
Reputation : 1

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:47 am

I had def cap and it couldn't crit meh!
Back to top Go down
Lebensgefahr
CIA
CIA
avatar

Number of posts : 300
Joined : 2009-04-24
Points : 3800
Reputation : 2

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:50 am

Nice copy and paste
Back to top Go down
babouna
CIA
CIA
avatar

Number of posts : 1376
Age : 59
Joined : 2008-07-07
Points : 4264
Reputation : -19

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:51 am

lol so what if he copy and pasted
his trying to help the server
Back to top Go down
srsbacksrsly
CIA
CIA
avatar

Number of posts : 313
Joined : 2009-04-25
Points : 3755
Reputation : -5

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:53 am

wtf is dat o.o
Back to top Go down
http://www.randompornsite.com
Lebensgefahr
CIA
CIA
avatar

Number of posts : 300
Joined : 2009-04-24
Points : 3800
Reputation : 2

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:54 am

babouna wrote:
lol so what if he copy and pasted
his trying to help the server

Lol so what if you're gay, you're trying to defend him.

He copy and pasted this. Gtfo.
Back to top Go down
babouna
CIA
CIA
avatar

Number of posts : 1376
Age : 59
Joined : 2008-07-07
Points : 4264
Reputation : -19

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 3:59 am

so u call me gay just because i try to defend some1

real fucking smart
Back to top Go down
Lebensgefahr
CIA
CIA
avatar

Number of posts : 300
Joined : 2009-04-24
Points : 3800
Reputation : 2

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 4:01 am

babouna wrote:
so u call me gay just because i try to defend some1

real fucking smart

I'm intelligent enough to tell you're being sarcastic, and sarcasm doesn't fit there. I don't need a reason that you think is good to call you gay.. I don't need a reason at all.
Back to top Go down
babouna
CIA
CIA
avatar

Number of posts : 1376
Age : 59
Joined : 2008-07-07
Points : 4264
Reputation : -19

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 4:05 am

but i would like to know how im gay
tell me
i realy want to know how im gay
Back to top Go down
Lebensgefahr
CIA
CIA
avatar

Number of posts : 300
Joined : 2009-04-24
Points : 3800
Reputation : 2

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 4:08 am

babouna wrote:
but i would like to know how im gay
tell me
i realy want to know how im gay

Dude, you're a moron. You can barely speak english - the easiest language to learn in the world.
Back to top Go down
babouna
CIA
CIA
avatar

Number of posts : 1376
Age : 59
Joined : 2008-07-07
Points : 4264
Reputation : -19

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 4:27 am

where did i make a error?
Back to top Go down
srsbacksrsly
CIA
CIA
avatar

Number of posts : 313
Joined : 2009-04-25
Points : 3755
Reputation : -5

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 4:30 am

whats the point of this thread? every script kiddy can script the bosses in wow -.-
Back to top Go down
http://www.randompornsite.com
Luulzz
Bandito
Bandito
avatar

Number of posts : 156
Joined : 2009-04-02
Points : 3632
Reputation : -3

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 5:08 am

srsbacksrsly wrote:
whats the point of this thread? every script kiddy can script the bosses in wow -.-
Back to top Go down
Gothikah
Bandito
Bandito
avatar

Number of posts : 110
Joined : 2009-03-23
Points : 3616
Reputation : 1

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 5:13 am

Luulzz wrote:
srsbacksrsly wrote:
whats the point of this thread? every script kiddy can script the bosses in wow -.-



For people who dont know maybe?

Use your head ffs.

These script guides or w/e could become very usefull if VCN does happen to release its custom instance.
Back to top Go down
srsbacksrsly
CIA
CIA
avatar

Number of posts : 313
Joined : 2009-04-25
Points : 3755
Reputation : -5

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 5:14 am

and who cares about pve on pvp server? btw who cares about pve since wotlk XD
Back to top Go down
http://www.randompornsite.com
Luulzz
Bandito
Bandito
avatar

Number of posts : 156
Joined : 2009-04-02
Points : 3632
Reputation : -3

PostSubject: Re: How to make a real live World of Warcraft BOSS!   Wed 29 Apr 2009, 5:17 am

pve on a "Hardcore PVP server". U can do all raids with 1-2 people. Abuser dk for dmg and healstacking shami.
cool story bro
Back to top Go down
Sponsored content




PostSubject: Re: How to make a real live World of Warcraft BOSS!   

Back to top Go down
 
How to make a real live World of Warcraft BOSS!
Back to top 
Page 1 of 2Go to page : 1, 2  Next
 Similar topics
-
» World of Warcraft : Cataclysm Theme
» Sion Jenkins refused compensation - IMO he's Innocent....
» Glastonbury to trial Qatar World Cup weather machine (? ALERT ?01/04???)
» BDP world support and information.
» Name That Book! Make us laugh!

Permissions in this forum:You cannot reply to topics in this forum
VCN WOW OLD FORUMS :: General :: Graphics Descussion-
Jump to: