c++ mob guide? menu

Shout-Out

User Tag List

Results 1 to 11 of 11
  1. #1
    darkmagishin's Avatar Active Member
    Reputation
    16
    Join Date
    May 2008
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    c++ mob guide?

    hello, anyone know a c++ guide on how to add spells to a mob when he enters combat? i tried this so far, but no luck.

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    
    #define guardgnome 1211
    #define Pyroblast 27132
    
    class guardgnome: public CreatureAIScript
    {
    
    
    
    		spells[1].info = sSpellStore.LookupEntry(Pyroblast);
    		spells[1].instant = true;
    		spells[1].cooldown = -1;
    		spells[1].perctrigger = 0.0f;
    		spells[1].attackstoptimer = 1000;
    
    
    
    void OnCombatStart(Unit* mTarget)
    {
    
    RegisterAIUpdateEvent(_unit->GetUInt32Value(UNIT_FIELD_BASEATTACKTIME)); 
    _unit->CastSpell(target, spells[1].info, spells[1].instant);   
    _unit->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "u arent suppose to be here");
    }
    
    }
    
    void Setupguardgnome(ScriptMgr * mgr)
    
    void Setupguardgnome(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new guardgnome();
        mgr->register_gossip_script(1211, gs);
    }


    this is the error

    Code:
    1>..\src\GossipScripts\guardgnome.cpp(9) : error C2332: 'class' : missing tag name
    1>..\src\GossipScripts\guardgnome.cpp(9) : error C2011: '<unnamed-tag>' : 'enum' type redefinition
    1>        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\DbgHelp.h(2866) : see declaration of '<unnamed-tag>'
    1>..\src\GossipScripts\guardgnome.cpp(9) : error C2143: syntax error : missing ';' before 'constant'
    1>..\src\GossipScripts\guardgnome.cpp(9) : error C2059: syntax error : 'constant'
    1>..\src\GossipScripts\guardgnome.cpp(9) : error C2059: syntax error : 'public'
    1>..\src\GossipScripts\guardgnome.cpp(10) : error C2143: syntax error : missing ';' before '{'
    1>..\src\GossipScripts\guardgnome.cpp(10) : error C2447: '{' : missing function header (old-style formal list?)
    1>..\src\GossipScripts\guardgnome.cpp(34) : error C2144: syntax error : 'void' should be preceded by ';'
    1>..\src\GossipScripts\guardgnome.cpp(36) : error C2059: syntax error : 'constant'

    thanks in advance ^ ^


    --ronald

    c++ mob guide?
  2. #2
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use Lua or the ai_agents table

  3. #3
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He wants to do it in C++... not LUA.
    What i suggest is looking at one of the bossfights in Moonscripts, or in ArcEmu's extra scripts.
    Life Puzzler WoW - Website | Forums

  4. #4
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's easier to make a lua for to cast a spell when entering combat then make a c++ and compile it. I wrote it beacuse he maybe didn't know about lua

  5. #5
    darkmagishin's Avatar Active Member
    Reputation
    16
    Join Date
    May 2008
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okay, ill try another one out. i used a lua script before but it woulnt work >,< it was probably only that one. ive seen a lot of lua guides on how to add spells to mobs, but by any chance do you know of any guides in c++?

    as for the ai_agent table, sounds a lot easier. so i look up the mob, and add the spell i want the mob to cast? if so, how can i make it so that it will cast the spell as soon as it enters combat? or will it cast it as soon as it enters combat.

    thanks for the quick response mate

  6. #6
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wrote a guide about ai_agents before, here it is

    http://www.mmowned.com/forums/ascent...ls-no-lua.html

    Hope it helps you, else just PM me with questions about ai_agents.

  7. #7
    darkmagishin's Avatar Active Member
    Reputation
    16
    Join Date
    May 2008
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very nice guide, illuminati, worked out great!

    gastric, thanks for the heads up! if i want to create a mob with an interesting event, ill look into those scripts ^ ^

    thanks the help peeps

  8. #8
    uberhak3r's Avatar Active Member
    Reputation
    72
    Join Date
    Mar 2006
    Posts
    95
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LUA is unstable on very large servers, I'm trying to code my LUA scripts into C++ right now.

  9. #9
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is really amusing. The guy says he wants to learn C++ creature scripting, but you refer him to lesser methods such as ai_agents and lua?

    OP: Take a look at the InstanceScripts project in your Ascent dist.


    Edit:
    The guy PMed me. I believe this question and the answer will be beneficial for others who might want to try, so here it is.
    Originally Posted by uberhak3r
    Just saw your post I would really like to learn c++ scripting also, I know some c++ already and was wondering if theres a guide anywhere because I have no idea where to start.

    The server I usally play on only accepts custom boss fights if they are in c++.

    help?
    If you know the syntax, just read the scripts in the InstanceScripts project. Those are working examples of creature scripts.
    Last edited by TheSpidey; 06-29-2008 at 08:17 AM.

  10. #10
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TheSpidey, I'm belived he was going to make a mob, but he maybe didn't know the existens of lua. Thats why.

    Also, I wrote what I knew, as it's nearly no one that can support with help and guides regarding the c++ area, as some people isn't aviable to learn everything by looking on script, you need to know what different commands are doing.

    So instead complain on everyone to learn c++, write a guide + a advanced one there you show up a script and explains everything in it etc, so we can learn.


    So instead of tracking down on me, shut up.

  11. #11
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *sigh* Flaming? Again? I'm going to ignore your shitty attitude and answer seriously.

    In his PMs he said that his server only accept C++ scripts, the owner probably runs x64 or dislikes Lua.

    Anyways, the original request was to learn AI scripting through C++, and his source shows that he has an understanding of C++ syntax and have looked at gossip scripts to learn from. However, gossip scripts is the wrong direction to go - He should have looked at the InstanceScripts project. Also, in his PMs he explicitly said that by looking at a couple of scripts he'll be able to figure it out himself, unlike some other guys around here who wish to be spoon fed.

    As for your remark about writing a C++ guide; Although I already wrote a guided C++ PvP-token release that explained each line throughly, it didn't receive many comments or views. It got pushed down to older pages because people kept posting the same questions over and over again, and preferred to get premade scripts. Thus my unwillingness to keep creating C++ guides.

    And yes, not anybody can learn just by looking at examples. Even though the function names are totally legible, some people still have trouble understanding what they do. This doesn't mean we have to treat everybody as if they are inept. Take, for example, my answers. All of the ones I have given are simply pointers; They point the user in the right direction, letting him find out for himself, and use his one muscle that really matters. I do not spoon feed anyone, nor do I give irrelevant answers. I strive for more power-users, more people who actually know what they're doing instead of following the same old routines some guy on the forums posted.

    So no, I will not 'shut up'. I will keep pushing users towards the way that will benefit them most.


    Edit: This is what I help to create.
    Originally Posted by uberhak3r
    Thanks for all the help, I read a quick guide on compling and yes I used a repack, just wanted to start quickly.

    I found scripts at mmoforge, I kind of understand some parts, I'll message you if I have any questions.

    Cya.
    Last edited by TheSpidey; 06-29-2008 at 09:18 AM.

Similar Threads

  1. Guide to Mob Waypoints
    By Sensisativa in forum WoW EMU Guides & Tutorials
    Replies: 17
    Last Post: 01-03-2009, 09:39 AM
  2. [Guide][LUA] Make a mob speak/use spell on a %!
    By Meltoor in forum WoW EMU Guides & Tutorials
    Replies: 14
    Last Post: 02-29-2008, 10:41 PM
  3. [Guide] Making A Custom Leveling Area (Mob Edition)
    By MathWizard in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 01-06-2008, 09:37 PM
  4. Guide to more gold as rogue while killing mobs
    By bthecheat in forum World of Warcraft Guides
    Replies: 7
    Last Post: 01-01-2008, 06:13 AM
  5. [GUIDE] - Scripting for Antrix, Making Mobs Talk, Cast Spells, etc
    By Greed in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 12-10-2007, 07:51 PM
All times are GMT -5. The time now is 02:04 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search