Event Script C++ menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Lindoz12's Avatar Member
    Reputation
    19
    Join Date
    Apr 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Event Script C++

    Alright, so i downloaded something through SVN and found this code in EventCommands.cpp:

    Code:
    //---------------------
    // Name: Event Teleporter v2
    // Author: Spidey
    //---------------------
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    //If set to true, will enable players to #event while in combat
    static bool bypassCombat = false;
    
    static string evon = "#eventon";
    static string evoff = "#eventoff";
    static string evplr = "#event";
    
    //Default Values
    static bool eon = false;
    static uint32 emapid = 0;
    static float ex = 0.0f;
    static float ey = 0.0f;
    static float ez = 0.0f;
    
    void EventChat(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
    {
       if(Message == evon && pPlayer->GetSession()->HasGMPermissions())
       {
           pPlayer->BroadcastMessage("You can now teleport to the event by typing #event");
          eon = true;
          ex = pPlayer->GetPositionX();
          ey = pPlayer->GetPositionY();
          ez = pPlayer->GetPositionZ();
          emapid = pPlayer->GetMapId();
       }
       else if(Message == evoff && pPlayer->GetSession()->HasGMPermissions())
       {
          eon = false;
       }
       else if(Message == evplr)
       {
          if(eon)
             if(bypassCombat || !pPlayer->CombatStatus.IsInCombat())
                pPlayer->EventTeleport(emapid, ex, ey, ez);
             else
                pPlayer->BroadcastMessage("You can't port while in combat.");
          else
             pPlayer->BroadcastMessage("There's no active event at the moment.");
       }
    }
    
    void SetupEvent(ScriptMgr * mgr)
    {
       mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, &EventChat);
    }


    When i try to compile it as release it sais that it couldnt find StdAfx.h

    How will i prevent this?

    Event Script C++
  2. #2
    Jens's Avatar Contributor
    Reputation
    179
    Join Date
    Sep 2006
    Posts
    251
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    prevent would be to delete the #include "StdAfx.h" line
    fix would probably be to locate the file

  3. #3
    Lindoz12's Avatar Member
    Reputation
    19
    Join Date
    Apr 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, if this works ill rep ya mate!

  4. #4
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never ever attempt programming again. You obviously suffer from an intellectual disability that you are not capable of overcoming. Please jump off a bridge before you have the chance to reproduce.

  5. #5
    Functions's Avatar Banned
    Reputation
    10
    Join Date
    Dec 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now im guessing there different kinds of functions like hasgmpermissions hasmodpermissions correct? Because I dont see evaluation like if(hasgmpermission == 'az')
    {
    ...
    };

Similar Threads

  1. LF Quests/items/objects/event scripts that spawn mobs
    By dognip40 in forum World of Warcraft General
    Replies: 0
    Last Post: 01-23-2015, 12:23 AM
  2. Setting up a "zelda-like" task/event script (Ascent, C++)
    By swils in forum WoW EMU Questions & Requests
    Replies: 9
    Last Post: 07-23-2009, 11:09 AM
  3. Has anyone got kara chess event script?
    By connor4333 in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 08-17-2008, 11:50 AM
  4. [Release] Illidan Stormrage Event Script
    By wowcomputer in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 02-06-2008, 12:57 PM
  5. [Scripting Idea] How to make a great boss event in LUA!
    By Arthas117 in forum WoW EMU Guides & Tutorials
    Replies: 3
    Last Post: 02-03-2008, 07:41 AM
All times are GMT -5. The time now is 09:49 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search