MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides  
Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > WoW Emulator Server > Emulator Server Guides > Ascent Guides
Reload this Page How To LUA Script
Ascent Guides This section is for WoW emulated server, Ascent guides.
[NO QUESTIONS HERE]

Reply
 
LinkBack Thread Tools
How To LUA Script
(#1)
Old
Skuxta is Offline
Banned
Rep Power: 0
Reputation: 12
Skuxta is on a distinguished road
 
Posts: 213
Join Date: Aug 2007
Location: New Zealand
Legendary How To LUA Script - 12-13-2007

Credits go to lilnate

-== 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, 4, "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:




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
Reply With Quote

Donate to remove ads.
(#2)
Old
Illidan1's Avatar
Illidan1 is Offline
Shan'do
Rep Power: 4
Reputation: 243
Illidan1 has a spectacular aura aboutIllidan1 has a spectacular aura aboutIllidan1 has a spectacular aura about
 
Posts: 2,256
Join Date: Jul 2007
Location: New Zealand
12-13-2007

Sorry dude, lilnate stole this from my original thread
[Only registered and activated users can see links. ]


Reply With Quote
Reply

Thread Tools

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 Off
Pingbacks are Off
Refbacks are On



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361