Jump to content
TrinityCore

Idiots Guide for SAI


AussieGuy
 Share

Recommended Posts

Hi All,

I have just written my first SAI script, copying from another and it was a partial success.

I do not know how to create text for an NPC to say, and how/where to link it. I think it is connected with a data script, but no details.

I do not know how to stop an NPC from attacking.

Are there any resources available to assist?

I have looked at the SAI Editor for Keira2, it is very good, but linking up a working SAI with an Idiots Guide to how to show text, stop attacking, run away to a certain point, etc would be very helpful.

An extremely complex SAI like insertwww.wowhead.com/quest=29678/shu-the-spirit-of-water seems daunting to write.

If the information is available via sniffs, then that would be fantastic, I have installed the sniff tool but live is so volatile atm that it is out of date, and even were it to be rewritten most likely live will be patched at least once per week for the near future, so it might not be worth the effort.

TLDR: I can't work out how to write SAI scripts, please help

Thanks,

Glenn

 

Link to comment
Share on other sites

On 2017-04-22 at 3:29 PM, Nay said:

Both of those links lack details and in some ways they are out of date. They are by no means a step by step guide. This is what I consider a step by step guide. :P

Even as a person who has a lot of experience working with C++, SQL, and other languages, it's taking a while for me to grasp the processing flow of SAI scripts. It is a smart system, so to speak, but it's very opaque compared to say, C++ script, which has functionality that is immediately obvious to understand in its entirety just by reading the C++.

I'm actually kinda bummed that ADD_GOSSIP_ITEM() was removed, because when you use gossip menu generated from `world`.`gossip_menu_option` with a custom C++ script the menuId in

bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 menuId)

always is 1. As such, the function isn't provided any useful information as which option the player clicked.

Like I said though, SAI scripting is a good system, it's an extensible system, but it's not a particularly well documented or clear system at the moment.

I've been puttering away at making a trinket invoked character who offers helpful services via SAI script. What I have working (for 3.3.5a) atm is the trinket, the character, and one utility on conversation for 5 gold. The SQL here,

https://github.com/Tatwi/solozeroth/commit/a0f431c85a289ec60b84bd30fb3901893b39cac8

It's heavily commented, because I am old and I need to remember things. When it's finished, I'll likely post a verbose guide on my site.

SAI is nifty way to add content and probably pretty quick once you get the hang of it, but from a "programming as a hobby" perspective it's kinda boring: Poking bits into a database is data entry, not programming. lol...

Edited by Tatwi
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Mekonuts
      Hello and thanks for the reading first,
      i would love to know if there's a way to make a certain SmartScript force a player to cast certain Spell. I know there's a possibility of put and remove auras and sometimes the same Spell can be used as Aura to force the debuff of the same spell but i would like to know if there's a possibility to do this without need to do an scriptname.
      I used this as guide along this years: https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130108/smart+scripts
      I searched a bit for the TrinityCore issue tracker about this and didn't found anything useful about the question itself.
      Thanks for reading!
    • By Inky
      Hey all!

      I've been thinking, after I saw this introduction in the spanish part of the forum, this guy who wants to help out in any way he can... Given the fact that he didn't specify if he has any knowledge in developing of any kind the first thing I thought was in the missing gossip.
      But then again, there's nowhere to post that in spanish, if there are users that can't understand/speak english.

      Maybe we could make a "Help us gather missing gossip" kindda post but translated in spanish and pin it on the localized forums.
      You could also do the same with the "Converting EAI to SAI", because I know there are a lot of developers out there that know how to do it but don't speak english at all.

      Just something to think about, if you ask me this would be very efficient and "welcoming" for hispanic people (of course it could/should be done in all the other languages).
      I myself could help out in the spanish and portuguese sections.

      Cheers, XOXO!
×
×
  • Create New...