My script commits suicide! menu

User Tag List

Results 1 to 10 of 10
  1. #1
    Toffster's Avatar Member
    Reputation
    17
    Join Date
    Jun 2008
    Posts
    207
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My script commits suicide!

    Here is the script,

    #include "StdAfx.h"
    #include "Setup.h"
    #include "../Common/Base.h"
    #include "StdAfx.h"
    #include "Setup.h"
    #include "../Common/Base.h"

    class LifeEnder : public MoonScriptBossAI
    {
    MOONSCRIPT_FACTORY_FUNCTION(LifeEnder, MoonScriptBossAI);
    LifeEnder(Creature* pCreature) : MoonScriptBossAI(pCreature)
    {
    AddEmote(Event_OnCombatStart, "You are not prepared!", Text_Yell, 11466);
    AddEmote(Event_OnTargetDied, "Give into your fear!", Text_Yell, 1146;
    AddEmote(Event_OnTaunt, "Such Arrogance", Text_Yell, 11471);
    AddSpell(47889, Target_Self, 100, 0, 1000000);
    AddSpell(47809, Target_Current, 50, 2, 10);
    AddSpell(27216, Target_RandomPlayer, 100, 0, 15);
    AddSpell(50497, Target_current, 50, 4, 100);
    AddPhaseSpell(2, AddSpell(70358, Target_Current, 50, 5, 30));
    AddPhaseSpell(2, AddSpell(15092, Target_Current, 50, 0, 5));
    AddPhaseSpell(1, AddSpell(691, Target_Current, 100, 2, 30));
    AddPhaseSpell(3, AddSpell(68983, Target_Current, 100, 5, 1000));
    }

    void AIUpdate()
    {
    if(GetPhase() == 1)
    {
    if(_unit->GetHealthPct() <= 80 )
    {
    Emote("This is to easy!, Text_Yell, 11472);
    SetPhase(2);
    }
    }
    else if(GetPhase() == 2)
    {
    if(_unit->GetHealthPct() <= 45 )
    {
    Emote("You know nothing of power!, Text_Yell, 11469);
    SetPhase(3);
    }
    }
    else if(GetPhase() == 3)
    {
    if(_unit->GetHealthPct() <= 20 )
    {
    Emote("I will not be touched by a rebel such as you!", Text_Yell, 11479);
    }
    }
    ParentClass::AIUpdate();
    }

    void Destroy()
    {
    delete this;
    }

    };
    void SetupFirstNPC(ScriptMgr * mgr)
    {
    mgr->register_creature_script(npcid, LifeEnder::Create);
    }



    When world loads it says unexpected symbol near # please help!
    Last edited by Toffster; 06-04-2010 at 11:45 AM.

    My script commits suicide!
  2. #2
    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)
    You know this is C++ and not Lua, right? You don't save this as a .lua file under your scripts folder, you need to compile it as part of the src/scripts solution.

  3. #3
    Toffster's Avatar Member
    Reputation
    17
    Join Date
    Jun 2008
    Posts
    207
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    erm, how do i do that? I know it's C++ but how do i compile/thingie it?

  4. #4
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quick Guide;

    1. Open "arcemuVC90 - All Projects"
    2. I'm assuming this is a "raid script" so go into "ArcInstanceScripts" > Right Click > Add > New Item > Enter the name of the script and save it as a .cpp file.
    4. Copy and Paste your Script into the blank .cpp you made.
    5. Now go into "Setup.h"

    Find somthing like;

    Code:
    void SetupUlduar(ScriptMgr* mgr);
    void SetupZulFarrak(ScriptMgr * mgr);
    void SetupZulGurub(ScriptMgr * mgr);
    void SetupSerpentshrineCavern(ScriptMgr * mgr);
    void SetupMagtheridonsLair(ScriptMgr * mgr);
    void SetupSunwellPlateau(ScriptMgr* pScriptMgr);
    void SetupWorldBosses(ScriptMgr * mgr);
    void SetupZulAman(ScriptMgr * mgr);
    //other
    //void SetupGenericAI(ScriptMgr * mgr);
    Add your script there, so it would be somthing like

    Code:
    void SetupCustomBoss(ScriptMgr * mgr);
    6. Go open up "Setup.cpp" find somthing like this;

    Code:
    	SetupZulFarrak(mgr);
    	SetupZulGurub(mgr);
    	SetupSerpentshrineCavern(mgr);
    	SetupMagtheridonsLair(mgr);
    	SetupSunwellPlateau(mgr);
    	SetupWorldBosses(mgr); 
    	SetupZulAman(mgr);
    	//Other
    	//SetupGenericAI(mgr);
    and add somthing like this to it;
    Code:
    SetupCustomBoss(mgr);
    7. Now Save it all and Compile. :]
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  5. #5
    Toffster's Avatar Member
    Reputation
    17
    Join Date
    Jun 2008
    Posts
    207
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Er, do you have msn or something so you can guide me through that. Heres what i don't understand (I'm new to C++)
    1. Open "arcemuVC90 - All Projects"

    actually probably the whole thing apart from the bits in code, I get that. I think....

    EDIT: I think i got it now, I do this in Microsoft Visual C++ right?
    Last edited by Toffster; 06-03-2010 at 04:38 AM.

  6. #6
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    This is why it's recommended you learn basic C++ before moving on towards emulation "/
    Why do I need a signature?

  7. #7
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you do, and Link_S is right.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  8. #8
    Toffster's Avatar Member
    Reputation
    17
    Join Date
    Jun 2008
    Posts
    207
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, i've done that now and I know how to do that, well I think I do. It involves recompiling it right? And to be honest, I can't be asked to do that.

    EDIT: Is there any way to change this script into a .lua one?

  9. #9
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it involves recompiling, also LUA and C++ and the same and are not. More so, You can convert this into a LUA easily.

    Here's a quick LUA I made based on your C++ script, you can modify it whatever way you want.

    Code:
    function LifeEnder_OnCombat(pUnit, event)
     	pUnit:SendChatMessage(14,0,"You are not prepared!")
            pUnit:PlaySoundToSet(11466)
            pUnit:RegisterEvent("LifeEnder_Phase1", 20000, 0)
            pUnit:RegisterEvent("LifeEnder_Spell2", 10000, 0)
            pUnit:RegisterEvent("LifeEnder_Spell3", 30000, 0)
            pUnit:RegisterEvent("LifeEnder_Spell4", 40000, 0)
            pUnit:RegisterEvent("LifeEnder_Spell5", 60000, 0)
            pUnit:RegisterEvent("LifeEnder_Phase1", 30000, 0)
            pUnit:RegisterEvent("LifeEnder_Phase2", 50000, 0)
            pUnit:RegisterEvent("LifeEnder_Phase3", 33000, 0)    
            pUnit:RegisterEvent("LifeEnder_Taunt", 120000, 0)     
    
    end
    
    function LifeEnder_Phase1(pUnit, Event)
    pUnit:CastSpell(70358)
    end
    
    function LifeEnder_Spell2(pUnit, Event)
    pUnit:CastSpell(47809)
    end
    
    function LifeEnder_Spell3(pUnit, Event)
    pUnit:CastSpell(27216)
    end
    
    function LifeEnder_Spell4(pUnit, Event)
    pUnit:CastSpell(691)
    end
    
    function LifeEnder_Phase2(pUnit, Event)
    pUnit:SendChatMessage(14,0,"You know nothing of power!")
    pUnit:PlaySoundToSet(11469)
    end
    
    function LifeEnder_Spell5(pUnit, Event)
    pUnit:CastSpell(68983)
    
    end
    
    function LifeEnder_Phase3(pUnit, Event)
    pUnit:SendChatMessage(14,0,"I will not be touched by a rebel such as you!")
    pUnit:PlaySoundToSet(11479)
    end
    
    function LifeEnder_OnKill(pUnit,Event)
    pUnit:SendChatMessage(14, 0, "Give into your fear!")
    pUnit:PlaySoundToSet(11468)
    end
    
    function Aman_Taunt(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Such Arrogance"")
    pUnitSoundToSet(11471)
    end
    
    function LifeEnder_OnDied(pUnit, Event)
            pUnit:RemoveEvents()
    		pUnit:SendChatMessage(14, 0, "Ahhhh!")
    end
    
    
    RegisterUnitEvent(NPCID, 1, "LifeEnder_OnCombat")
    RegisterUnitEvent(NPCID, 2, "LifeEnder_OnKill")
    RegisterUnitEvent(NPCID, 4, "LifeEnder_OnDied")
    Last edited by Pedregon; 06-06-2010 at 02:20 AM.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  10. #10
    Toffster's Avatar Member
    Reputation
    17
    Join Date
    Jun 2008
    Posts
    207
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much!

Similar Threads

  1. How to make people commit suicide.
    By [Blaze] in forum World of Warcraft Guides
    Replies: 19
    Last Post: 05-20-2008, 01:05 AM
  2. I got banned by using that, Anti AFK auto queue script or w/e
    By julian_in in forum World of Warcraft General
    Replies: 22
    Last Post: 11-03-2006, 02:30 PM
  3. Any Anti AFK Scripts available?
    By paboee in forum World of Warcraft General
    Replies: 2
    Last Post: 08-30-2006, 09:11 AM
  4. [Program] WoW Jumper AntiAFK Script
    By Cypher in forum World of Warcraft Bots and Programs
    Replies: 5
    Last Post: 06-23-2006, 10:38 PM
All times are GMT -5. The time now is 12:36 PM. 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