1. Ok first you compile the latest revision of mangos by following this guide. up untiland folllow these directions instead.Now go into your src/bindings/scriptdev2 and compile same way as this (except without the tools>options part)
2. Go to "your source folder->ScriptDev2->scripts->custom" and place this file inside.
3. Now got to "your source folder->Scriptdev2" and open up "Makefile.am" with wordpad or notepad. Now scroll down until you see "scripts/custom/test.cpp". and add this line "scripts/custom/teleguy.cpp " without the quotes on a new line underneath. So it looks like:
Now save the file.Code:scripts/custom/custom_gossip_codebox.cpp scripts/custom/test.cpp scripts/custom/teleguy.cpp scripts/go/go_scripts.cpp
4. Now open ScriptMgr.cpp in your ScriptDev2 Folder with Visual Studio or w/e program you use.
Scroll down until you see:
Then add "extern void AddSC_teleguy();" without the quotes on a new line so it looks like this:Code:// -- Custom -- extern void AddSC_custom_example(); extern void AddSC_test();
Now scroll down until you see:Code:// -- Custom -- extern void AddSC_custom_example(); extern void AddSC_test(); extern void AddSC_teleguy();
And add this line "AddSC_teleguy();" without the quotes. So you have:Code:// -- Custom -- AddSC_custom_example(); AddSC_test();
Now save the file and exit.Code:// -- Custom -- AddSC_custom_example(); AddSC_test(); AddSC_teleguy();
6. Now we need to link up the build files:
Open scriptVC80.sln or scriptVC71.sln depending on your version of VS. In the browser on the left expand ScriptDev2, then Scripts, then custom. It should look like this:
Drag the teleguy.cpp from your ScriptDev2/scripts/custom folder and drop it into the custom folder in VC Studio (the folder in above pic).
7. Now in Configuration Manager change the build from Debug to Release. Then Build Solution.
Now In navicat run this query:
Now to spawn the teleporter type: ".npc add 99001"Code:INSERT INTO creature_template (`entry`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `baseattacktime`, `rangeattacktime`, `flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `class`, `race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `flag1`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `RacialLeader`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `ScriptName`) VALUES (99001, 18, 0, 18, 0, 'Teleporter, 'The Teleport Guy', NULL, 255, 255, 15000, 15000, 7500, 7500, 1, 35, 35, 1, 1.1, 1, 0, 100, 110, 0, 800, 2500, 2500, 0, 0, 0, 0, 0, 0, 0, 200, 250, 800, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 1, 0, 0, 'teleguy');
Props to Le Froid for the windows guide referenced in this guide.