script texts

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • 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

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von 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).

      Quellcode

      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. {
      12. MONSTER_SAY_EVENT_ENTER_COMBAT = 0,
      13. MONSTER_SAY_EVENT_RANDOM_WAYPOINT = 1,
      14. MONSTER_SAY_EVENT_CALL_HELP = 2,
      15. MONSTER_SAY_EVENT_ON_COMBAT_STOP = 3,
      16. MONSTER_SAY_EVENT_ON_DAMAGE_TAKEN = 4,
      17. MONSTER_SAY_EVENT_ON_DIED = 5,
      18. NUM_MONSTER_SAY_EVENTS,
      19. };
      Alles anzeigen


      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)

      ascemu.org/wiki/index.php?title=Npc_script_text