- Joined
- Jun 22, 2007
- Messages
- 276
- Reaction score
- 0
OK! ... this is my WARPER NPC guide .. now first things you guise'l have ta know is,
1. You need C++ knowledge for this.**Or ya can copy my stuff xD**
2. You need visual studio C++ 2005 with SDK addons or Visual Studio 2003.NET proffessional ... (please google this im not supplying links ...)
3. ... Erm ... thats it ... !
***************
*STARTING!*
***************
STEP 1 :
Ok first you go into your Ascent source code ... go into the scripts source ... Im just gonna shoiw u how to integrate it into your original gossip scripts ...
coz making a standalone DLL ... is a lil bit more complicated ... not enough time to explain that now ...
the scripts should be in *ascent_source*/src/scripts/ ... here you just open the project file (scripts2005.sln or scripts2003.sln depending on your version) ...
STEP 2 :
ok now that ur in there open up GuardGossip.cpp thats where ima make the warp npc ...
Now ... ima make the warp NPC right @ the end ... after evrything but before the declerations ....
P.S : this part is right @ the bottom ...
MAKE VERY SURE YOU DONT OVERWRITE ANYTHING!!!
ok ... STEP 3 :
Here we will make the actual script ...
<-----These are the declerations and all + the first menu its gonna show ...
THE LINES IN GREEN ARE MY COMMENT ,,, DONT ADD IT 2 THE WARPER SCRIPT !!!
RED LINES ARE IMPORTANT SO PAY ATTENTION!!!
So thats the warper code and how ur final product should look like ... BUT WAIT ...
You still have to link it to an NPC in the DB ... so here goes right after that code if ya did it correctly ... you should see this ....
NOW ... Press F7 to compile and THERE U GO! ... the new gossipscripts DLL should be in the release file
(remember to put it on release and not debug
)
Now you still need an NPC heres the one I made ... just import it ...
You can add more warper NPC's by adding the NPC's ID to the declerations
....
e.g. :
then all you have to do is import an NPC with flags set 2 1 and ID being 1000005
thats it ... heres the link to this exact script (WORKS!) Just copy the Dll file into your script_bin folder ... YES over write the old gossip scripts ...(Just make a backup of it incase its incompatible (very old revs wont work))
Heres the NPC's SQL that u have to inport ...
And
for the DLL
HOPE THIS HELPED SOME PPL
MIZUKI
1. You need C++ knowledge for this.**Or ya can copy my stuff xD**
2. You need visual studio C++ 2005 with SDK addons or Visual Studio 2003.NET proffessional ... (please google this im not supplying links ...)
3. ... Erm ... thats it ... !
***************
*STARTING!*
***************
STEP 1 :
Ok first you go into your Ascent source code ... go into the scripts source ... Im just gonna shoiw u how to integrate it into your original gossip scripts ...
coz making a standalone DLL ... is a lil bit more complicated ... not enough time to explain that now ...
the scripts should be in *ascent_source*/src/scripts/ ... here you just open the project file (scripts2005.sln or scripts2003.sln depending on your version) ...
STEP 2 :
ok now that ur in there open up GuardGossip.cpp thats where ima make the warp npc ...
Now ... ima make the warp NPC right @ the end ... after evrything but before the declerations ....
Code:
case 27: //Tailoring
{
Plr->Gossip_SendPOI(-4711.54, -12386.7, 6, 6, 0, "Odesyus' Landing, Tailor");
SendQuickMenu(2593);
}break;
}
}
};
[color=red]THIS IS WHERE THE CODE WILL BE[/color]
void SetupGuardGossip(ScriptMgr * mgr)
{
/* Guard List */
mgr->register_gossip_script(1423, &GoldshireGuard::Create); // Stormwind Guard
mgr->register_gossip_script(68, &StormwindGuard::Create); // Stormwind City Guard
mgr->register_gossip_script(1976, &StormwindGuard::Create); // Stormwind City Patroller
mgr->register_gossip_script(4262, &DarnassusGuard::Create); // Darnassus Sentinel
MAKE VERY SURE YOU DONT OVERWRITE ANYTHING!!!
ok ... STEP 3 :
Here we will make the actual script ...
Code:
class SCRIPT_DECL [color=red]Warper[/color] : public GossipScript
{
public:
ADD_GOSSIP_FACTORY_FUNCTION([color=red]Warper[/color]);
void GossipHello(Creature * pCreature, Player * Plr, bool AutoSend)
{
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 2593, Plr);
Menu->AddItem(0, "Main Citie's", 1);
if(AutoSend)
Menu->SendTo(Plr);
}
<-----These are the declerations and all + the first menu its gonna show ...
THE LINES IN GREEN ARE MY COMMENT ,,, DONT ADD IT 2 THE WARPER SCRIPT !!!
RED LINES ARE IMPORTANT SO PAY ATTENTION!!!
Code:
class SCRIPT_DECL [color=red]Warper[/color] : public GossipScript
{
public:
ADD_GOSSIP_FACTORY_FUNCTION([color=red]Warper[/color]);
void GossipHello(Creature * pCreature, Player * Plr, bool AutoSend)
{
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 2593, Plr);
Menu->AddItem(0, "Main Citie's", [color=red]1[/color]); [color=green]THIS IS HOW U LINK ITEMS WITH FUNCTIONS[/color]
if(AutoSend)
Menu->SendTo(Plr);
}
void GossipSelectOption(Creature* pCreature, Player* Plr, uint32 Id, uint32 IntId)[color=green]DECLARING THE SELECT MENU[/color]
{
GossipMenu * Menu;
switch(IntId)
{
case [color=red]1[/color]:[color=green]THIS IS HOW U LINK ITEMS WITH FUNCTIONS[/color]
{
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 2593, Plr);[color=green]DECLARES THIS CASES MENU[/color]
if (Plr->GetTeam() < 1) [color=green]DESTINGUISHES BETWEEN HORDE/ALLIANCE[/color]
{
Menu->AddItem(2, "Stormwind", 2); [color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
Menu->AddItem(2, "Ironforge", 3); [color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
Menu->AddItem(2, "Exodar", 4); [color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
Menu->AddItem(2, "Darnassus", 5); [color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
}
else
{
Menu->AddItem(2, "Orgrimar", 6);[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
Menu->AddItem(2, "Thunder Bluff", 7);[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
Menu->AddItem(2, "Silvermoon City", 8);[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
Menu->AddItem(2, "Undercity", 9);[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
}
Menu->SendTo(Plr);[color=green]SENDS THE MENU TO THE PLAYER!!! NB!!![/color]
}break;
case 5:[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
{
Plr->EventTeleport(0, -8831.61, 622.666, 93.7787);
Plr->Gossip_Complete();
}break;
case 6:[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
{
Plr->EventTeleport(0, -4804.45, -1101.14, 498.807);
Plr->Gossip_Complete();
}break;
case 7:[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
{
Plr->EventTeleport(530, -3796.24, -11710.9, -105.45);
Plr->Gossip_Complete();
}break;
case 8:[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
{
Plr->EventTeleport(1, 9952.07, 2278.46, 1341.39);
Plr->Gossip_Complete();
}break;
case 9:[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
{
Plr->EventTeleport(1, 1499.55, -4406.91, 23.1642);
Plr->Gossip_Complete();
}break;
case 10:[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
{
Plr->EventTeleport(1, -1195.88, -56.5582, 160.034);
Plr->Gossip_Complete();
}break;
case 11:[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
{
Plr->EventTeleport(530, 9492.45, -7279.12, 14.3036);
Plr->Gossip_Complete();
}break;
case 12:[color=green]*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION*[/color]
{
Plr->EventTeleport(0, 1615.1, 239.786, -62.0774);
Plr->Gossip_Complete();
}break;
}
}
}; [color=green]THIS FINISHES OFF THE WARPER CODE[/color]
So thats the warper code and how ur final product should look like ... BUT WAIT ...
You still have to link it to an NPC in the DB ... so here goes right after that code if ya did it correctly ... you should see this ....
Code:
void SetupGuardGossip(ScriptMgr * mgr)
{
/* Guard List */
mgr->register_gossip_script(1423, &GoldshireGuard::Create); // Stormwind Guard
mgr->register_gossip_script(68, &StormwindGuard::Create); // Stormwind City Guard
mgr->register_gossip_script(1976, &StormwindGuard::Create); // Stormwind City Patroller
mgr->register_gossip_script(4262, &DarnassusGuard::Create); // Darnassus Sentinel
mgr->register_gossip_script(5624, &UndercityGuard::Create); // Undercity Guardian
mgr->register_gossip_script(3571, &DolanaarGuard::Create); // Teldrassil Sentinel
mgr->register_gossip_script(16222, &SilvermoonGuard::Create); // Silvermoon City Guardian
mgr->register_gossip_script(16733, &ExodarGuard::Create); // Exodar Peacekeeper
mgr->register_gossip_script(20674, &ExodarGuard::Create); // Shield of Velen
mgr->register_gossip_script(3296, &OrgrimmarGuard::Create); // Orgrimmar Grunt
mgr->register_gossip_script(3084, &ThunderbluffGuard::Create); // Bluffwatcher
mgr->register_gossip_script(3222, &BloodhoofGuard::Create); // Brave Wildrunner
mgr->register_gossip_script(3224, &BloodhoofGuard::Create); // Brave Cloudmane
mgr->register_gossip_script(3220, &BloodhoofGuard::Create); // Brave Darksky
mgr->register_gossip_script(3219, &BloodhoofGuard::Create); // Brave Leaping Deer
mgr->register_gossip_script(3217, &BloodhoofGuard::Create); // Brave Dawneagle
mgr->register_gossip_script(3215, &BloodhoofGuard::Create); // Brave Strongbash
mgr->register_gossip_script(3218, &BloodhoofGuard::Create); // Brave Swiftwind
mgr->register_gossip_script(3221, &BloodhoofGuard::Create); // Brave Rockhorn
mgr->register_gossip_script(3223, &BloodhoofGuard::Create); // Brave Rainchaser
mgr->register_gossip_script(3212, &BloodhoofGuard::Create); // Brave Ironhorn
mgr->register_gossip_script(5953, &RazorHillGuard::Create); // Razor Hill Grunt
mgr->register_gossip_script(5725, &BrillGuard::Create); // Deathguard Lundmark
mgr->register_gossip_script(1738, &BrillGuard::Create); // Deathguard Terrence
mgr->register_gossip_script(1652, &BrillGuard::Create); // Deathguard Burgess
mgr->register_gossip_script(1746, &BrillGuard::Create); // Deathguard Cyrus
mgr->register_gossip_script(1745, &BrillGuard::Create); // Deathguard Morris
mgr->register_gossip_script(1743, &BrillGuard::Create); // Deathguard Lawrence
mgr->register_gossip_script(1744, &BrillGuard::Create); // Deathguard Mort
mgr->register_gossip_script(1496, &BrillGuard::Create); // Deathguard Dillinger
mgr->register_gossip_script(1742, &BrillGuard::Create); // Deathguard Bartholomew
mgr->register_gossip_script(5595, &IronforgeGuard::Create); // Ironforge Guard
mgr->register_gossip_script(727, &KharanosGuard::Create); // Ironforge Mountaineer
mgr->register_gossip_script(16221,&FalconwingGuard::Create); // Silvermoon Guardian
mgr->register_gossip_script(18038,&AzureWatchGuard::Create); // Azuremyst Peacekeeper
[color=red]mgr->register_gossip_script(8000004, &Warper::Create);[/color] [color=green]JUST ADD THIS LINE LINKING THE NPC WITH THE FUNCTION :D [/color] // NEUTRAL TP
NOW ... Press F7 to compile and THERE U GO! ... the new gossipscripts DLL should be in the release file


Now you still need an NPC heres the one I made ... just import it ...
Code:
INSERT INTO creature_names
(entry, creature_name, Subname, Flags1, type, Family, Rank, unk4, SpellDataID, male_displayid, female_displayid, unknown_int1, unknown_int2, unknown_float1, unknown_float2, Civilian, Leader)
VALUES
(8000004, "Teleporter", "WARPER", 0, 1, 0, 1, 0, 0, 15302, 0, 0, 0, 1, 1, 0, 0);
INSERT INTO creature_proto
(entry, minlevel, maxlevel, faction, minhealth, maxhealth, mana, scale, npcflags, attacktime, mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage, mountdisplayid, item1slotdisplay, item1info1, item1info2, item2slotdisplay, item2info1, item2info2, item3slotdisplay, item3info1, item3info2, respawntime, resistance0_armor, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, combat_reach, bounding_radius, auras, boss, money, invisibility_type, death_state, walk_speed, run_speed, fly_speed, extra_a9_flags)
VALUES
(8000004, 100, 100, 35, 50000, 50000, 50000, 1, 1, 1000, 500, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120000, 0, 100, 100, 100, 100, 100, 100, 0, 0, 0, 1, 100000000, 0, 0, 2.5, 8, 14, 0);
You can add more warper NPC's by adding the NPC's ID to the declerations

e.g. :
Code:
mgr->register_gossip_script(1000005,&Warper::Create); [color=green]TO REG NPC ID 1000005 TO THE SCRIPT ...[/color]

thats it ... heres the link to this exact script (WORKS!) Just copy the Dll file into your script_bin folder ... YES over write the old gossip scripts ...(Just make a backup of it incase its incompatible (very old revs wont work))
Heres the NPC's SQL that u have to inport ...
Code:
INSERT INTO creature_names
(entry, creature_name, Subname, Flags1, type, Family, Rank, unk4, SpellDataID, male_displayid, female_displayid, unknown_int1, unknown_int2, unknown_float1, unknown_float2, Civilian, Leader)
VALUES
(8000004, "Teleporter", "WARPER", 0, 1, 0, 1, 0, 0, 15302, 0, 0, 0, 1, 1, 0, 0);
INSERT INTO creature_proto
(entry, minlevel, maxlevel, faction, minhealth, maxhealth, mana, scale, npcflags, attacktime, mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage, mountdisplayid, item1slotdisplay, item1info1, item1info2, item2slotdisplay, item2info1, item2info2, item3slotdisplay, item3info1, item3info2, respawntime, resistance0_armor, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, combat_reach, bounding_radius, auras, boss, money, invisibility_type, death_state, walk_speed, run_speed, fly_speed, extra_a9_flags)
VALUES
(8000004, 100, 100, 35, 50000, 50000, 50000, 1, 1, 1000, 500, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120000, 0, 100, 100, 100, 100, 100, 100, 0, 0, 0, 1, 100000000, 0, 0, 2.5, 8, 14, 0);
And
To view the content, you need to sign in or register
is the link 
HOPE THIS HELPED SOME PPL

MIZUKI
Last edited: