Jump to content
TrinityCore
oRKENtaL

want help with a basic smart_script

Recommended Posts

Hello,

I'm trying to get the hang of SmartAI but it's proving to be difficult. Starting with someone easy, I picked a random npc (Jaina, entry id 35320) and doing
event is on recieve_emote (id 17, which is kiss)
the action is DIE (37)
And target self.

xXKEa6d.jpg

UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 35320;

DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = 35320); INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (35320, 0, 0, 0, 22, 0, 100, 0, 17, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - Received Emote 17 - Kill Self');

But the problem is that it doesn't work. I've resspawned her, restarted the server but she still doesn't die.
Any help would be most appreciated.

Thanks!

Edited by oRKENtaL

Share this post


Link to post
Share on other sites

Thanks! That worked! I'm so happy! :D

Now onto the big task and learn this fully...

 

I didn't even EmotesText.dbc existed. What is Emotes.dbc used for then?

Share this post


Link to post
Share on other sites

You're welcome!

Emotes (NPCs): creature_addon, creature_template_addon and smarts (SMART_ACTION_PLAY_EMOTE (5) & SMART_ACTION_SET_EMOTE_STATE (17))

In creature addon tables you must use EMOTE_STATE only.

EmotesText (players): /kiss, etc.

Edited by Meji

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By LordPsyan
      I am trying to make a spell script, something I have never messed with before. Simply put, a spell is cast upon you when you touch an object. I have that working, since that is a game object script. it also adds a 30 second duration, which also works, but does not show the countdown timer like many other spells. I think this needs to be done in a spell script, instead of newSpell->SetDuration(30000); in gameobject script.
      I cannot figure out how to get the timer working, and then get another spell cast upon the player.
      I have this set in my spell script, so if the spell is removed by any other means, the script shouldn't do anything:
                      if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)
                          return;
      so to sum up my question:
      spell cast upon player. timer counts down 30 seconds, which gives player enough time to remove the spell, then at end of countdown, another spell cast upon player. Can anyone give me some sample code? I tried working with professor putricide spell codes, and the life bloom spell, but its just not triggering. Yes I added an entry in spell_script_names...
       
      Thanks.
    • By AutoFX
      I greet you gave comends such as cd ~ /
        git clone git b 3.3.5: //github.com/TrinityCore/TrinityCore.git but it does not work I tried git clone git b 3.3.5: //github.com/TrinityCore/TrinityCore.git
        and so it entered the Komeda not work in putty trying to do this on Linux but Tables of your Komeda does not work I do not know how I give myself the trick ....
×