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 ...Code:case 27: //Tailoring { Plr->Gossip_SendPOI(-4711.54, -12386.7, 6, 6, 0, "Odesyus' Landing, Tailor"); SendQuickMenu(2593); }break; } } }; THIS IS WHERE THE CODE WILL BE 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 ...
<-----These are the declerations and all + the first menu its gonna show ...Code:class SCRIPT_DECL Warper : public GossipScript { public: ADD_GOSSIP_FACTORY_FUNCTION(Warper); 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); }
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 Warper : public GossipScript { public: ADD_GOSSIP_FACTORY_FUNCTION(Warper); void GossipHello(Creature * pCreature, Player * Plr, bool AutoSend) { GossipMenu *Menu; objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 2593, Plr); Menu->AddItem(0, "Main Citie's", 1); THIS IS HOW U LINK ITEMS WITH FUNCTIONS if(AutoSend) Menu->SendTo(Plr); } void GossipSelectOption(Creature* pCreature, Player* Plr, uint32 Id, uint32 IntId)DECLARING THE SELECT MENU { GossipMenu * Menu; switch(IntId) { case 1:THIS IS HOW U LINK ITEMS WITH FUNCTIONS { objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 2593, Plr);DECLARES THIS CASES MENU if (Plr->GetTeam() < 1) DESTINGUISHES BETWEEN HORDE/ALLIANCE { Menu->AddItem(2, "Stormwind", 2); *AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* Menu->AddItem(2, "Ironforge", 3); *AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* Menu->AddItem(2, "Exodar", 4); *AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* Menu->AddItem(2, "Darnassus", 5); *AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* } else { Menu->AddItem(2, "Orgrimar", 6);*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* Menu->AddItem(2, "Thunder Bluff", 7);*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* Menu->AddItem(2, "Silvermoon City", 8);*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* Menu->AddItem(2, "Undercity", 9);*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* } Menu->SendTo(Plr);SENDS THE MENU TO THE PLAYER!!! NB!!! }break; case 5:*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* { Plr->EventTeleport(0, -8831.61, 622.666, 93.7787); Plr->Gossip_Complete(); }break; case 6:*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* { Plr->EventTeleport(0, -4804.45, -1101.14, 498.807); Plr->Gossip_Complete(); }break; case 7:*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* { Plr->EventTeleport(530, -3796.24, -11710.9, -105.45); Plr->Gossip_Complete(); }break; case 8:*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* { Plr->EventTeleport(1, 9952.07, 2278.46, 1341.39); Plr->Gossip_Complete(); }break; case 9:*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* { Plr->EventTeleport(1, 1499.55, -4406.91, 23.1642); Plr->Gossip_Complete(); }break; case 10:*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* { Plr->EventTeleport(1, -1195.88, -56.5582, 160.034); Plr->Gossip_Complete(); }break; case 11:*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* { Plr->EventTeleport(530, 9492.45, -7279.12, 14.3036); Plr->Gossip_Complete(); }break; case 12:*AGAIN LINKS AN ITEM WITH A CASE AND FUNCTION* { Plr->EventTeleport(0, 1615.1, 239.786, -62.0774); Plr->Gossip_Complete(); }break; } } }; THIS FINISHES OFF THE WARPER CODE
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 :D (remember to put it on release and not debug :D)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 mgr->register_gossip_script(8000004, &Warper::Create); JUST ADD THIS LINE LINKING THE NPC WITH THE FUNCTION :D // NEUTRAL TP
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 :D ....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);
e.g. :
then all you have to do is import an NPC with flags set 2 1 and ID being 1000005 :DCode:mgr->register_gossip_script(1000005,&Warper::Create); TO REG NPC ID 1000005 TO THE SCRIPT ...
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 HERE is the link :D for the DLLCode: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);
HOPE THIS HELPED SOME PPL :D
MIZUKI


Reply With Quote![[HowTo]Make a Warper NPC](http://ragezone.com/hyper728.png)


