Gaming Community
Forum
 
Go Back   D3scene > Hot Games > WoW forum > WoW Private Server Info & Help
Register Blogs Live view Downloads Marketplace FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

[Guide] Lua Scripting Guide is here [ by Illidan1 ]

This is a discussion on [Guide] Lua Scripting Guide is here [ by Illidan1 ] within the WoW Private Server Info & Help forum part of the WoW forum category; If some on has posted it here they took it from me on ******* Hello people, i am learning how ...


Welcome on D3scene.com! Make sure to register - it's free and very quick! You have to register before you can post and participate in our discussions with 70000 other registered members. Downloads, user profiles and some forums can only be seen by registered members. After you create your free account you will be able to customize many options, you will have the full access to new hacks, latest cheats and last but not least will see no advertisements at all. We would love to see you around in our community!
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 01-15-2008, 08:57 AM
Illidan1's Avatar
Member

 
Join Date: Jan 2008
Location: New Zealand
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 44
Rep Power: 2
Illidan1 is on a distinguished road
Send a message via MSN to Illidan1
Exclamation [Guide] Lua Scripting Guide is here [ by Illidan1 ]

If some on has posted it here they took it from me on *******

Hello people, i am learning how to make some .lua Scripts, here is some


-== How to make a Npc Cast a spell ==-



Ok first here is a Template to use for it \/

Everything in red u need to change
How to use template look below

Code:
function NpcName_Event (pUnit, Event)
	pUnit:CastSpell (Spell ID)
end  
RegisterUnitEvent (Npc Spawn ID, 1, "NpcName_Event")
Step 1 : All the things in red is the things u need to put in your self

Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifying it with Steps below

Step 3 : function NpcName_Event (pUnit, Event) = The Name of your Npc

Step 4 : function NpcName_Event (pUnit, Event) = The event, meaning like the name of the spell Etc

Step 5 : pUnit:CastSpell (Spell ID) = The Id of the Spell that you wont your Npc To cast

Step 6 : RegisterUnitEvent (Npc Spawn ID, 4, "NpcName_Event") = The Spawn ID of your Npc that you wont to cast the Spell

Step 7 : RegisterUnitEvent (Npc Spawn ID, 4, "NpcName_Event") = The same ass "Step 3" and "Step 4"

And now Naming it

Naming it is the hard part well kinda not really. Now when your done Modifying it go to File > Save as > and put it as all Files and call it like (If you are doing it for a mob called Slayer i would call it Slayer.lua) So like in "Step 3" The Name of your Npc just name it That and put a .lua at the end of it so it will be like " Slayer.lua "

Saving It : save it to your Desktop or some were u know were it is

Step 10 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/

C:\AC Web Ultimate Repack\Ascent\scripts

If u don't have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server

And then your Done


-== Make a npc Talk when in Enter Combat Etc ==-


Ok first here is a Template to use for it \/

Everything in red u need to change
How to use template look below


Code:
function NpcName_Event (pUnit, Event)
	pUnit:SendChatMessage (Type, Language, "What you wont your Npc to say")
end
RegisterUnitEvent (Npc Spawn ID, When, "Name_Event")
Step 1 : All the things in red is the things u need to put in your self

Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifying it with Steps below

Step 3 : function NpcName_Event (pUnit, Event) = the Name of the Npc that you wont to talk on the Event

Step 4 : function NpcName_Event (pUnit, Event) = the event of when the Npc will say what you wont it to say (Like Entercombat, Leavecombat, die, Etc)

Step 5 : pUnit:SendChatMessage (Type, Language, "What you wont your Npc to say") = the Type of text \/

Code:
-1 = ADDON
 0 = SAY
 1 = PARTY
 2 = RAID
 3 = GUILD
 4 = OFFICER
 5 = YELL
 6 = WHISPER
 7 = WHISPER_INFORM
 8 = EMOTE
 9 = TEXT_EMOTE
10 = SYSTEM
11 = MONSTER_SAY
12 = MONSTER_YELL
13 = MONSTER_WHISPER
14 = CHANNEL
16 = CHANNEL_JOIN
17 = CHANNEL_LEAVE
18 = CHANNEL_LIST
19 = CHANNEL_NOTICE
20 = CHANNEL_NOTICE_USER
21 = AFK
22 = DND
23 = COMBAT_LOG
24 = IGNORED
25 = SKILL
32 = LOOT
83 = BATTLEGROUND_EVENT
87 = RAIDLEADER
88 = RAIDWARNING 
Step 6 : pUnit:SendChatMessage (Type, Language, "What you wont your Npc to say") = the Type of Language \/

