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 Scripting LUA 101
Ascent Guides This section is for WoW emulated server, Ascent guides.
[NO QUESTIONS HERE]

Reply
 
LinkBack Thread Tools
(#76)
Old
joober's Avatar
joober is Offline
Sergeant
Rep Power: 1
Reputation: 6
joober is an unknown quantity at this point
 
Posts: 65
Join Date: Feb 2008
05-17-2008

Wow, very easy to read. Good important information. Easy to understand/nicely organized.

+rep from me.
Reply With Quote

Donate to remove ads.
(#77)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,962
Join Date: Oct 2007
05-17-2008

Thanks buddy
Reply With Quote
(#78)
Old
thelastsurviver123 is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 2
Reputation: 1
thelastsurviver123 is an unknown quantity at this point
 
Posts: 44
Join Date: Nov 2007
05-18-2008

sweet guide!
Reply With Quote
(#79)
Old
Sumner97 is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 0
Reputation: 1
Sumner97 is an unknown quantity at this point
 
Posts: 4
Join Date: May 2008
05-18-2008

@ Shredfire I could be wrong on this, but I think that Lua is case sensitive in some areas. Make sure you use the correct capital or lowercase letters in the right settings.

On another note I have a question about Lua scripting. I am currently working on scripting Hex Lord Malacrass for ZA. I have 2 out of 3 of his spells working correctly but one I can't get to work for some reason. Basically what it does is takes the abilities of a certain player class in the raid and gives them to Hex Lord for use. I know for this to work correctly you need to find the correct number for the player class that has been targeted. I use the :GetPlayerClass() to find this number and set it to a variable so I can call the certain class abilities. Here is what my code looks like:

Code:
function HexLord_SoulDrain(Unit, event)
	Unit:RemoveEvents()
	Unit:SendChatMessage(12, 0, "Your will belong ta me now!")
	Unit:PlaySoundToSet(12046)
	Unit:FullCastSpellOnTarget(43501, Unit:GetRandomPlayer(0))
	class = Unit:GetPlayerClass()
	if class == 1 then
	Unit:SendChatMessage(11, 0, "Check Warrior")
	Unit:RegisterEvent("WarriorSpells", 1000, 1)
	elseif class == 2 then
        ....
        end
        Unit:RegisterEvent("HexLord_SpiritBolts", 30000, 0)
end
What happens is he says the chat message, I heard the sound play, and he casts the spell on a random player. But that is all the happens. I don't see the message "Check Warrior" appear. I have reconfigured how I use the :GetPlayerClass() option may times but to the same affect. The question is am I doing something wrong here or does the :GetPlayerClass() option just not work on the Lua engine.

Help would be greatly appreciated. If I can get this working correctly I would love to post it here for everyone to use.

Edit: Since GetPlayerClass doesn't work. I just set it to a randomizer event. This should work for now.

-Sumner

Last edited by Sumner97; 05-19-2008 at 05:17 AM..
Reply With Quote
(#80)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,962
Join Date: Oct 2007
05-18-2008

It doesn't work for me, at least not lately.
Reply With Quote
(#81)
Old
Sumner97 is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 0
Reputation: 1
Sumner97 is an unknown quantity at this point
 
Posts: 4
Join Date: May 2008
05-18-2008

Thanks SectorSeven

Btw nice guide and love your database. Our server is currently using it.
Reply With Quote
(#82)
Old
pachuco55's Avatar
pachuco55 is Offline
Master Sergeant
Rep Power: 1
Reputation: 12
pachuco55 is on a distinguished road
 
Posts: 76
Join Date: Mar 2008
Location: Texas
05-18-2008

How's that advanced lua guide coming? I am need of more learnings!
Reply With Quote
(#83)
Old
Exona is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 2
Reputation: 1
Exona is an unknown quantity at this point
 
Posts: 11
Join Date: Jan 2007
Location: Norway
05-18-2008

for awesomeness! Usefull for scripting my own bosses when I get to making me a server again ^_^

Edit: Gah, gotta wait untill tomorrow to do that :/

Last edited by Exona; 05-18-2008 at 09:17 PM..
Reply With Quote
(#84)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,962
Join Date: Oct 2007
05-18-2008

Haha its cool. Glad you liked it!
Reply With Quote
(#85)
Old
ledz14's Avatar
ledz14 is Offline
Master Sergeant
Rep Power: 1
Reputation: 6
ledz14 is an unknown quantity at this point
 
Posts: 77
Join Date: Feb 2008
Location: London, UK
06-02-2008

thanks man, +rep
Reply With Quote
(#86)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,962
Join Date: Oct 2007
06-02-2008

No problem
Reply With Quote
(#87)
Old
ledz14's Avatar
ledz14 is Offline
Master Sergeant
Rep Power: 1
Reputation: 6
ledz14 is an unknown quantity at this point
 
Posts: 77
Join Date: Feb 2008
Location: London, UK
06-02-2008

So, since ur an expert, how would I write a script for instant 70 in LUA? greatly appreciated,

-Ledz
Reply With Quote
(#88)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,962
Join Date: Oct 2007
06-04-2008

Answered this question for ya already
Reply With Quote
(#89)
Old
Zordin's Avatar
Zordin is Offline
Master Sergeant
Rep Power: 2
Reputation: 16
Zordin is on a distinguished road
 
Posts: 128
Join Date: Jan 2007
Location: Norway
06-08-2008

How do i make an NPC do a spell at a certain percent?

Thanks in advance.
Reply With Quote
(#90)
Old
Crucius is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 0
Reputation: 1
Crucius is an unknown quantity at this point
 
Posts: 3
Join Date: Nov 2007
06-08-2008

Quote:
Now you must save your script. Save it as Boss_CreatureName.lua is the tipical setup. Place in your scripts folder with has other LUA files in it. Make sure your compile/repack has LUA enabled and that its enabled in your ascent-world. Also, make sure there is a LUA dll in your script_bin folder. Now restart your server and have fun!


Would we just need to move the saved file into the script_bin folder? Or do we need to do something with it prior to that.
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.4
Copyright ©2000 - 2009, 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 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382