Thanks man![]()
Thanks man![]()
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")
MichaelSchweitzer_Playerinrange (pUnit, Event)
pUnit:PlaySoundToSet(11803)
end
RegisterUnitEvent (10000, 10, "MichaelSchweitzer_Playerinrange")
You forgot Parentheses around 11803![]()
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.
![]()
Wait for my advanced guide that comes out next week![]()
lol can't wait!
and couldn't wait actually... got the answer already, but I'll still be needing the advanced guide soon![]()
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.Wait for my advanced guide that comes out next week
Best Guide Ever! +rep
/sticky!
Last edited by Rotty; 05-10-2008 at 03:29 PM.
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:
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.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")
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 11:46 AM. Reason: updated script x2
So does the script work or not? LUA is enabled in the core but it needs to be enabled in ascent-world configuration file.
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.
sweet- Looks a bit complicated for me but keep up the good work
They do work. But Aleski this is as simple as it gets.
Nice guide S7, have you released your advanced lua guide yet? I'll be waiting on it+Rep
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 04:42 PM. Reason: Possably A fix?