I need to become somthign esle than a Lazy Leecher so i can search
Hello in here u will have Some GM Scripting Guides i Allready have made and Some new Ones to add Ok lets get Started
Already made Guides \/
How to make a GameObject Teleport you some were with out a spell > http://www.mmowned.com/forums/emulat...t-a-spell.html
[Guide] Making a Npc Talk [Scripting] > http://www.mmowned.com/forums/emulat...if-u-wont.html
And now here are some more GM Scripting Guides
--==Making any Instance need an Attunement==--
Ok first here is a Template to use for it \/
Eevrythign in red u need to change
How to use template look below
Code:
global InstanceName_Attunement_Check = function(plr)
{
if(plr.HasFinishedQuest(Quest Id) == 1 && plr.GetLevel() >= Requried Level)
{
plr.JoinInstance(MapID, x, y, z, o);
return 1;
}
plr.SendAreaTriggerMessage("The Message and Quest name and level u wont goes in here");
plr.BroadcastMessage(1,"The Message and Quest name and level u wont goes in here");
return 0;
};
this.RegisterAreaTriggerEvent(AreaTriggerId, InstanceName_Attunement_Check);
Step 1 : All the things in red is the things u need to put in your self
Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifyign it with Steps below
Step 3 : global InstanceName_Attunement_Check = function(plr) = The Name of your Instances (I am going to use Karazhan for this Guide)
Step 4 : if(plr.HasFinishedQuest(Quest Id) == 1 && plr.GetLevel() >= Requried Level) = The Id of the Quest u dont need that but it is better if u had it
To find Quest Ids look Below \/
How to find Quest Ids \/
Ok i would say use SQLyog for this so u can read the Names of the quest
Ok just go into your Database and find the Table called "quest" And in there just serch the names for the Quest u are looking for and when u find it u will see the Quest Id to the Far left called "entry"
Step 5 : if(plr.HasFinishedQuest(Quest Id) == 1 && plr.GetLevel() >= Requried Level) = The Requried Level to Enter the Instance, Eg. 40, 50, 60, 70
Step 6 : plr.JoinInstance(MapID, x, y, z, o);
Ok for u to find them u will need to go to the instance u Wont this Attument to be for and just run in and when u are in just press .gps
And what it gives you for Map Id, x, y, z, o Is what u put in there
Step 7 :
Code:
plr.SendAreaTriggerMessage("The Message and Quest name and level u wont goes in here");
plr.BroadcastMessage(1,"The Message and Quest name and level u wont goes in here");
return 0;
= Well it tells you but i will tell u again. Just put like for Karazhan i will use "You need to be in a Raid Group and Be level 70" or what ever, if your using a Quest tell the Quest name in there to
Step 8 : this.RegisterAreaTriggerEvent(AreaTriggerId, InstanceName_Attunement_Check); = The Area Trigger Id of that Instance. In most Servers when u enter an Area Trigger it will Tell u So when u Enter it will Tell you
Step 9 : this.RegisterAreaTriggerEvent(AreaTriggerId, InstanceName_Attunement_Check); = In here put what u put for "Step 3"
And now Naming it
Nameing it is the hard part well kinda not really. Now when your done Modifyign it go to File > Save as > and put it as all Files and call it like (If you are doign it for Karazhan i woulld call it Karazhan.gm) So like in "Step 3" The Name of your Instance just name it That and put a .gm at the end of it so it will be like " Karazhan.gm "
Saveing It : save it to your Desktop or some were u know were it is
Step 10 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/
C:\AC Web Ultimate Repack\Ascent\scripts
If u dont have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server
And then your Done
--==Making an NPC Spawn Another when it Dies==--
Ok now this is easy couse it is small
Ok Lets get started Remmber Change everythign that is in Red
Here is the Template \/
Code:
global NpcName_die = function()
{
x = .GetPositionX();
y = .GetPositionY();
z = .GetPositionZ();
.DeregisterTimer();
.SpawnMonster(NpcID to be spawnd, x, y, z);
};
.RegisterUnitEvent(NpcID, 4, NpcName_die);
Step 1 : All the things in red is the things u need to put in your self
Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifyign it with Steps below
Step 3 : global NpcName_die = function() = The Name of your Npc, Eg. (Slayer, Gnreed, Madiva)
Step 4 : .SpawnMonster(NpcID to be spawnd, x, y, z); = Ok here u will put the Npc Id of the Creature that you wont to be spawned when your other Npc Dies
Step 5 : .RegisterUnitEvent(NpcID, 4, NpcName_die); = The Npc Id of the Creature who is going to die befor the Other creature in "Step 4" is Spawned
Step 6 : .RegisterUnitEvent(NpcID, 4, NpcName_die); = The Name of your Chose in "Step 3"
And now Naming it
Nameing it is the hard part well kinda not really. Now when your done Modifyign it go to File > Save as > and put it as all Files and call it like (If you are doign it for npc Called Slayer i woulld call it Slayer.gm) So like in "Step 3" The Name of your NPC just name it That and put a .gm at the end of it so it will be like " Slayer.gm "
Saveing It : save it to your Desktop or some were u know were it is
Step 7 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/
C:\AC Web Ultimate Repack\Ascent\scripts
If u dont have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server
And then your Done
--==Making an Npc Cast a spell==--
Ok Lets get started Remmber Change everythign that is in Red
Here is the Template \/
Code:
global NpcName_stun = function()
{
plr = .GetClosestPlayer();
if(plr != null)
{
.CastSpellOnTarget(Spell Id, plr);
}
};
global NpcName_combat = function(mob)
{
.RegisterTimer(Time in Miller Seconds, NpcName_stun, 0);
.RegisterTimer(Time in Miller Seconds, NpcName_stun, 1);
};
.RegisterUnitEvent(NpcID, 1, NpcName_combat);
Step 1 : All the things in red is the things u need to put in your self
Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifyign it with Steps below
Step 3 : global NpcName_stun = function() = The Name of your Npc (Eg, Slayer)
Step 4 : .CastSpellOnTarget(Spell Id, plr); = The Spell Id of the spell u wont your Npc to cast (Look on Wowhead, Thottbot
Step 5 : global NpcName_combat = function(mob) = The same name u used in "Step 3"
Step 6 :
Code:
.RegisterTimer(Time in Miller Seconds, NpcName_stun, 0);
.RegisterTimer(Time in Miller Seconds, NpcName_stun, 1);
= For Time in Miller Seconds = The time in Miller seconds that the npc will cast that spell afetr he enters Combat (Eg. 100 ms = 10 Seconds / 1000 ms = 100 Seconds)
= for NpcName = The name u chose in "Step 3"
= 0 and 1 = The amount of times, so like 0 is the first time and 1 is the Second time u can keep added .RegisterTimer(Time in Miller Seconds, NpcName_stun, 0); And changed Tiem in Miller Seconds and the 0 Deppend on how long the figth is
Step 7 : .RegisterUnitEvent(NpcID, 1, NpcName_combat); = The Spawn Id of the Npc u wont to Cast the Spell
Step 8 : .RegisterUnitEvent(NpcID, 1, NpcName_combat); = The name u chose in "Step 3"
And now Naming it
Nameing it is the hard part well kinda not really. Now when your done Modifyign it go to File > Save as > and put it as all Files and call it like (If you are doign it for npc Called Slayer i woulld call it SlayerCast.gm) So like in "Step 3" The Name of your NPC just name it That and put a .gm at the end of it so it will be like " Slayer.gm "
Saveing It : save it to your Desktop or some were u know were it is
Step 9 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/
C:\AC Web Ultimate Repack\Ascent\scripts
If u dont have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server
And then your Done
--==Making a Npc Stealth (Fun little 1)==--
Ok Lets get started Remmber Change everythign that is in Red
Here is the Template \/
Code:
global stealthNpc = function(mob)
{
.CastSpell(1787);
};
.RegisterUnitEvent(Npc Id, 6, stealthNpc);
Step 1 : All the things in red is the things u need to put in your self
Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifyign it with Steps below
Step 3 : .RegisterUnitEvent(Npc ID, 6, stealthguards); = The Npc Spawn Id that is going to be Stealthed
And now Naming it
Nameing it is the hard part well kinda not really. Now when your done Modifyign it go to File > Save as > and put it as all Files and call it like (If you are doign it for npc Called Slayer i woulld call it Slayer.gm) So like in "Step 3" The Name of your NPC just name it That and put a .gm at the end of it so it will be like " Slayer.gm "
Saveing It : save it to your Desktop or some were u know were it is
Step 4 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/
C:\AC Web Ultimate Repack\Ascent\scripts
If u dont have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server
And then your Done
--==Teleporting GameObject==--
Ok i already have one of these but the other one is for races here is a littler 1 instead of all that other stuff
Ok Lets get started Remmber Change everythign that is in Red
Step 1: you need a Gameobject This is what u will have to do
Step 1 a : Open your Database and go to Gameobject_Names In there u will see the Following
Code:
entry Type DisplayID Name sound0 sound1 sound2 sound3 sound4 sound5 sound6 sound7 sound8 sound9 unknown1 unknown2 unknown3 unknown4 unknown5 unknown6 unknown7 unknown8 unknown9 unknown10 unknown11 unknown12 unknown13 unknown14
Ok all u will need to do for this is the
Code:
Entry, Type , DisplayID, and Name
Step 2 : In the Follow
Entry = The Spawn Id of your GameObject (Eg .go spawn (ID)
Type = The Type of Gameobject and this is going to be portal so the type will be 22
DisplayID = The Display ID of the Gameobject, Here is some Common Display ID \/
1327 = Summoning Portal
4393 = Darnassus
4396 = Stormwind
4394 = Ironforge
4398 = Undercity
4395 = Orgrimmar
4397 = Thunder Bluff
6956 = Silvermoon
6955 = Exodar
Name = The name of your Portal (Eg Portal to MAll, Portal to Arena) You should no
Ok now Once that is done u can leave all the other Things like Sound0 - 9 and unknow1 - 14 all at 0
here is an Easy Template for you
Code:
INSERT INTO `gameobject_names` (`entry`,`Type`,`DisplayID`,`Name`) VALUES ('Entry','Type','DisplayID','Name)
And now to making the Script
Here is the Template \/
Code:
global Name = function(plr)
{
.plr.Teleport(MapID, x, y, z);
};
// Player will transport "on use (click)"
.RegisterGameObjectEvent(Gameobject Id, 2, Name);
Step 3 : All the things in red is the things u need to put in your self
Step 4 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifyign it with Steps below
Step 5 : global Name = function(plr) = The Name of the Gameobject that is going to be portaling players
Step 6 : .plr.Teleport(MapID, x, y, z); = This is the easy part, Ok first the Map Id X Y and Z will be the location of were a Player will be sent after they have clicked on this Gameobject
So Find a Location u wont your players to be sent to and press .gps \/ And it tells you your Map Id, x, y, z All done next part
Step 7: .RegisterGameObjectEvent(Gameobject Id, 2, Name); = The Id of the Gameobject that will be portaling this Player that u did in "Step 2"
Step 8 : .RegisterGameObjectEvent(Gameobject Id, 2, Name); = The Name that you chose in "Step 5"
And now Naming it
Nameing it is the hard part well kinda not really. Now when your done Modifyign it go to File > Save as > and put it as all Files and call it like (If you are Portal to Orgrimmar i would Call it Orgrimmarport.gm) So like in "Step 5" The Name of your GameObject just name it That and put a .gm at the end of it so it will be like " Orgrimmarport.gm "
Saving Itt : save it to your Desktop or some were u know were it is
Step 9 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/
C:\AC Web Ultimate Repack\Ascent\scripts
If u dont have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server
And then your Done
--==Making a Npc Do a Emote When Complete Quest==--
Emote will be put on the Npc that the quest is on
And now to making the Script
Here is the Template \/
Code:
// The Quest Name
global QuestName_OnComplete = function(QuestGiver, plr)
{
QuestGiver.Emote(Emote ID);
};
.RegisterQuestEvent(Quest ID, 1, QuestName_OnComplete);
Step 1: All the things in red is the things u need to put in your self
Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifyign it with Steps below
Step 3 : // The Quest Name = The Name of the Quest you are going to be Putting this Emote on
Step 4 : global QuestName_OnComplete = function(QuestGiver, plr) = The Name of the Quest in "Step 3"
Step 5 : QuestGiver.Emote(Emote ID); = The Id of the Emote here is a big List of Emote Ids \/
Emote Ids Thanks to Gastricpenguin
This is a list of all of the NPC emotes used in the game :]
ONESHOT = Only happens once
STATE = Continuous
Code:
0 : ONESHOT_NONE
1 : ONESHOT_TALK(DNR)
2 : ONESHOT_BOW
3 : ONESHOT_WAVE(DNR)
4 : ONESHOT_CHEER(DNR)
5 : ONESHOT_EXCLAMATION(DNR)
6 : ONESHOT_QUESTION
7 : ONESHOT_EAT
10 : STATE_DANCE
11 : ONESHOT_LAUGH
12 : STATE_SLEEP
13 : STATE_SIT
14 : ONESHOT_RUDE(DNR)
15 : ONESHOT_ROAR(DNR)
16 : ONESHOT_KNEEL
17 : ONESHOT_KISS
18 : ONESHOT_CRY
19 : ONESHOT_CHICKEN
20 : ONESHOT_BEG
21 : ONESHOT_APPLAUD
22 : ONESHOT_SHOUT(DNR)
23 : ONESHOT_FLEX
24 : ONESHOT_SHY(DNR)
25 : ONESHOT_POINT(DNR)
26 : STATE_STAND
27 : STATE_READYUNARMED
28 : STATE_WORK
29 : STATE_POINT(DNR)
30 : STATE_NONE
33 : ONESHOT_WOUND
34 : ONESHOT_WOUNDCRITICAL
35 : ONESHOT_ATTACKUNARMED
36 : ONESHOT_ATTACK1H
37 : ONESHOT_ATTACK2HTIGHT
38 : ONESHOT_ATTACK2HLOOSE
39 : ONESHOT_PARRYUNARMED
43 : ONESHOT_PARRYSHIELD
44 : ONESHOT_READYUNARMED
45 : ONESHOT_READY1H
48 : ONESHOT_READYBOW
50 : ONESHOT_SPELLPRECAST
51 : ONESHOT_SPELLCAST
53 : ONESHOT_BATTLEROAR
54 : ONESHOT_SPECIALATTACK1H
60 : ONESHOT_KICK
61 : ONESHOT_ATTACKTHROWN
64 : STATE_STUN
65 : STATE_DEAD
66 : ONESHOT_SALUTE
68 : STATE_KNEEL
69 : STATE_USESTANDING
70 : ONESHOT_WAVE_NOSHEATHE
71 : ONESHOT_CHEER_NOSHEATHE
92 : ONESHOT_EAT_NOSHEATHE
93 : STATE_STUN_NOSHEATHE
94 : ONESHOT_DANCE
113 : ONESHOT_SALUTE_NOSHEATH
133 : STATE_USESTANDING_NOSHEATHE
153 : ONESHOT_LAUGH_NOSHEATHE
173 : STATE_WORK_NOSHEATHE
193 : STATE_SPELLPRECAST
213 : ONESHOT_READYRIFLE
214 : STATE_READYRIFLE
233 : STATE_WORK_NOSHEATHE_MINING
234 : STATE_WORK_NOSHEATHE_CHOPWOOD
253 : STATE_APPLAUD
254 : ONESHOT_LIFTOFF
273 : ONESHOT_YES(DNR)
274 : ONESHOT_NO(DNR)
275 : ONESHOT_TRAIN(DNR)
293 : ONESHOT_LAND
313 : STATE_AT_EASE
333 : STATE_READY1H
353 : STATE_SPELLKNEELSTART
373 : STATE_SUBMERGED
374 : ONESHOT_SUBMERGE
375 : STATE_READY2H
376 : STATE_READYBOW
377 : ONESHOT_MOUNTSPECIAL
378 : STATE_TALK
379 : STATE_FISHING
380 : ONESHOT_FISHING
381 : ONESHOT_LOOT
382 : STATE_WHIRLWIND
383 : STATE_DROWNED
384 : STATE_HOLD_BOW
385 : STATE_HOLD_RIFLE
386 : STATE_HOLD_THROWN
387 : ONESHOT_DROWN
388 : ONESHOT_STOMP
389 : ONESHOT_ATTACKOFF
390 : ONESHOT_ATTACKOFFPIERCE
391 : STATE_ROAR
392 : STATE_LAUGH
393 : ONESHOT_CREATURE_SPECIAL
Step 6 : .RegisterQuestEvent(Quest ID, 1, QuestName_OnComplete); = The Id of the Quest you wont your Emote to be played on the Npc Holding the Quest, How to find Quest's Ids look down \/
How to find Quest Ids \/
Ok i would say use SQLyog for this so u can read the Names of the quest
Ok just go into your Database and find the Table called "quest" And in there just serch the names for the Quest u are looking for and when u find it u will see the Quest Id to the Far left called "entry" And that is your Quest ID
Step 7 : .RegisterQuestEvent(Quest ID, 1, QuestName_OnComplete); = The Name of the Quest you put in "Step 3" And "Step 4"
And now Naming it
Nameing it is the hard part well kinda not really. Now when your done Modifyign it go to File > Save as > and put it as all Files and call it like (If you are Quest Called Beyond the Dark Portal i would Call it DarkPortal.gm) So like in "Step 3" The Name of your GameObject just name it That and put a .gm at the end of it so it will be like " DarkPortal.gm "
Saving It : save it to your Desktop or some were u know were it is
Step 8 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/
C:\AC Web Ultimate Repack\Ascent\scripts
If u dont have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server
And then your Done
--==Makeing a npc Move==--
And now to making the Script
Here is the Template \/
Code:
global Npc_Name = function(mob, plr)
{
mob.CreateCustomWaypointMap();
mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID);
mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID);
mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID);
mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID);
};
.RegisterQuestEvent(Npc ID, 6, Npc_Name);
Step 1: All the things in red is the things u need to put in your self
Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifyign it with Steps below
Step 3 : global Npc_Name = function(mob, plr) = The Name of your Npc that you are wonting to move
Step 4 : Ok now Here is kinda hard, Were the Npc is spawn it will use that Map Id for the x, y, z Etc
Step 5 : mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID); = The "X" Postion of were the Npc will move to
You can go to the Location of were you wont your Npc to move to and press ".gps" to find the X, Y, Z, O for the Steps, 5, 6, 7, and 8
Step 6 : mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID); = The "Y" Postion of were the Npc will move to
You can go to the Location of were you wont your Npc to move to and press ".gps" to find the X, Y, Z, O for the Steps, 5, 6, 7, and 8
Step 7 : mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID); = The "Z" Postion of were the Npc will move to
You can go to the Location of were you wont your Npc to move to and press ".gps" to find the X, Y, Z, O for the Steps, 5, 6, 7, and 8
Step 8 : mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID); = The "O" Postion of were the Npc will move to
You can go to the Location of were you wont your Npc to move to and press ".gps" to find the X, Y, Z, O for the Steps, 5, 6, 7, and 8
Step 9 : mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID); = The "waittime" in Miller Seconds that the Npc will wait on that Waypoint (Spot) Best to do 0 to just make the Npc keep on walking to the Next waypoint
Step 10 : mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID); = the Flag of how the Npc will get to that Waypoint, the Flag Id's \/
0 - Walk.
256 - Run.
768 - Fly.
Step 11 : mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID); = An integer value that sets the model ID of the unit at the waypoint. Use 0 to for the default model ID.
BTW once the Npc gets to the last Waypoint he / she will walk back to the first
" You can add more Waypoints by adding more "mob.CreateWaypoint(x, y, z, o, WaitTime, Flags, ModelID);"
Step 12 : .RegisterQuestEvent(Npc ID, 6, Npc_Name); = The Npc Spawn Id of the npc that you wont to Have walk around
Step 13 : .RegisterQuestEvent(Npc ID, 6, Npc_Name); = The Name of the Npc that you chose in "Step 3"
And now Naming it
Nameing it is the hard part well kinda not really. Now when your done Modifyign it go to File > Save as > and put it as all Files and call it like (If you are Npc Called Slayer i would Call it Slayer.gm) So like in "Step 3" The Name of your Npc just name it That and put a .gm at the end of it so it will be like " Slayer.gm "
Saving It : save it to your Desktop or some were u know were it is
Step 14 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/
C:\AC Web Ultimate Repack\Ascent\scripts
If u dont have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server
And then your Done
Btw this is all done by me Illidan1 No Copying this and plopping it some were else or ill chop your Head off
This will be updatad With more Scripting Guides So keep posted