script texts

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • script texts

      What if in this core we will use texts in same way as in tc? i mean, text will selected by creature entry and id.
      It will need to be contained in multimap container.
      For example, we will create function (i dont know real structure name used in this core, so i call it ScriptTextStruct):
      ScriptTextStruct* ObjectMgr::GetNpcScriptText(uint32 entry, uint32 id) { .... }

      second function will implemented directly in MoonScript or CreatureAIScript:
      ScriptTextStruct* MoonScriptCreatureAI ::GetScriptText(uint32 id) { uint32 entry = _unit->GetEntry(); return objmgr.:GetNpcScriptText(entry, id); }

      this function latelly can be used in overloaded AddEmote or Emote functions

      The post was edited 1 time, last by sanctum32 ().

    • It is simple:
      We have 3 tables
      - npc_script_text (used for special timed texts)
      - npc text (most used for gossip text)
      - npc monstersay (automated say events)

      npc_monstersay is for mobs (missing sounds).

      Source Code

      1. struct NpcMonsterSay
      2. {
      3. float Chance;
      4. uint32 Language;
      5. uint32 Type;
      6. const char* MonsterName;
      7. uint32 TextCount;
      8. const char** Texts;
      9. };
      10. enum MONSTER_SAY_EVENTS
      11. {
      19. };
      Display All

      You see it is alreade there and it works, but it seems some functions like "sound" is missing.
    • well, i was talking about different texts :) which would be used for creature scripts.
      it would add minimal multi-language support for scripts (creatures will make emotes in selected languages if specific data is imported to world database - for basic).

      These texts are related to creature events, like as OnCombatStart, OnDeath() and etc...

      because its stupid idea to overload worldstrings with creature script texts or gossip option texts

      basic ScriptTextStruct structure would look like:
      struct ScriptTextStruct{
      const char* text;
      uint8 textType;
      uint32 emoteId;
      uint32 soundId;

    • Maybe it would ne the best you check the wiki, it seems this is already available... perhaps I don't understand what you said.
      npc_script_text is exactly that kind what you search, just switch from entry and link npcs to use npc_id and text_id and it is done.

      - emote and duration is currently not loaded
      - sound_id is not loaded
      - for localization see npc_script_text_localized (not implemented)
    • heh, didnt expected that it is already implemented here.
      About locales, i'm not going to split it under serveral tables but i would suggest to keep it in single table, its just few collumns
      Alright, i won't distruib about it.