No problem and miniko give me the error. I have a feeling it has something to do with the ' in Thor'Maz, since lua will interpret that wierd.
No problem and miniko give me the error. I have a feeling it has something to do with the ' in Thor'Maz, since lua will interpret that wierd.
can some one help me??????how do im set the display id the and the level?of the mob
unit:SetLevel(Level)
unit:SetModel(Displayid)
I created a mob called Syndicate Magi. Now I've made this script:
function SyndicateMagi_onCombat (pUnit, Event)
pUnit:CastSpell(38692, pUnit:GetRandomPlayer(0))
end
RegisterUnitEvent(700700, 10, "SyndicateMagi_onCombat")
There must be something wrong, because the mob doesn't cast any spells, it just attacks with melee. I want it to cast fireball when a player gets in it's range. Is there anything wrong?
No 0 needed.
pUnit:CastSpell(38692, pUnit:GetRandomPlayer())
You want OnCombat right? thats a 1 not a 10
RegisterUnitEvent(700700, 1, "SyndicateMagi_onCombat")
Still not working... I have enabled the Ascent - world.conf stuff and got ascent repack 7.7. Some of my Instances were scripted before I got it and they are working...
Try player:CastSpell
How does lua work with mangos? in my mangos folder I do not have a scripts folder or a scripts_bin folder... do I make them and download what I need? I understand the actual code better from your guide, but I have no clue on how to use the scripts I made with mangos...
+1 rep that I can give though![]()
lua doesn't work with MaNGOS, your emulator has to have the Lua engine in it and MaNGOS doesn't, only Ascent.
Awesome guide, really helps with creating events and such. Had to rewrite a lot of it to make it more understandable though, but great guide none the less!
gr8 guidei didnt now anything about LUA be4 i readed this +Rep
Hi body, im spanish, so sorry mi bad english!, i got a problem!, i made this:
function Anunciador_Player_Enters_Range (pUnit, Event)
pUnit:SendChatMessage(0, 0, "Hola soy un robot")
end
RegisterUnitEvent (120000, 10, "Anunciador_Player_Enters_Range")
But, when i enter in the game, i spawn the npc number 120000, and appears, but, they didnt come to me when i enter in the player area, and he never speak, and nothing, is just a useles npc standing. Can u please help me?
Thank u so much!
ahh, and one last question, i just have to put the filename.lua in my sript dir?, i dont need no sql or something like that?. Thank u bro!
Great guide mateReally helped me
I wish I would +Rep you /cry
Ugh there's 1 more thing .... I dont understand how to register the scrip or something like that .. I got the script in my Lua folder but it doesnt work .. did i miss something ??
Last edited by virgil85; 07-12-2008 at 03:37 PM.
Thanks alot for the guide, helped me, i scripted a boss in 20 min.
And its first time. Alot of thanks to you.
Now more details, like building phases on mobs.
for instance: Phase 1 Normal dmg etc. Phase 2 (50%hp left) He gets enraged, and stuff like that. Thanks alot<33333