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
(#61)
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
04-24-2008

Thanks man
Reply With Quote

Donate to remove ads.
(#62)
Old
Shredfire is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 1
Shredfire is an unknown quantity at this point
 
Posts: 5
Join Date: Apr 2008
04-25-2008

Hey Idk If i did it right, i did it correctly )= Mind checking over it for me, i am trying to get the manager Of the L70ETC to play the music when people comeinto range

Heres what i have for the script so far, And how do i do save this per say, as a Txt fial or something or do i use some specal program? Thanks i am a bit o a noob )=

Ps: If you can you think you could make the script itself for me i would very much appreate it, thanks (and yes i know i am a N00B)

MichaelSchweitzer_Playerinrange (pUnit, Event)
pUnit:PlaySoundToSet11803
end
RegisterUnitEvent (10000, 10, "MichaelSchweitzer_Playerinrange")
Reply With Quote
(#63)
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
04-26-2008

MichaelSchweitzer_Playerinrange (pUnit, Event)
pUnit:PlaySoundToSet(11803)
end
RegisterUnitEvent (10000, 10, "MichaelSchweitzer_Playerinrange")


You forgot Parentheses around 11803
Reply With Quote
(#64)
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-04-2008

How would I make an 'if' function that calls for a players faction when clicking on a gossip menu item? I am wanting to have the npc teach horde a certain spell and alliance a certain spell when clicked on.

Reply With Quote
(#65)
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-07-2008

Wait for my advanced guide that comes out next week
Reply With Quote
(#66)
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-09-2008

lol can't wait!

and couldn't wait actually... got the answer already, but I'll still be needing the advanced guide soon
Reply With Quote
(#67)
Old
Caedec's Avatar
Caedec is Offline
Contributor
Rep Power: 3
Reputation: 186
Caedec has a spectacular aura aboutCaedec has a spectacular aura about
 
Posts: 855
Join Date: Jul 2007
Location: Rawr.
05-10-2008

Quote:
Wait for my advanced guide that comes out next week
I shall not wait, this guide has made me become better and better in lua scripting i really thank you for this guide its the best i have seen out of all of them good guide.



You speak of justice? Of cowardice? I will show you the justice of the grave and the true meaning of fear.

Reply With Quote
(#68)
Old
Rotty's Avatar
Rotty is Offline
Master Sergeant
Rep Power: 2
Reputation: 9
Rotty is an unknown quantity at this point
 
Posts: 78
Join Date: Nov 2007
Location: Phantasmogoria
05-10-2008

Best Guide Ever! +rep
/sticky!



Last edited by Rotty; 05-10-2008 at 05:29 PM..
Reply With Quote
(#69)
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-10-2008

Alright, I finished my first script... I went to test it but either I'm not putting it in correctly or I made a mistake in the script. This is it anyways:

Code:
function Keleth_SendChatMessage (unit, Event)
    Unit:SendChatMessage(11, 0, "It seems that some classes are missing spells... Click on me to get them!")
end

function Keleth_MainMenu (unit, player)
    Unit:GossipCreateMenu(1228, player)
        Unit:GossipMenuAddItem(player, 4, "Teach me my spells!", 1, 0)
    player:GossipSendMenu()
end

function Keleth_OnGossipTalk (unit, event, player)
    Keleth_MainMenu(unit, player)
end

function Keleth_GetPlayerClass (unit, player)
    local id = Unit:GetPlayerClass()
end

function Keleth_OnGossipSelect (unit, event, player, id, intid, code)
    if(id == 11) then
        unit:LearnSpell(9634)
        unit:LearnSpell(40120)
        unit:LearnSpell(26996)
        unit:LearnSpell(33745)
        unit:LearnSpell(26999)
        unit:LearnSpell(26997)
        unit:LearnSpell(26998)
        unit:LearnSpell(8983)
        unit:LearnSpell(1066)
        player:GossipComplete()
    end
    if(intid == 3) then
        unit:LearnSpell(5149)
        unit:LearnSpell(883)
        unit:LearnSpell(2641)
        unit:LearnSpell(6991)
        unit:LearnSpell(982)
        unit:LearnSpell(1515)
        player:GossipComplete()
    end
    if(intid == 2) then
        unit:LearnSpell(20773)
        unit:LearnSpell(34767)
        unit:LearnSpell(23214)
        player:GossipComplete()
    end
    if(intid == 9) then
        unit:LearnSpell(688)
        unit:LearnSpell(697)
        unit:LearnSpell(712)
        unit:LearnSpell(691)
        unit:LearnSpell(23161)
        player:GossipComplete()
    end
    if(intid == 1) then
        unit:LearnSpell(2458)
        unit:LearnSpell(355)
        unit:LearnSpell(25275)
        unit:LearnSpell(71)
    end
end

RegisterUnitEvent(100000, 7, "Keleth_SendChatMessage")
RegisterGossipEvent(100000, 7, "Keleth_MainMenu")
RegisterGossipEvent(100000, 7, "Keleth_OnGossipTalk")
RegisterGossipEvent(100000, 7, "Keleth_GetPlayerClass")
RegisterGossipEvent(100000, 7, "Keleth_OnGossipSelect")
The purpose of the script is to get an npc that detects a player's class and gives any missing spells if there are any. So a warrior can click it and get his stances instead of having to do the quests. I don't have all of the missing stuff, so I'll add more when I get it finally working.

I am using SectorSeven's Blizzlike Repack v2. Server works fine, but I don't think I'm putting the code in correctly. It's saved under the lua folder, and I think lua is enabled.

Anyways, any help would be appreciated

Last edited by pachuco55; 05-11-2008 at 01:46 PM.. Reason: updated script x2
Reply With Quote
(#70)
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-12-2008

So does the script work or not? LUA is enabled in the core but it needs to be enabled in ascent-world configuration file.
Reply With Quote
(#71)
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-12-2008

When I used it on your server it didn't work. Right now I'm setting up on a new rev because my devs want me to try out some other stuff too... Did you have the added lua functions such as GossipCreateMenu and such? We had to get a patch for those, could be it. I'll get back to you if it works or not.
Reply With Quote
(#72)
Old
Aleski 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
Aleski is an unknown quantity at this point
 
Posts: 6
Join Date: Nov 2007
05-13-2008

sweet - Looks a bit complicated for me but keep up the good work
Reply With Quote
(#73)
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-14-2008

They do work. But Aleski this is as simple as it gets.
Reply With Quote
(#74)
Old
Power of Illuminati's Avatar
Power of Illuminati is Offline
Contributor
Rep Power: 2
Reputation: 177
Power of Illuminati has a spectacular aura aboutPower of Illuminati has a spectacular aura about
 
Posts: 1,391
Join Date: May 2008
Location: Pyramid of Anubis
05-14-2008

Nice guide S7, have you released your advanced lua guide yet? I'll be waiting on it
Reply With Quote
(#75)
Old
Shredfire is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 1
Shredfire is an unknown quantity at this point
 
Posts: 5
Join Date: Apr 2008
05-16-2008

Hey, me again >.< SectorSeven umm thanks for the help before but i still cant get it to work

MichaelSchweitzer_Playerinrange (pUnit, Event)
pUnit:PlaySoundToSet(11803)
end
RegisterUnitEvent (23988, 7, "MichaelSchweitzer_Playerinrange")

Thats the script....And i have it in a .lua file format so it should work i hoped.... but i cant figure out why its not working, and yes the server can run .lua files because of the fact we have scripted portals.

Ps: Like i said before i am trying to get the band manager of the L70ETC to play the music, at least when you click on him to talk which is type 7 if i am right and yet it seems to not work at all, thanks for any help you give me and the help earlyer intill then ill keep working on it...

Oh wait Nvm, I think i found a fix I forgot to add the Function to the top of it and that one little thing could screw it up i suppose....

Ps: Nope dident work...... Still doesent work WHY!!!!

Last edited by Shredfire; 05-16-2008 at 06:42 PM.. Reason: Possably A fix?
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