| | Emulator Server Guides Guides for working with World of Warcraft Emulator servers. Learn how to create a WoW Server here.
[NO QUESTIONS HERE] |  | | 
07-14-2009
|  | Contributor | | | Join Date: Oct 2007 Location: Earth...
Posts: 485
Reputation: 102 Level up: 52%, 438 Points needed |     | | Nice.
:O I already posted in this guide woops
Last edited by Hap-Ki-Do Master; 07-22-2009 at 12:54 AM.
| Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx. 
07-15-2009
|  | Knight-Champion | | | Join Date: Apr 2007 Location: In your head.
Posts: 480
Reputation: 35 Level up: 64%, 252 Points needed |     | | VERY nice, I read most of it and I'll finish it later, this may motivate me to make my server again.  x3 goes without saying. | 
08-04-2009
| | New User | | | Join Date: May 2008
Posts: 10
Reputation: 2 | | I've one question: Unit:RegisterEvent("Creature_CastSpell", 1000, 0(1))
What's 0 or 1, in the end. What's that for? I can't get it, help to noob please 
Btw nice guide, +rep
Edit: And one more, what's the difference between Unit and pUnit?
Last edited by Haldir; 08-04-2009 at 05:49 AM.
| 
08-04-2009
| | New User | | | Join Date: Jun 2008
Posts: 3
Reputation: 1 | | | does this tutorial really work? im sick of these fly by nights | 
08-04-2009
|  | Contributor | | | Join Date: Jun 2008 Location: can of duh
Posts: 102
Nominated 12 Times in 4 Posts Reputation: 102 Level up: 25%, 378 Points needed |  | | Quote:
Originally Posted by Haldir I've one question: Unit:RegisterEvent("Creature_CastSpell", 1000, 0(1))
What's 0 or 1, in the end. What's that for? I can't get it, help to noob please 
Btw nice guide, +rep
Edit: And one more, what's the difference between Unit and pUnit? | The 0/1 stands for how many times "Creature_CastSpell" will get called on.
If you put in 0, it will call "Creature_CastSpell" And execute any code within "Creature_CastSpell"s function every second, until stopped with the command (Unit:RemoveEvents()). If you put in a 1, it means it will only be called upon once, executing the code within "Creature_CastSpell" just once. If you change it to a 2, it will call upon the function twice. And so on. | 
08-05-2009
| | New User | | | Join Date: Aug 2009
Posts: 4
Reputation: 2 Level up: 11%, 359 Points needed | | | | Great repack! | 
08-05-2009
| | New User | | | Join Date: May 2008
Posts: 10
Reputation: 2 | | Thanks vision!!!!  x2 | 
08-05-2009
|  | Master Sergeant | | | Join Date: Jun 2009
Posts: 84
Reputation: 13 Level up: 55%, 181 Points needed |  | | Thank you!
Amazing detailed guide | 
08-05-2009
| | New User | | | Join Date: May 2008
Posts: 10
Reputation: 2 | | | Eh, need help again..
I want to spawn 3 npcs and then make them move to X Y Z coords, each npc will have its own coords. Can someone tell me how to do it? I know how to spawn, but don't know how to make them move not together.
I've no idea how to do it, please help somebody. If i'll do it like this, will it work or not?
function Spawn(Unit1,Unit2,Unit3, Event)
Unit1:SpawnCreature(NPCID,X,Y,Z,O,FactionID,duratation)
Unit2:SpawnCreature(NPCID,X,Y,Z,O,FactionID,duratation)
Unit3:SpawnCreature(NPCID,X,Y,Z,O,FactionID,duratation)
Unit1:MoveTo(X,Y,Z,O)
Unit2:MoveTo(X,Y,Z,O)
Unit3:MoveTo(X,Y,Z,O)
Last edited by Haldir; 08-05-2009 at 09:31 AM.
| 
08-06-2009
|  | Contributor | | | Join Date: Mar 2008 Location: On uranus
Posts: 797
Reputation: 237 Level up: 7%, 1,033 Points needed |     | | I think you need to have Another npc that spawns them, you can also have an item. But then youd have to go ingame.
To the place where you want the minions to spawn. And write .gps and then use that info. Quote:
local Unit1 = ID -- Put ID's for the units on these 'locals'
local Unit2 = ID
local Unit3 = ID
function despawn(Unit, Event)
pUnit = ID -- This is the ID for the npc that spawns creatures.
x = pUnit:GetX() -- Gets the X where the npc stands.
y = pUnit:GetY() -- Gets the Y where the npc stands.
z = pUnit:GetZ() -- Gets the Z where the npc stands.
o = pUnit:GetO() -- Gets the O where the npc stands.
pUnit:RegisterEvent("Next_Step", 1, 0) -- New event
end
function Next_Step(Unit, Event)
pUnit:SpawnCreature(Unit1, x + 4, y, z, o, Faction, Duration) -- Spawns creature at the same position as the summon npc, only +4 x
pUnit:SpawnCreature(Unit2, x + 7, y, z, o, Faction, Duration) -- Spawns creature at the same position as the summon npc, only +7 x
pUnit:SpawnCreature(Unit3, x + 1, y, z, o, Faction, Duration) -- Spawns creature at the same position as the summon npc, only +1 x
pUnit:despawn() -- Despawns the summon npc.
end
| Hope this works. 
Good guide, mate. Im reading it now. ^^ Ill be repping you later.
Last edited by -Jebus Fist-; 08-06-2009 at 05:23 AM.
| 
08-06-2009
| | New User | | | Join Date: May 2008
Posts: 10
Reputation: 2 | | | Thx jebus, +rep | 
08-06-2009
| | New User | | | Join Date: May 2008
Posts: 10
Reputation: 2 | | | Oh, and how to make them move in diff spots? | 
08-06-2009
|  | Contributor | | | Join Date: Mar 2008 Location: On uranus
Posts: 797
Reputation: 237 Level up: 7%, 1,033 Points needed |     | | This script will only make the npc move from its current position.
Change the red. You can change it to like.
pUnit = MoveTo(x + 5, y - 5, z, o) Code: function Move(Unit, Event)
pUnit = ID -- The id of the creature you want to move
x = pUnit:GetX() -- Gets the X where the npc stands.
y = pUnit:GetY() -- Gets the Y where the npc stands.
z = pUnit:GetZ() -- Gets the Z where the npc stands.
o = pUnit:GetO() -- Gets the O where the npc stands.
pUnit = MoveTo(x, y, z, o)
end
| 
08-11-2009
| | New User | | | Join Date: Dec 2008
Posts: 81
Reputation: 4 Level up: 1%, 495 Points needed |  | | | This is great, Thanks!
also, +rep ! | 
08-12-2009
|  | Lieutenant Commander | | | Join Date: Apr 2007
Posts: 626
Reputation: 51 Level up: 25%, 527 Points needed |     | | | More and more lua guides popping up but i like this one!
It's massive and colorful.
+rep
__________________ Server ad's in sigs have to be approved by an admin. |  | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -4. The time now is 04:27 PM. |