[Ascent][HELP]C++ Correct Me if Im Wrong

Results 1 to 13 of 13
  1. #1
    Member Knifey is offline
    MemberRank
    Dec 2007 Join Date
    53Posts

    [Ascent][HELP]C++ Correct Me if Im Wrong

    #include "StdAfx.h"
    #include "Setup.h"


    class SCRIPT_DECL Warper : public GossipScript
    {
    public:
    void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
    void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
    void GossipEnd(Object * pObject, Player* Plr);
    void Destroy()
    {
    delete this;
    }
    };
    void Warper::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
    {
    GossipMenu *Menu;
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(0, "Alliance Cities", 2);
    Menu->AddItem(1, "Horde Cities", 1);
    Menu->AddItem(4, "Azeroth Instances", 30);
    Menu->AddItem(5, "Outland Locations", 3);
    Menu->AddItem(6, "Outland Instances", 50);
    Menu->AddItem(7, "Shattrath", 20);
    Menu->AddItem(8, "Gurubashi Arena", 21);
    Menu->AddItem(9, "Make This Place Your Home", 95);
    Menu->AddItem(11, "Remove Resurrection Sickness", 97);

    if(AutoSend)
    Menu->SendTo(Plr);
    }

    void Warper::GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
    Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
    if(pCreature==NULL)
    return;

    GossipMenu * Menu;
    switch(IntId)
    {
    case 0: // Return to start
    GossipHello(pObject, Plr, true);
    break;

    case 1: // Horde
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Silvermoon", 4);
    Menu->AddItem(5, "Orgrimmar", 5);
    Menu->AddItem(5, "Thunderbluff", 6);
    Menu->AddItem(5, "UnderCity", 7);
    Menu->AddItem(5, "Ratchet", 8);
    Menu->AddItem(5, "Booty Bay", 9);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;


    case 2: // Alliance
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(5, "The Exodar", 8);
    Menu->AddItem(5, "Stormwind", 9);
    Menu->AddItem(5, "Ironforge", 10);
    Menu->AddItem(5, "Darnassus", 11);
    Menu->AddItem(5, "Ratchet", 12);
    Menu->AddItem(5, "Booty Bay", 13);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;

    case 3: // Outland
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Hellfire Peninsula", 12);
    Menu->AddItem(5, "Zangermarsh", 13);
    Menu->AddItem(5, "Nagrand", 14);
    Menu->AddItem(5, "Blades Edge Mountains", 15);
    Menu->AddItem(5, "Netherstorm", 16);
    Menu->AddItem(5, "Terokkar Forest", 17);
    Menu->AddItem(5, "Shadowmoon Valley", 18);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;

    //
    // Horde
    //

    case 4://Silvermoon
    {
    Plr->EventTeleport(530, 9400.486328, -7278.376953, 14.206780);

    }
    break;

    case 5://Orgrimmar
    {
    Plr->EventTeleport(1, 1371.068970, -4370.801758, 26.052483);
    }
    break;

    case 6://ThunderBluff
    {
    Plr->EventTeleport(1, -1304.569946, 205.285004, 68.681396);
    }
    break;

    case 7://UnderCity
    {
    Plr->EventTeleport(0, 2050.203125, 285.650604, 56.994549);
    }
    break;

    case 8://Ratchet
    {
    Plr->EventTeleport(0 -14406.6 419.353 22.3907);
    }break;

    case 9://Booty Bay
    {
    Plr->EventTeleport(1 -943.935 -3715.49 11.8385);
    }break;


    //
    // Alliance
    //

    case 8: //Exodar
    {
    Plr->EventTeleport(530, -4072.202393, -12014.337891, -1.277277);
    }
    break;

    case 9: //Stormwind
    {
    Plr->EventTeleport(0, -9100.480469, 406.950745, 92.594185);
    }
    break;

    case 10: //Ironforge
    {
    Plr->EventTeleport(0, -5028.265137, -825.976563, 495.301575);
    }
    break;

    case 11: //Darnassus
    {
    Plr->EventTeleport(1, 9985.907227, 1971.155640, 1326.815674);
    }
    break;

    case 12://Ratchet
    {
    Plr->EventTeleport(0 -14406.6 419.353 22.3907);
    }break;

    case 13://Booty Bay
    {
    Plr->EventTeleport(1 -943.935 -3715.49 11.8385);
    }break;

    ////////////////
    // Outland Menu
    ////////

    case 12: //Hellfire Peninsula
    {
    Plr->EventTeleport(530, -248.160004, 922.348999, 84.379799);
    }
    break;

    case 13: //Zangermarsh
    {
    Plr->EventTeleport(530, -225.863632, 5405.927246, 22.346397);
    }
    break;

    case 14: //Nagrand
    {
    Plr->EventTeleport(530, -468.232330, 8418.666016, 28.031298);

    }
    break;

    case 15: //Blades Edge Mountains
    {
    Plr->EventTeleport(530, 1471.672852, 6828.047852, 107.759239);

    }
    break;

    case 16: //Netherstorm
    {
    Plr->EventTeleport(530, 3396.123779, 4182.208008, 137.097992);

    }
    break;

    case 17: //Terokkar Forest
    {
    Plr->EventTeleport(530, -1202.426636, 5313.692871, 33.774723);

    }
    break;

    case 18: //Shadowmoon Valley
    {
    Plr->EventTeleport(530, -2859.522461, 3182.34773, 10.008426);

    }
    break;

    case 20: //Shattrath
    {
    Plr->EventTeleport(530, -1887.510010, 5359.379883, -12.427300);

    }
    break;
    case 21: // Gurubsahi Arena
    {
    Plr->EventTeleport(0, -13271.959961, 149.105515, 34.464458);

    }
    break;

    case 30: // Azeroth Instances
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Shadowfang Keep", 31);
    Menu->AddItem(5, "Scarlet Monastery", 32);
    Menu->AddItem(5, "Zul'Farrak", 33);
    Menu->AddItem(5, "Stratholme", 41);
    Menu->AddItem(5, "Scholomance", 40);
    Menu->AddItem(5, "Blackrock Spire", 42);
    Menu->AddItem(5, "Onyxia's Lair", 38);
    Menu->AddItem(5, "Molten Core", 37);
    Menu->AddItem(5, "Zul'Gurub", 34);
    Menu->AddItem(5, "Karazhan", 43);
    Menu->AddItem(5, "Ahn'Qirai 20", 35);
    Menu->AddItem(5, "Ahn'Qirai 40", 36);
    Menu->AddItem(5, "Naxxramas", 39);
    Menu->AddItem(5, "Caverns of Times", 44);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;

    case 31: // Shadowfang Keep
    {
    Plr->EventTeleport(0, -234.495087, 1561.946411, 76.892143);
    }
    break;
    case 32: // Scarlet Monastery
    {
    Plr->EventTeleport(0, 2870.442627, -819.985229, 160.331085);
    }
    break;
    case 33: // Zul'Farrak
    {
    Plr->EventTeleport(1, -6797.278809, -2903.917969, 9.953360);
    }
    break;
    case 34: // Zul'Gurub
    {
    Plr->EventTeleport(0, -11919.073242, -1202.459374, 92.298744);
    }
    break;
    case 35: // Ahn'Qirai 20
    {
    Plr->EventTeleport(1, -8394.730469, 1485.658447, 21.038563);
    }
    break;
    case 36: // Ahn'Qirai 40
    {
    Plr->EventTeleport(1, -8247.316406, 1970.156860, 129.071472);
    }
    break;
    case 37: // Molten Core
    {
    // Plr->EventTeleport(0, -7515.409668, -1045.369629, 182.301208);
    Plr->EventTeleport(409, 1089.6, -470.19, -106.41);
    }
    break;
    case 38: // Onyxia
    {
    // Plr->EventTeleport(1, -4708.491699, -3727.672363, 54.535076);
    Plr->EventTeleport(249, 30.0, -64.0, -5.0);
    }
    break;
    case 39: // Naxxramas
    {
    // Plr->EventTeleport(0, 3132.915283, -3731.012939, 138.658371);
    Plr->EventTeleport(533, 3006.06, -3436.72, 293.891);
    }
    break;
    case 40: //Scholomance
    {
    Plr->EventTeleport(0, 1267.468628, -2556.651367, 94.127983);
    }
    break;
    case 41: //Stratholme
    {
    Plr->EventTeleport(0, 3359.111572, -3380.8444238, 144.781860);
    }break;
    case 42: // Black ROck Spire
    {
    Plr->EventTeleport(0, -7527.129883, -1224.997437, 285.733002);
    }break;
    case 43: // Kharazan
    {
    // Plr->EventTeleport(0, -11122.913086, -2014.498779, 47.079350);
    Plr->EventTeleport(532, -11087.3, -1977.47, 49.6135);

    }break;
    case 44: // Caverns of Times
    {
    Plr->EventTeleport(1, -8519.718750, -4297.542480, -208.441376);
    }break;


    case 50: // Outland Instances
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(0, "Outland Raids", 64);
    Menu->AddItem(5, "Hellfire Ramparts", 51);
    Menu->AddItem(5, "The Blood Furnace", 52);
    Menu->AddItem(5, "The Shattered Halls", 53);
    Menu->AddItem(5, "The Underbog", 54);
    Menu->AddItem(5, "The Slave Pens", 55);
    Menu->AddItem(5, "The Steamvault", 56);
    Menu->AddItem(5, "Mana-Tombs", 57);
    Menu->AddItem(5, "Auchenai Crypts", 58);
    Menu->AddItem(5, "Sethekk Halls", 59);
    Menu->AddItem(5, "Shadow Labyrinth", 60);
    Menu->AddItem(5, "The Mechanar", 61);
    Menu->AddItem(5, "The Botanica", 62);
    Menu->AddItem(5, "The Arcatraz", 63);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;

    case 51: // Hellfire Ramparts
    {
    Plr->EventTeleport(530, -360.670990, 3071.899902, -15.097700);
    }break;
    case 52: // The Blood Furnace
    {
    Plr->EventTeleport(530, -303.506012, 3164.820068, 31.742500);
    }break;
    case 53: // The Shattered Halls
    {
    Plr->EventTeleport(530, -311.083527, 3083.291748, -3.745923);
    }break;
    case 54: // The Underbog
    {
    Plr->EventTeleport(530, 777.088989, 6763.450195, -72.062561);
    }break;
    case 55: // The Slave Pens
    {
    Plr->EventTeleport(530, 719.507996, 6999.339844, -73.074303);
    }break;
    case 56: // The Steamvault
    {
    Plr->EventTeleport(530, 816.590027, 6934.669922, -80.544601);
    }break;
    case 57: // Mana-Tombs
    {
    Plr->EventTeleport(530, -3079.810059, 4943.040039, -101.046997);
    }break;
    case 58: // Auchenai Crypts
    {
    Plr->EventTeleport(530, -3361.959961, 5225.770020, -101.047997);
    }break;
    case 59: // Sethekk Halls
    {
    Plr->EventTeleport(530, -3362.219971, 4660.410156, -101.049004 );
    }break;
    case 60: // Shadow Labyrinth
    {
    Plr->EventTeleport(530, -3645.060059, 4943.620117, -101.047997);
    }break;
    case 61: // The Mechanar
    {
    Plr->EventTeleport(530, 2862.409912, 1546.089966, 252.158691);
    }break;
    case 62: // The Botanica
    {
    Plr->EventTeleport(530, 3413.649902, 1483.319946, 182.837997);
    }break;
    case 63: // The Arcatraz
    {
    Plr->EventTeleport(530, 3311.598145, 1332.745117, 505.557251);
    }break;


    case 64: // Outland Raids
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Magtheridon's Lair", 65);
    Menu->AddItem(5, "Serpentshrine Cavern", 66);
    Menu->AddItem(5, "Gruul's Lair", 67);
    Menu->AddItem(5, "The Eye", 68);
    Menu->AddItem(5, "Black Temple", 69);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;

    case 65: // Magtheridon's Lair
    {
    Plr->EventTeleport(530, -313.678986, 3088.350098, -116.501999);
    }break;
    case 66: // Serpentshrine Cavern
    {
    Plr->EventTeleport(530, 830.542908, 6865.445801, -63.785503);
    }break;
    case 67: // Gruul's Lair
    {
    Plr->EventTeleport(530, 3549.424072, 5179.854004, -4.430779);
    }break;
    case 68: // The Eye
    {
    Plr->EventTeleport(530, 3087.310059, 1373.790039, 184.643005);
    }break;
    case 69: // Black Temple
    {
    // Plr->EventTeleport(530, -3609.739990, 328.252014, 37.307701 );
    Plr->EventTeleport(564, 97.0894, 1001.96, -86.8798 );
    }break;

    case 95: // Bind Position
    {
    Plr->GetSession()->SendInnkeeperBind(pCreature);


    }break;


    case 97: // Remove res sickness
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Plr->addSpell(15007); // learn res sickness
    Plr->removeSpell(15007,0,0,0); // un learn res sickness
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "We have removed your Resurrection Sickness." );
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;



    case 99: //main menu
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(1, "Horde Cities", 1);
    Menu->AddItem(4, "Azeroth Instances", 30);
    Menu->AddItem(5, "Outland Locations", 3);
    Menu->AddItem(6, "Outland Instances", 50);
    Menu->AddItem(7, "Shattrath", 20);
    Menu->AddItem(8, "Gurubashi Arena", 21);
    Menu->AddItem(9, "Make This Place Your Home", 95);
    Menu->AddItem(11, "Remove Resurrection Sickness", 97);
    Menu->SendTo(Plr);
    }
    break;


    }
    }

    void Warper::GossipEnd(Object * pObject, Player* Plr)
    {
    GossipScript::GossipEnd(pObject, Plr);
    }

    void SetupWarper(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*) new Warper();
    /* Teleporter List */
    mgr->register_gossip_script(123456, gs); // Nega
    }
    What is wrong ? I cant compile it it give me some errors...can somone correct me?


  2. #2
    Apprentice Yarfangor is offline
    MemberRank
    Jul 2006 Join Date
    5Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    make sure theres no unnecessary spaces, thats happened to me quite often where its just a space that causes the problems.

  3. #3
    Realm of Espionage Espionage724 is offline
    MemberRank
    Nov 2007 Join Date
    Charleroi, PALocation
    468Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    What script is this?

  4. #4
    Member McFluzz is offline
    MemberRank
    Nov 2007 Join Date
    54Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    I think it's for a teleporter NPC looking at the code

  5. #5
    Account Upgraded | Title Enabled! Kira90 is offline
    MemberRank
    Jun 2007 Join Date
    Erm ... Er ... *Sneezes*Location
    320Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    u use all the required files? setup.h asf?

  6. #6
    Member Knifey is offline
    MemberRank
    Dec 2007 Join Date
    53Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    Yes setup.h , setup.cpp , custom_teleporters.cpp

  7. #7
    Member Knifey is offline
    MemberRank
    Dec 2007 Join Date
    53Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    Look here the error :
    [quote]1>------ Build started: Project: WarpNPC, Configuration: Release Win32 ------
    1>Compiling...
    1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
    1>Custom_Teleporters.cpp
    1>..\src\WarpNPC\Custom_Teleporters.cpp(97) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(97) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(97) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(104) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(104) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(104) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(110) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(110) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(110) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(116) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(116) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(122) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(122) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(122) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(123) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(128) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(128) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(128) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(138) : error C2196: case value '8' already used
    1>..\src\WarpNPC\Custom_Teleporters.cpp(140) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(140) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(140) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(144) : error C2196: case value '9' already used
    1>..\src\WarpNPC\Custom_Teleporters.cpp(146) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(146) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(146) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(152) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(152) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(152) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(158) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(158) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(158) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(164) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(164) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(164) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(166) : error C2059: syntax error : 'break'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(169) : error C2143: syntax error : missing ')' before '{'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(169) : error C2143: syntax error : missing ';' before ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(169) : error C2143: syntax error : missing ';' before '{'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(170) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(170) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(170) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(178) : error C2196: case value '12' already used
    1>..\src\WarpNPC\Custom_Teleporters.cpp(180) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(180) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(180) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(184) : error C2196: case value '13' already used
    1>..\src\WarpNPC\Custom_Teleporters.cpp(186) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(186) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(186) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(192) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(192) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(192) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(199) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(199) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(199) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(206) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(206) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(206) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(213) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(213) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(213) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(220) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(220) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(220) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(227) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(227) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(227) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(233) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(233) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(233) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(262) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(262) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(262) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(267) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(267) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(267) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(272) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(272) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(272) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(277) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(277) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(277) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(282) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(282) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(282) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(287) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(287) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(287) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(293) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(293) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(293) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(305) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(305) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(305) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(310) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(310) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(310) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(315) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(315) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(315) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(319) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(319) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(319) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(324) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(324) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(324) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(329) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(329) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(357) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(357) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(357) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(361) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(361) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(361) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(365) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(365) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(365) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(369) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(369) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(369) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(373) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(373) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(373) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(377) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(377) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(377) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(381) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(381) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(381) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(385) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(385) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(385) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(389) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(389) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(389) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(393) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(393) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(393) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(397) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(397) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(397) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(401) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(401) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(401) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(405) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(405) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(405) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(424) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(424) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(424) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(428) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(428) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(428) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(432) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(432) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(432) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(436) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(436) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(436) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(441) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(441) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(441) : warning C4305: 'argument' : truncation from 'double' to 'float'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(485) : error C2601: 'Warper::GossipEnd' : local function definitions are illegal
    1> ..\src\WarpNPC\Custom_Teleporters.cpp(42): this line contains a '{' which has not yet been matched
    1>..\src\WarpNPC\Custom_Teleporters.cpp(490) : error C2601: 'SetupWarper' : local function definitions are illegal
    1> ..\src\WarpNPC\Custom_Teleporters.cpp(42): this line contains a '{' which has not yet been matched
    1>..\src\WarpNPC\Custom_Teleporters.cpp(495) : fatal error C1075: end of file found before the left brace '{' at '..\src\WarpNPC\Custom_Teleporters.cpp(42)' was matched
    1>Setup.cpp
    1>Generating Code...
    1>Build log was saved at "file://c:\Documents and Settings\Barthez0705\Desktop\Ascent\branches\2_8_stable\src\scripts\projects\2005_int_release_WarpNPC\BuildLog.htm"
    1>WarpNPC - 24 error(s), 143 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    [/quote

  8. #8
    Account Upgraded | Title Enabled! mihai00792 is offline
    MemberRank
    Aug 2007 Join Date
    RomaniaLocation
    289Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    add this line at begin:
    #ifdef WIN32
    #pragma warning(disable:4305) // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    here you need , :
    case 8://Ratchet
    {
    Plr->EventTeleport(0 -14406.6 419.353 22.3907);
    }break;

    case 9://Booty Bay
    {
    Plr->EventTeleport(1 -943.935 -3715.49 11.8385);
    }break;
    here you have one 8,9 already:
    case 8: //Exodar
    {
    Plr->EventTeleport(530, -4072.202393, -12014.337891, -1.277277);
    }
    break;

    case 9: //Stormwind
    {
    Plr->EventTeleport(0, -9100.480469, 406.950745, 92.594185);
    }
    break;
    here you need , :
    case 12://Ratchet
    {
    Plr->EventTeleport(0 -14406.6 419.353 22.3907);
    }break;

    case 13://Booty Bay
    {
    Plr->EventTeleport(1 -943.935 -3715.49 11.8385);
    }break;
    and here already have the case 12,13:
    case 12: //Hellfire Peninsula
    {
    Plr->EventTeleport(530, -248.160004, 922.348999, 84.379799);
    }
    break;

    case 13: //Zangermarsh
    {
    Plr->EventTeleport(530, -225.863632, 5405.927246, 22.346397);
    }
    break;

  9. #9
    Member Knifey is offline
    MemberRank
    Dec 2007 Join Date
    53Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    #ifdef WIN32
    #pragma warning(disable:4305) // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif

    #include "StdAfx.h"
    #include "Setup.h"

    class SCRIPT_DECL Warper : public GossipScript
    {
    public:
    ADD_GOSSIP_FACTORY_FUNCTION(Warper);
    void GossipHello(Creature * pCreature, Player * Plr, bool AutoSend)
    {
    //dismount code
    Plr->SetUInt32Value( UNIT_FIELD_MOUNTDISPLAYID , 0);
    if(Plr->HasFlag(UNIT_FIELD_FLAGS, U_FIELD_FLAG_MOUNT_SIT)) Plr->RemoveFlag( UNIT_FIELD_FLAGS , U_FIELD_FLAG_MOUNT_SIT );


    GossipMenu *Menu;
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    //Menu->AddItem(5, "Set Bindpoint Here", 98);
    if (Plr->GetTeam() > 0)
    { Menu->AddItem(0, "Horde Cities", 1); }
    else
    { Menu->AddItem(0, "Alliance Cities", 2); }
    Menu->AddItem(0, "Level Spot", 80);
    Menu->AddItem(0, "Outland Locations", 3);
    Menu->AddItem(0, "Azeroth Instances", 30);
    Menu->AddItem(0, "Outland Instances", 50);
    Menu->AddItem(5, "Shattrath", 20);
    Menu->AddItem(5, "Gurubashi Arena", 21);


    if(AutoSend)
    Menu->SendTo(Plr);
    }

    void GossipSelectOption(Creature* pCreature, Player* Plr, uint32 Id, uint32 IntId)
    {
    GossipMenu * Menu;
    switch(IntId)
    {
    case 0: // Return to start
    GossipHello(pCreature, Plr, true);
    break;


    case 1: // Horde
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Silvermoon", 4);
    Menu->AddItem(5, "Orgrimmar", 5);
    Menu->AddItem(5, "Thunderbluff", 6);
    Menu->AddItem(5, "UnderCity", 7);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;

    case 2: // Alliance
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "The Exodar", 8);
    Menu->AddItem(5, "Stormwind", 9);
    Menu->AddItem(5, "Ironforge", 10);
    Menu->AddItem(5, "Darnassus", 11);
    Menu->AddItem(0, "[Back]", 99);

    Menu->SendTo(Plr);
    break;

    case 70: // Level Spot
    Menu->AddItem(5, "Ratchet", 90);
    Menu->AddItem(5, "Wetlands", 91);
    Menu->AddItem(5, "Desolace", 92);
    Menu->AddItem(5, "Dustwallow Marsh", 93);
    Menu->AddItem(5, "Booty Bay", 94);
    Menu->AddItem(5, "Tanaris", 95);
    Menu->AddItem(5, "Winterspring", 96);

    case 3: // Outland
    if(Plr->getLevel() < 58)
    {
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You do not qualify for entry to Outland." );
    Plr->Gossip_Complete();
    }else{
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Hellfire Peninsula", 12);
    Menu->AddItem(5, "Zangermarsh", 13);
    Menu->AddItem(5, "Nagrand", 14);
    Menu->AddItem(5, "Blades Edge Mountains", 15);
    Menu->AddItem(5, "Netherstorm", 16);
    Menu->AddItem(5, "Terokkar Forest", 17);
    Menu->AddItem(5, "Shadowmoon Valley", 18);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;

    //
    // Horde
    //

    case 4://Silvermoon
    {
    Plr->EventTeleport(530, 9400.486328, -7278.376953, 14.206780);

    }break;

    case 5://Orgrimmar
    {
    Plr->EventTeleport(1, 1371.068970, -4370.801758, 26.052483);
    }break;

    case 6://ThunderBluff
    {
    Plr->EventTeleport(1, -1304.569946, 205.285004, 68.681396);
    }break;

    case 7://UnderCity
    {
    Plr->EventTeleport(0, 2050.203125, 285.650604, 56.994549);
    }break;

    //
    // Alliance
    //

    case 8: //Exodar
    {
    Plr->EventTeleport(530, -4072.202393, -12014.337891, -1.277277);
    }break;

    case 9: //Stormwind
    {
    Plr->EventTeleport(0, -9100.480469, 406.950745, 92.594185);
    }break;

    case 10: //Ironforge
    {
    Plr->EventTeleport(0, -5028.265137, -825.976563, 495.301575);
    }break;

    case 11: //Darnassus
    {
    Plr->EventTeleport(1, 9985.907227, 1971.155640, 1326.815674);
    }break;

    //
    // Level Spot
    //

    case 90://Ratchet
    {
    Plr->EventTeleport(0 -14406.6 419.353 22.3907);
    }break;

    case 91://Wetlands
    {
    Plr->EventTeleport(0 -3246.030029 -2147.850098 23.646400
    }break;

    case 92://Desolace
    {
    Plr->EventTeleport(-1 -162.873199 1050.870117 90.530388
    }break;

    case 93://Dustwallow Marsh
    {
    Plr->EventTeleport(1 -3331.735352 -4100.397949 23.139975)
    }break;

    case 94://Booty Bay
    {
    Plr->EventTeleport(1 -943.935 -3715.49 11.8385);
    }break;

    case 95://Tanaris
    {
    Plr->EventTeleport(1 -7217.819824 -3048.909912 9.381170)
    }break;

    case 96://Winterspring
    {
    Plr->EventTeleport(1 6107.62 -4181.6 852.322)
    }break;

    ////////////////
    // Outland Menu
    ////////

    case 12: //Hellfire Peninsula
    {
    Plr->EventTeleport(530, -248.160004, 922.348999, 84.379799);
    }break;

    case 13: //Zangermarsh
    {
    Plr->EventTeleport(530, -225.863632, 5405.927246, 22.346397);
    }break;

    case 14: //Nagrand
    {
    Plr->EventTeleport(530, -468.232330, 8418.666016, 28.031298);

    }break;

    case 15: //Blades Edge Mountains
    {
    Plr->EventTeleport(530, 1471.672852, 6828.047852, 107.759239);

    }break;

    case 16: //Netherstorm
    {
    Plr->EventTeleport(530, 3396.123779, 4182.208008, 137.097992);

    }break;

    case 17: //Terokkar Forest
    {
    Plr->EventTeleport(530, -1202.426636, 5313.692871, 33.774723);

    }break;

    case 18: //Shadowmoon Valley
    {
    Plr->EventTeleport(530, -2859.522461, 3182.34773, 10.008426);

    }break;

    case 20: //Shattrath
    {
    Plr->EventTeleport(530, -1887.510010, 5359.379883, -12.427300);

    }break;
    case 21: // Gurubsahi Arena
    {
    Plr->EventTeleport(0, -13271.959961, 149.105515, 34.464458);

    }break;

    case 30: // Azeroth Instances
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Shadowfang Keep", 31);
    Menu->AddItem(5, "Scarlet Monastery", 32);
    Menu->AddItem(5, "Zul'Farrak", 33);
    Menu->AddItem(5, "Stratholme", 41);
    Menu->AddItem(5, "Scholomance", 40);
    Menu->AddItem(5, "Blackrock Spire", 42);
    Menu->AddItem(5, "Onyxia's Lair", 38);
    Menu->AddItem(5, "Molten Core", 37);
    Menu->AddItem(5, "Zul'Gurub", 34);
    Menu->AddItem(5, "Karazhan", 43);
    Menu->AddItem(5, "Ahn'Qirai 20", 35);
    Menu->AddItem(5, "Ahn'Qirai 40", 36);
    Menu->AddItem(5, "Naxxramas", 39);
    Menu->AddItem(5, "Caverns of Times", 44);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;

    case 31: // Shadowfang Keep
    {
    Plr->EventTeleport(0, -234.495087, 1561.946411, 76.892143);
    }break;
    case 32: // Scarlet Monastery
    {
    Plr->EventTeleport(0, 2870.442627, -819.985229, 160.331085);
    }break;
    case 33: // Zul'Farrak
    {
    Plr->EventTeleport(1, -6797.278809, -2903.917969, 9.953360);
    }break;
    case 34: // Zul'Gurub
    {
    Plr->EventTeleport(0, -11919.073242, -1202.459374, 92.298744);
    }break;
    case 35: // Ahn'Qirai 20
    {
    Plr->EventTeleport(1, -8394.730469, 1485.658447, 21.038563);
    }break;
    case 36: // Ahn'Qirai 40
    {
    Plr->EventTeleport(1, -8247.316406, 1970.156860, 129.071472);
    }break;
    case 37: // Molten Core
    {
    Plr->EventTeleport(0, -7515.409668, -1045.369629, 182.301208);
    }break;
    case 38: // Onyxia
    {
    Plr->EventTeleport(1, -4708.491699, -3727.672363, 54.535076);
    }break;
    case 39: // Naxxramas
    {
    Plr->EventTeleport(0, 3132.915283, -3731.012939, 138.658371);
    }break;
    case 40: //Scholomance
    {
    Plr->EventTeleport(0, 1267.468628, -2556.651367, 94.127983);
    }break;
    case 41: //Stratholme
    {
    Plr->EventTeleport(0, 3359.111572, -3380.8444238, 144.781860);
    }break;
    case 42: // Black ROck Spire
    {
    Plr->EventTeleport(0, -7527.129883, -1224.997437, 285.733002);
    }break;
    case 43: // Kharazan
    {
    Plr->EventTeleport(0, -11122.913086, -2014.498779, 47.079350);
    }break;
    case 44: // Caverns of Times
    {
    Plr->EventTeleport(1, -8519.718750, -4297.542480, -208.441376);
    }break;


    case 50: // Outland Instances
    if(Plr->getLevel() < 58)
    {
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You do not qualify for entry to Outland." );
    Plr->Gossip_Complete();
    }else{
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(0, "Outland Raids", 64);
    Menu->AddItem(5, "Hellfire Ramparts", 51);
    Menu->AddItem(5, "The Blood Furnace", 52);
    Menu->AddItem(5, "The Shattered Halls", 53);
    Menu->AddItem(5, "The Underbog", 54);
    Menu->AddItem(5, "The Slave Pens", 55);
    Menu->AddItem(5, "The Steamvault", 56);
    Menu->AddItem(5, "Mana-Tombs", 57);
    Menu->AddItem(5, "Auchenai Crypts", 58);
    Menu->AddItem(5, "Sethekk Halls", 59);
    Menu->AddItem(5, "Shadow Labyrinth", 60);
    Menu->AddItem(5, "The Mechanar", 61);
    Menu->AddItem(5, "The Botanica", 62);
    Menu->AddItem(5, "The Arcatraz", 63);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;

    case 51: // Hellfire Ramparts
    {
    Plr->EventTeleport(530, -360.670990, 3071.899902, -15.097700);
    }break;
    case 52: // The Blood Furnace
    {
    Plr->EventTeleport(530, -303.506012, 3164.820068, 31.742500);
    }break;
    case 53: // The Shattered Halls
    {
    Plr->EventTeleport(530, -311.083527, 3083.291748, -3.745923);
    }break;
    case 54: // The Underbog
    {
    Plr->EventTeleport(530, 777.088989, 6763.450195, -72.062561);
    }break;
    case 55: // The Slave Pens
    {
    Plr->EventTeleport(530, 719.507996, 6999.339844, -73.074303);
    }break;
    case 56: // The Steamvault
    {
    Plr->EventTeleport(530, 816.590027, 6934.669922, -80.544601);
    }break;
    case 57: // Mana-Tombs
    {
    Plr->EventTeleport(530, -3079.810059, 4943.040039, -101.046997);
    }break;
    case 58: // Auchenai Crypts
    {
    Plr->EventTeleport(530, -3361.959961, 5225.770020, -101.047997);
    }break;
    case 59: // Sethekk Halls
    {
    Plr->EventTeleport(530, -3362.219971, 4660.410156, -101.049004 );
    }break;
    case 60: // Shadow Labyrinth
    {
    Plr->EventTeleport(530, -3645.060059, 4943.620117, -101.047997);
    }break;
    case 61: // The Mechanar
    {
    Plr->EventTeleport(530, 2862.409912, 1546.089966, 252.158691);
    }break;
    case 62: // The Botanica
    {
    Plr->EventTeleport(530, 3413.649902, 1483.319946, 182.837997);
    }break;
    case 63: // The Arcatraz
    {
    Plr->EventTeleport(530, 3311.598145, 1332.745117, 505.557251);
    }break;


    case 64: // Outland Raids
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Magtheridon's Lair", 65);
    Menu->AddItem(5, "Serpentshrine Cavern", 66);
    Menu->AddItem(5, "Gruul's Lair", 67);
    Menu->AddItem(5, "The Eye", 68);
    Menu->AddItem(5, "Black Temple", 69);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;

    case 65: // Magtheridon's Lair
    {
    Plr->EventTeleport(530, -313.678986, 3088.350098, -116.501999);
    }break;
    case 66: // Serpentshrine Cavern
    {
    Plr->EventTeleport(530, 830.542908, 6865.445801, -63.785503);
    }break;
    case 67: // Gruul's Lair
    {
    Plr->EventTeleport(530, 3549.424072, 5179.854004, -4.430779);
    }break;
    case 68: // The Eye
    {
    Plr->EventTeleport(530, 3087.310059, 1373.790039, 184.643005);
    }break;
    case 69: // Black Temple
    {
    Plr->EventTeleport(530, -3609.739990, 328.252014, 37.307701 );
    }break;


    case 99: //main menu
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    //Menu->AddItem(5, "Set Bindpoint Here", 98);
    if (Plr->GetTeam() > 0)
    { Menu->AddItem(0, "Horde Cities", 1); }
    else
    { Menu->AddItem(0, "Alliance Cities", 2); }
    Menu->AddItem(0, "Level Spot", 80);
    Menu->AddItem(0, "Outland Locations", 3);
    Menu->AddItem(0, "Azeroth Instances", 30);
    Menu->AddItem(0, "Outland Instances", 50);
    Menu->AddItem(5, "Shattrath", 20);
    Menu->AddItem(5, "Gurubashi Arena", 21);
    Menu->SendTo(Plr);
    break;
    }
    }
    }
    };

    void SetupCustom_Warper(ScriptMgr * mgr)
    {
    /* Teleporter List */
    mgr->register_gossip_script(30001, &Warper::Create); }
    I changed it a little but still dont works: Look at error :
    1>------ Build started: Project: WarpNPC2008, Configuration: Release Win32 ------
    1>Compiling...
    1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
    1>Custom_Teleporters.cpp
    1>..\src\WarpNPC\Custom_Teleporters.cpp(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>..\src\WarpNPC\Custom_Teleporters.cpp(11) : warning C4183: 'ADD_GOSSIP_FACTORY_FUNCTION': missing return type; assumed to be a member function returning 'int'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(158) : error C2958: the left parenthesis '(' found at 'c:\documents and settings\barthez0705\desktop\ascent\trunk\src\scripts\src\warpnpc\custom_teleporters.cpp(157)' was not matched correctly
    1>..\src\WarpNPC\Custom_Teleporters.cpp(163) : error C2958: the left parenthesis '(' found at 'c:\documents and settings\barthez0705\desktop\ascent\trunk\src\scripts\src\warpnpc\custom_teleporters.cpp(162)' was not matched correctly
    1>..\src\WarpNPC\Custom_Teleporters.cpp(16) : error C2065: 'U_FIELD_FLAG_MOUNT_SIT' : undeclared identifier
    1>..\src\WarpNPC\Custom_Teleporters.cpp(16) : error C2065: 'U_FIELD_FLAG_MOUNT_SIT' : undeclared identifier
    1>..\src\WarpNPC\Custom_Teleporters.cpp(152) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(152) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(152) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(157) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(157) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(162) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(162) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(167) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(167) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(167) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(172) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(172) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(172) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(177) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(177) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(177) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(182) : error C2143: syntax error : missing ')' before 'constant'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(182) : error C2660: 'Player::EventTeleport' : function does not take 1 arguments
    1>..\src\WarpNPC\Custom_Teleporters.cpp(182) : error C2059: syntax error : ')'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(455) : error C2039: 'Create' : is not a member of 'Warper'
    1> ..\src\WarpNPC\Custom_Teleporters.cpp(8) : see declaration of 'Warper'
    1>..\src\WarpNPC\Custom_Teleporters.cpp(455) : error C2065: 'Create' : undeclared identifier
    1>Setup.cpp
    1>Generating Code...
    1>Build log was saved at "file://c:\Documents and Settings\Barthez0705\Desktop\Ascent\trunk\src\scripts\projects\2005_int_release_WarpNPC\BuildLog.htm"
    1>WarpNPC2008 - 26 error(s), 2 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  10. #10
    Member Knifey is offline
    MemberRank
    Dec 2007 Join Date
    53Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    BUMP! So what is wrong?

  11. #11
    Apprentice nik12 is offline
    MemberRank
    Feb 2008 Join Date
    5Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    Download c++??

  12. #12
    Account Upgraded | Title Enabled! Juggalo90 is offline
    MemberRank
    May 2007 Join Date
    MinnesotaLocation
    940Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    Gah hold on...I'll get this for you in a bit...
    Best bet would be add this to gossipcsripts...
    So you dont have to edit the projects and shit to include this and blah blah blah
    Custom_Warper.cpp
    Code:
    #ifdef WIN32
    #pragma warning(disable:4305) // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    class SCRIPT_DECL Custom_Warper : public GossipScript{
    public:
    void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
    void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
    void GossipEnd(Object * pObject, Player* Plr){ GossipScript::GossipEnd(pObject, Plr); }
    void Destroy(){ delete this; }
    };
    
    void Custom_Warper::GossipHello(Object * pObject, Player* Plr, bool AutoSend){
    GossipMenu *Menu;
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    //Menu->AddItem(5, "Set Bindpoint Here", 98);
    if (Plr->GetTeam() > 0) 
    { Menu->AddItem(0, "Horde Cities", 1); } 
    else
    { Menu->AddItem(0, "Alliance Cities", 2); }
    Menu->AddItem(0, "Level Spot", 80);
    Menu->AddItem(0, "Outland Locations", 3);
    Menu->AddItem(0, "Azeroth Instances", 30);
    Menu->AddItem(0, "Outland Instances", 50);
    Menu->AddItem(5, "Shattrath", 20);
    Menu->AddItem(5, "Gurubashi Arena", 21);
    
    
    if(AutoSend)
    Menu->SendTo(Plr);
    }
    
    void GossipSelectOption(Creature* pCreature, Player* Plr, uint32 Id, uint32 IntId)
    {
    GossipMenu * Menu;
    switch(IntId)
    {
    case 0: // Return to start
    GossipHello(pCreature, Plr, true);
    break;
    
    
    case 1: // Horde
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Silvermoon", 4);
    Menu->AddItem(5, "Orgrimmar", 5);
    Menu->AddItem(5, "Thunderbluff", 6);
    Menu->AddItem(5, "UnderCity", 7);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 2: // Alliance
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "The Exodar", 8);
    Menu->AddItem(5, "Stormwind", 9);
    Menu->AddItem(5, "Ironforge", 10);
    Menu->AddItem(5, "Darnassus", 11);
    Menu->AddItem(0, "[Back]", 99);
    
    Menu->SendTo(Plr);
    break;
    
    case 70: // Level Spot
    Menu->AddItem(5, "Ratchet", 90);
    Menu->AddItem(5, "Wetlands", 91);
    Menu->AddItem(5, "Desolace", 92);
    Menu->AddItem(5, "Dustwallow Marsh", 93);
    Menu->AddItem(5, "Booty Bay", 94);
    Menu->AddItem(5, "Tanaris", 95);
    Menu->AddItem(5, "Winterspring", 96);
    
    case 3: // Outland
    if(Plr->getLevel() < 58)
    {
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You do not qualify for entry to Outland." );
    Plr->Gossip_Complete();
    }else{
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Hellfire Peninsula", 12);
    Menu->AddItem(5, "Zangermarsh", 13);
    Menu->AddItem(5, "Nagrand", 14);
    Menu->AddItem(5, "Blades Edge Mountains", 15);
    Menu->AddItem(5, "Netherstorm", 16);
    Menu->AddItem(5, "Terokkar Forest", 17);
    Menu->AddItem(5, "Shadowmoon Valley", 18);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;
    
    //
    // Horde
    //
    
    case 4://Silvermoon
    {
    Plr->EventTeleport(530, 9400.486328, -7278.376953, 14.206780);
    
    }break;
    
    case 5://Orgrimmar
    {
    Plr->EventTeleport(1, 1371.068970, -4370.801758, 26.052483);
    }break;
    
    case 6://ThunderBluff
    {
    Plr->EventTeleport(1, -1304.569946, 205.285004, 68.681396);
    }break;
    
    case 7://UnderCity
    {
    Plr->EventTeleport(0, 2050.203125, 285.650604, 56.994549);
    }break;
    
    //
    // Alliance 
    //
    
    case 8: //Exodar
    {
    Plr->EventTeleport(530, -4072.202393, -12014.337891, -1.277277);
    }break;
    
    case 9: //Stormwind
    {
    Plr->EventTeleport(0, -9100.480469, 406.950745, 92.594185);
    }break;
    
    case 10: //Ironforge
    {
    Plr->EventTeleport(0, -5028.265137, -825.976563, 495.301575);
    }break;
    
    case 11: //Darnassus
    {
    Plr->EventTeleport(1, 9985.907227, 1971.155640, 1326.815674);
    }break;
    
    //
    // Level Spot
    //
    
    case 90://Ratchet
    {
    Plr->EventTeleport(0, -14406.6, 419.353, 22.3907);
    }break;
    
    case 91://Wetlands
    { 
    Plr->EventTeleport(0, -3246.030029, -2147.850098, 23.646400);
    }break;
    
    case 92://Desolace
    {
    Plr->EventTeleport(-1, -162.873199, 1050.870117, 90.530388);
    }break;
    
    case 93://Dustwallow Marsh 
    {
    Plr->EventTeleport(1, -3331.735352, -4100.397949, 23.139975);
    }break;
    
    case 94://Booty Bay
    {
    Plr->EventTeleport(1, -943.935, -3715.49, 11.8385);
    }break;
    
    case 95://Tanaris
    {
    Plr->EventTeleport(1, -7217.819824, -3048.909912, 9.381170);
    }break;
    
    case 96://Winterspring
    {
    Plr->EventTeleport(1, 6107.62, -4181.6, 852.322);
    }break;
    
    ////////////////
    // Outland Menu
    ////////
    
    case 12: //Hellfire Peninsula
    {
    Plr->EventTeleport(530, -248.160004, 922.348999, 84.379799);
    }break;
    
    case 13: //Zangermarsh
    {
    Plr->EventTeleport(530, -225.863632, 5405.927246, 22.346397);
    }break;
    
    case 14: //Nagrand
    {
    Plr->EventTeleport(530, -468.232330, 8418.666016, 28.031298);
    
    }break;
    
    case 15: //Blades Edge Mountains
    {
    Plr->EventTeleport(530, 1471.672852, 6828.047852, 107.759239);
    
    }break;
    
    case 16: //Netherstorm
    {
    Plr->EventTeleport(530, 3396.123779, 4182.208008, 137.097992);
    
    }break;
    
    case 17: //Terokkar Forest
    {
    Plr->EventTeleport(530, -1202.426636, 5313.692871, 33.774723);
    
    }break;
    
    case 18: //Shadowmoon Valley
    {
    Plr->EventTeleport(530, -2859.522461, 3182.34773, 10.008426);
    
    }break;
    
    case 20: //Shattrath
    {
    Plr->EventTeleport(530, -1887.510010, 5359.379883, -12.427300);
    
    }break;
    case 21: // Gurubsahi Arena
    {
    Plr->EventTeleport(0, -13271.959961, 149.105515, 34.464458);
    
    }break;
    
    case 30: // Azeroth Instances 
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Shadowfang Keep", 31);
    Menu->AddItem(5, "Scarlet Monastery", 32); 
    Menu->AddItem(5, "Zul'Farrak", 33);
    Menu->AddItem(5, "Stratholme", 41);
    Menu->AddItem(5, "Scholomance", 40);
    Menu->AddItem(5, "Blackrock Spire", 42);
    Menu->AddItem(5, "Onyxia's Lair", 38);
    Menu->AddItem(5, "Molten Core", 37);
    Menu->AddItem(5, "Zul'Gurub", 34);
    Menu->AddItem(5, "Karazhan", 43);
    Menu->AddItem(5, "Ahn'Qirai 20", 35);
    Menu->AddItem(5, "Ahn'Qirai 40", 36);
    Menu->AddItem(5, "Naxxramas", 39);
    Menu->AddItem(5, "Caverns of Times", 44);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 31: // Shadowfang Keep
    {
    Plr->EventTeleport(0, -234.495087, 1561.946411, 76.892143);
    }break;
    case 32: // Scarlet Monastery
    {
    Plr->EventTeleport(0, 2870.442627, -819.985229, 160.331085);
    }break;
    case 33: // Zul'Farrak
    {
    Plr->EventTeleport(1, -6797.278809, -2903.917969, 9.953360);
    }break;
    case 34: // Zul'Gurub
    {
    Plr->EventTeleport(0, -11919.073242, -1202.459374, 92.298744);
    }break;
    case 35: // Ahn'Qirai 20
    {
    Plr->EventTeleport(1, -8394.730469, 1485.658447, 21.038563);
    }break;
    case 36: // Ahn'Qirai 40
    {
    Plr->EventTeleport(1, -8247.316406, 1970.156860, 129.071472);
    }break;
    case 37: // Molten Core
    {
    Plr->EventTeleport(0, -7515.409668, -1045.369629, 182.301208);
    }break;
    case 38: // Onyxia
    {
    Plr->EventTeleport(1, -4708.491699, -3727.672363, 54.535076);
    }break;
    case 39: // Naxxramas
    {
    Plr->EventTeleport(0, 3132.915283, -3731.012939, 138.658371);
    }break;
    case 40: //Scholomance
    { 
    Plr->EventTeleport(0, 1267.468628, -2556.651367, 94.127983);
    }break;
    case 41: //Stratholme
    { 
    Plr->EventTeleport(0, 3359.111572, -3380.8444238, 144.781860);
    }break;
    case 42: // Black ROck Spire
    { 
    Plr->EventTeleport(0, -7527.129883, -1224.997437, 285.733002);
    }break;
    case 43: // Kharazan
    { 
    Plr->EventTeleport(0, -11122.913086, -2014.498779, 47.079350);
    }break;
    case 44: // Caverns of Times
    { 
    Plr->EventTeleport(1, -8519.718750, -4297.542480, -208.441376);
    }break;
    
    
    case 50: // Outland Instances
    if(Plr->getLevel() < 58)
    {
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You do not qualify for entry to Outland." );
    Plr->Gossip_Complete();
    }else{
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(0, "Outland Raids", 64);
    Menu->AddItem(5, "Hellfire Ramparts", 51);
    Menu->AddItem(5, "The Blood Furnace", 52);
    Menu->AddItem(5, "The Shattered Halls", 53);
    Menu->AddItem(5, "The Underbog", 54);
    Menu->AddItem(5, "The Slave Pens", 55);
    Menu->AddItem(5, "The Steamvault", 56);
    Menu->AddItem(5, "Mana-Tombs", 57);
    Menu->AddItem(5, "Auchenai Crypts", 58);
    Menu->AddItem(5, "Sethekk Halls", 59);
    Menu->AddItem(5, "Shadow Labyrinth", 60);
    Menu->AddItem(5, "The Mechanar", 61);
    Menu->AddItem(5, "The Botanica", 62);
    Menu->AddItem(5, "The Arcatraz", 63);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    }
    break;
    
    case 51: // Hellfire Ramparts
    { 
    Plr->EventTeleport(530, -360.670990, 3071.899902, -15.097700);
    }break;
    case 52: // The Blood Furnace
    { 
    Plr->EventTeleport(530, -303.506012, 3164.820068, 31.742500);
    }break;
    case 53: // The Shattered Halls
    { 
    Plr->EventTeleport(530, -311.083527, 3083.291748, -3.745923);
    }break;
    case 54: // The Underbog
    { 
    Plr->EventTeleport(530, 777.088989, 6763.450195, -72.062561);
    }break;
    case 55: // The Slave Pens
    { 
    Plr->EventTeleport(530, 719.507996, 6999.339844, -73.074303);
    }break;
    case 56: // The Steamvault
    { 
    Plr->EventTeleport(530, 816.590027, 6934.669922, -80.544601);
    }break;
    case 57: // Mana-Tombs
    { 
    Plr->EventTeleport(530, -3079.810059, 4943.040039, -101.046997);
    }break;
    case 58: // Auchenai Crypts
    { 
    Plr->EventTeleport(530, -3361.959961, 5225.770020, -101.047997);
    }break;
    case 59: // Sethekk Halls
    { 
    Plr->EventTeleport(530, -3362.219971, 4660.410156, -101.049004 );
    }break;
    case 60: // Shadow Labyrinth
    { 
    Plr->EventTeleport(530, -3645.060059, 4943.620117, -101.047997);
    }break;
    case 61: // The Mechanar
    { 
    Plr->EventTeleport(530, 2862.409912, 1546.089966, 252.158691);
    }break;
    case 62: // The Botanica
    { 
    Plr->EventTeleport(530, 3413.649902, 1483.319946, 182.837997);
    }break;
    case 63: // The Arcatraz
    { 
    Plr->EventTeleport(530, 3311.598145, 1332.745117, 505.557251);
    }break;
    
    
    case 64: // Outland Raids
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Magtheridon's Lair", 65);
    Menu->AddItem(5, "Serpentshrine Cavern", 66);
    Menu->AddItem(5, "Gruul's Lair", 67);
    Menu->AddItem(5, "The Eye", 68);
    Menu->AddItem(5, "Black Temple", 69);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 65: // Magtheridon's Lair
    { 
    Plr->EventTeleport(530, -313.678986, 3088.350098, -116.501999);
    }break;
    case 66: // Serpentshrine Cavern
    { 
    Plr->EventTeleport(530, 830.542908, 6865.445801, -63.785503);
    }break;
    case 67: // Gruul's Lair
    { 
    Plr->EventTeleport(530, 3549.424072, 5179.854004, -4.430779);
    }break;
    case 68: // The Eye
    { 
    Plr->EventTeleport(530, 3087.310059, 1373.790039, 184.643005);
    }break;
    case 69: // Black Temple
    { 
    Plr->EventTeleport(530, -3609.739990, 328.252014, 37.307701 );
    }break;
    
    
    case 99: //main menu
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    //Menu->AddItem(5, "Set Bindpoint Here", 98);
    if (Plr->GetTeam() > 0) 
    { Menu->AddItem(0, "Horde Cities", 1); } 
    else
    { Menu->AddItem(0, "Alliance Cities", 2); }
    Menu->AddItem(0, "Level Spot", 80);
    Menu->AddItem(0, "Outland Locations", 3);
    Menu->AddItem(0, "Azeroth Instances", 30);
    Menu->AddItem(0, "Outland Instances", 50);
    Menu->AddItem(5, "Shattrath", 20);
    Menu->AddItem(5, "Gurubashi Arena", 21);
    Menu->SendTo(Plr);
    break;
    }
    }
    }
    };
    
    void SetupCustom_Warper(ScriptMgr * mgr){
    mgr->register_gossip_script(30001, (GossipScript*) new Warper()); 
    ;}
    Then for Setup.h and setup.cpp make it look like this...
    Setup.h
    Code:
    #ifndef INSTANCE_SCRIPTS_SETUP_H
    #define INSTANCE_SCRIPTS_SETUP_H
    
    void SetupInnkeepers(ScriptMgr * mgr);
    void SetupGuardGossip(ScriptMgr * mgr);
    void SetupBattlemaster(ScriptMgr * mgr);
    void SetupCustom_Warper(ScriptMgr * mgr)
    
    #endif
    Setup.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    extern "C" SCRIPT_DECL uint32 _exp_get_version()
    {
    return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR);
    }
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
    SetupInnkeepers(mgr);
    SetupBattlemaster(mgr);
    SetupGuardGossip(mgr);
    SetupCustom_Warper(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
    {
    return TRUE;
    }
    
    #endif

  13. #13
    Account Upgraded | Title Enabled! Juggalo90 is offline
    MemberRank
    May 2007 Join Date
    MinnesotaLocation
    940Posts

    Re: [Ascent][HELP]C++ Correct Me if Im Wrong

    If this doesnt work...Post the errors...
    Cuz im not at home...and i dont have a compiler...

    @nik12
    Its called Visual C++...
    Last edited by Juggalo90; 29-02-08 at 04:35 AM.



Advertisement