Code:
 0 = UNIVERSAL
 1 = ORCISH
 2 = DARNASSIAN
 3 = TAURAHE
 6 = DWARVISH
 7 = COMMON
 8 = DEMONIC
 9 = TITAN
10 = THELASSIAN
11 = DRACONIC
12 = KALIMAG
13 = GNOMISH
14 = TROLL
33 = GUTTERSPEAK
35 = DRAENEI 
Step 7 : pUnit:SendChatMessage (Type, Language, "What you wont your Npc to say") = The words that you wont your Npc to say when it enter combat Leaves combat Dies Etc

Step 8 : RegisterUnitEvent (Npc Spawn ID, When, "Name_Event") = The Spawn id of the Npc that you wont these words to come otu of

Step 9 : RegisterUnitEvent (Npc Spawn ID, When, "Name_Event") = When the Npc will say this Text \/
Code:

1 = Enter Combat
2 = Leave Combat
3 = Killed Target
4 = Died
5 = AI Tick
6 = Spawn
7 = Gossip Talk
8 = Reach Waypoint
9 = On Leave Limbo
10 = Player Enters Range
 
Step 10 : RegisterUnitEvent (Npc Spawn ID, When, "Name_Event") = The name of the Npc like in "Step 3"

Step 11 : RegisterUnitEvent (Npc Spawn ID, When, "Name_Event") = the Event of the Npc when it talks, it must be the same as "Step 4"


And now Naming it

Naming it is the hard part well kinda not really. Now when your done Modifying it go to File > Save as > and put it as all Files and call it like (If you are doing it for a mob called Slayer i would call it Slayer.lua) So like in "Step 3" The Name of your Npc just name it That and put a .lua at the end of it so it will be like " Slayer.lua "


Saving It : save it to your Desktop or some were u know were it is

Step 12 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/

C:\AC Web Ultimate Repack\Ascent\scripts

If u don't have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server

And then your Done



-==Make a npc change size when every==--



Ok first here is a Template to use for it \/

Everything in red u need to change
How to use template look below


Code:
function WhenScale(pUnit, Event)
    pUnit:SetScale(Size);
end
RegisterUnitEvent(Npc Spawn ID,When,"WhenScale")
Step 1 : All the things in red is the things u need to put in your self

Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifying it with Steps below

Step 3 : function WhenScale(pUnit, Event) = When the Npc will Change Size (So if it was oncombat, i would put there "OnCombatScale" Etc


Step 4 : pUnit:SetScale(Size); = The Size of your Npc will be
When he gets to the Stage ( Chose from 0.1 - 200, any high might crash Server)


Step 5 : RegisterUnitEvent(Npc Spawn ID,When,"WhenScale") = The Spawn Id of the Npc that you wont to grow

Step 6 : RegisterUnitEvent(Npc Spawn ID,When,"WhenScale") = When they Npc will grow chose one from below \/

Code:

1 = Enter Combat
2 = Leave Combat
3 = Killed Target
4 = Died
5 = AI Tick
6 = Spawn
7 = Gossip Talk
8 = Reach Waypoint
9 = On Leave Limbo
10 = Player Enters Range
 
Step 7 : RegisterUnitEvent(Npc Spawn ID,When,"WhenScale") = When the Npc will Change Size (So if it was oncombat, i would put there "OnCombatScale" Etc The same ass what you put in "Step 3"



And now Naming it

Naming it is the hard part well kinda not really. Now when your done Modifying it go to File > Save as > and put it as all Files and call it like (If you are doing it for a mob called Slayer i would call it Slayer.lua) So like in "Step 3" The Name of your Npc just name it That and put a .lua at the end of it so it will be like " Slayer.lua "


Saving It : save it to your Desktop or some were u know were it is

Step 8 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/

C:\AC Web Ultimate Repack\Ascent\scripts

If u don't have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server

And then your Done




This was all done by me don't take it any Were else unless you ask

Also this guide will be updata sooner or later, when i get more info
Reply With Quote
D3scene
Welcome to D3scene - probably the best location for all Gamers.

To participate in our friendly environment you have to register. After completing registration you will have full access to all threads and features. We care about members and try to make your stay as pleasant as possible. We are unique with the following feature for members - you will not see a single Advertisement!


The best: registration is completely free. It will not cost you a single penny or harm you in any way. You will lose nothing except 1 minute of your time. So why not register? We would be happy to see you around!
  #2  
Old 01-15-2008, 08:59 AM
MysteriousSouL's Avatar
1337

 
Join Date: Oct 2007
Location: HeaveN
Posts: 380
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 403
Rep Power: 5
MysteriousSouL is just really niceMysteriousSouL is just really niceMysteriousSouL is just really niceMysteriousSouL is just really niceMysteriousSouL is just really nice
Send a message via MSN to MysteriousSouL
Awesome mate
Reply With Quote
  #3  
Old 01-15-2008, 09:08 AM
Illidan1's Avatar
Member

 
Join Date: Jan 2008
Location: New Zealand
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 44
Rep Power: 2
Illidan1 is on a distinguished road
Send a message via MSN to Illidan1
thanks for the Rep mate
Reply With Quote
  #4  
Old 01-15-2008, 09:10 AM
DreZen's Avatar
Hacker
 
Join Date: Dec 2007
Location: 127.0.0.1
Posts: 208
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 82
Rep Power: 0
DreZen will become famous soon enough
Send a message via MSN to DreZen
Nice, +Rep
Reply With Quote
  #5  
Old 01-16-2008, 01:02 AM
Newbie

 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 0
Rep Power: 2
jimbob is an unknown quantity at this point
i was wondering.... what do you do in the event to get it to trigger when some one douse an emot on them.... (more a spesific one like /chicken)

and thanks gratly for the guide man

*edit*
BTW...

Last edited by jimbob; 01-16-2008 at 01:04 AM.
Reply With Quote
  #6  
Old 01-29-2008, 05:38 AM
skhouri10's Avatar
So.... Whats up???

 
Join Date: Nov 2007
Location: Silvermoon in Sunfury Spire
Posts: 340
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 149
Rep Power: 2
skhouri10 will become famous soon enoughskhouri10 will become famous soon enough
Send a message via MSN to skhouri10
Hey this is cool
Reply With Quote
  #7  
Old 05-07-2008, 05:18 AM
Skype's Avatar
Premium Member

 
Join Date: Apr 2008
Location: WoW
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 228
Rep Power: 3
Skype has a spectacular aura aboutSkype has a spectacular aura aboutSkype has a spectacular aura about
Well done!

+Rep,

But Yellow is almost unreadable on a white font.
xD
Reply With Quote
  #8  
Old 05-07-2008, 10:51 PM
skhouri10's Avatar
So.... Whats up???

 
Join Date: Nov 2007
Location: Silvermoon in Sunfury Spire
Posts: 340
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 149
Rep Power: 2
skhouri10 will become famous soon enoughskhouri10 will become famous soon enough
Send a message via MSN to skhouri10
Have u seen mine? LUA Tutorial
Reply With Quote
  #9  
Old 02-01-2009, 07:42 PM
Newbie

 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 0
Rep Power: 1
TerraNova is an unknown quantity at this point
Well pls tell me where im doing wrong i cant make NPC to cast spell

function HighOverlordSaurfang_Whirlwind (pUnit, Event)
pUnit:CastSpell (41098)
end
RegisterUnitEvent (14720, 1, "HighOverlordSaurfang_Whirlwind")


pls i want to make smnt out of it,btw i have arcemu :S can i do with it too?:biggrin:
Reply With Quote
  #10  
Old 02-01-2009, 07:54 PM
Newbie

 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 0
Rep Power: 1
TerraNova is an unknown quantity at this point
Quote:
Originally Posted by TerraNova View Post
Well pls tell me where im doing wrong i cant make NPC to cast spell

function HighOverlordSaurfang_Whirlwind (pUnit, Event)
pUnit:CastSpell (41098)
end
RegisterUnitEvent (14720, 1, "HighOverlordSaurfang_Whirlwind")


pls i want to make smnt out of it,btw i have arcemu :S can i do with it too?:biggrin:
sry ppls i discovered that he use that spell as firstone and thats it...how do i make him use it more times?sry im noob i need some info
:biggrin:
Reply With Quote
D3scene
Welcome to D3scene - probably the best location for all Gamers.

To participate in our friendly environment you have to register. After completing registration you will have full access to all threads and features. We care about members and try to make your stay as pleasant as possible. We are unique with the following feature for members - you will not see a single Advertisement!


The best: registration is completely free. It will not cost you a single penny or harm you in any way. You will lose nothing except 1 minute of your time. So why not register? We would be happy to see you around!
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WoW-Leveling Guides hendricius Literature 17 12-05-2008 01:43 AM
Best Leveling Guides! hendricius WoW Guides 23 09-15-2007 02:43 PM
What is a leveling guide jphix WoW Guides 0 07-20-2007 01:34 AM


All times are GMT +1. The time now is 10:11 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.
vBulletin style developed by Transverse Styles