Commit graph

28 commits

Author SHA1 Message Date
NeatElves
e0192deaf6 [c12582] Add support for XP-Gain disabling 2020-02-16 23:26:00 +00:00
Xfurry
7fec4dacae [c12559] DBScripts - Add Map/Zone wide sound support to COMMAND_PLAY_SOUND 2020-02-16 22:41:04 +00:00
Schmoozerd
a27787851c [c12537] Update Authorship information
(based on commit [12388] - 037f217)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
2020-02-16 21:27:46 +00:00
Schmoozerd
a05738717a [c12536] Happy New Year 2013
Update authorship information and prepare for easier ways next year

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12325] - b7dbcda)
2020-02-16 21:25:01 +00:00
Schmoozerd
b030244426 Fixup script_command documentation. Thanks to crackm for pointing 2020-02-16 20:42:06 +00:00
Reamer
6b6b2379a3 [12030] Support Random Movement around a point
* Remove unused MoveRandom function
* Add MotionMaster::MoveRandomAroundPoint function
* Toggle DB-command COMMAND_MOVEMENT to be able to move around current position or respawn position (depending on data_flags)
2012-07-12 19:15:14 +02:00
Schmoozerd
414d432d24 [11990] More db-script command changes
* Allow SCRIPT_COMMAND_KILL_CREDIT to give the kill of an involved npc.
  This is marked by datalong (creature-entry) == 0
* Remove immediate execution of commands. This will prevent infinite loops when db-scripts trigger db-scripts which are executed immediately
* Add check for SCRIPT_COMMAND_PLAY_SOUND
* Add check to catch an invalid command

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-05-09 23:09:12 +02:00
Schmoozerd
83d7d86255 [11989] Add support to call spell_scripts in more cases
* Support to script Dummy spells with spell_scripts
* Support to script TriggerSpell spells which have no existing triggered spell
Note that the order which spell-effect actually triggers the DB script is well-defined (SCRIPT_EFFECT before DUMMY before other)

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-05-08 17:31:09 +02:00
Schmoozerd
4e6fbf5e9e [11984] Add new SCRIPT_COMMAND_SEND_TAXI_PATH to trigger a taxi path
Idea for this patch by Klark20 (maybe he also was the author of this patch as well, I cannot check in this moment)

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-05-04 17:47:12 +02:00
Xfurry
ea08f7c5d7 [11947] Improve SCRIPT_COMMAND_MOVE_TO
This changes the handling of SCRIPT_COMMAND_MOVE_TO, to not expect some travel-time, but directly provide the speed for the movement (*100).

Attention to DB-Devs, please check your MOVE_TO scripts.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-10 23:44:17 +02:00
Schmoozerd
8e0edc0383 [11940] Rewrite and cleanup DB Script Engine
* Moved actual script processing code to ScriptMgr
* Unifed and improved log output. Now table-name is passed to each script execution
* Added the "buddy concept" to all commands (except the outdated direct field change commands):
Now all commands support to search a creature (or go for some commands) in a radius, with which to do some stuff.
See doc/script_commands.txt for more details and information

Attention DB Devs:
Current DB-Scripts are converted automatically as far as possible, but some old target selecting mechanics were not reasonable to do automated.
For such cases the command is marked with data_flags & 0x10 (==16), which will throw DB-Errors to track them down faster

Thanks to NeatElves and especially Grz3s for testing!

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-06 22:04:30 +02:00
Schmoozerd
8068dcf6dd [11875] Update Copyright notice to year 2012
Start timemachine and a Happy new year to all!
2012-01-16 17:43:59 +01:00
Schmoozerd
7d05ca0b79 [11859] Enable script command MOVE_TO to also change the orientation 2011-12-11 00:17:50 +01:00
Schmoozerd
6b355bd987 [11840] Fix script command modify_npc_flag
Thanks to faq for pointing.
I checked both udb and ytdb, and they don't use this command yet;
If however you use it already check your scripts. (The toggle/add/remove flag must be set in `data_flags`) Sorry for the inconvenience.
Alos added a forgotten break.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-11-06 16:06:59 +01:00
Schmoozerd
46e604a089 [11823] Add SCRIPT_COMMAND_MODIFY_NPC_FLAG to change NPC flags by db-script
Note that the npc flags will be restored when the npc respawns

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-10-14 20:35:55 +02:00
NoFantasy
dd66ce20f2 [11583] Correcting typo (damn the copy/paste)
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-06-01 09:30:47 +02:00
NoFantasy
70d9d4ef24 [11582] Implement SCRIPT_COMMAND_STAND_STATE to use in *_scripts tables
Set the stand state (enum UnitStandStateType) of any Unit*

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-06-01 09:28:47 +02:00
Schmoozerd
0de4e302b3 [11558] Fixes and way work chnages for GO lock/interact state
* Not reset lock/interact state in instances (so until instance reset)
* Do unti-cheating checks for use attempts locked/non-intareactive GOs
* Implement SCRIPT_COMMAND_GO_LOCK_STATE for control lock/interact state of GOs from scripts.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-05-29 04:31:34 +04:00
NoFantasy
889ce13264 [11316] Implement a basic system to restore default faction for creatures after changes
A new specialized function SetFactionTemporary for creatures are added. It work just like setFaction but has in addition option to set flags.
The flags determine if default faction should be restored and when; most commonly just before respawn and when reaching home after evade.

SCRIPT_COMMAND_SET_FACTION for DB scripts and ACTION_T_SET_FACTION for creature_ai_scripts are now capable of using the system (documentation updated)

The intention of the system is to be able to solve basic events that include faction changes, with the use of database only and in easier ways.

It is advised that DB devs revise current database scripts to check if changes should be made. The same goes for EventAI devs regarding ACTION_T_SET_FACTION.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-05 15:04:39 +02:00
NoFantasy
acb6372d29 [11311] Add SCRIPT_COMMAND_ATTACK_START to initiate attack by creature.
../docs/script_commands.txt updated for details

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-03 19:52:43 +02:00
NoFantasy
c93256e477 [11309] Extend SCRIPT_COMMAND_EMOTE, allow search for nearby creature to do the emote
Also allow play emote on Player when player is source.
Gameobject may be source of script but are only allowed as searcher for creature when defined.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-03 17:55:53 +02:00
Schmoozerd
883e88fad5 [10956] Implement support triggered spells in SCRIPT_COMMAND_CAST_SPELL
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-04 04:15:47 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
NoFantasy
541098168d [10536] Extend SCRIPT_COMMAND_TEMP_SUMMON_CREATURE to set summoned as active object
Field data_flags 0x01 will enable active state

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-25 13:35:22 +02:00
NoFantasy
29a723e41e [10507] Extend SCRIPT_COMMAND_TALK with option to set language for text
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-19 20:50:18 +02:00
NoFantasy
a1fd19b6b3 [10506] Implement 5 new SCRIPT_COMMAND_*
All commands can only have creature as the affected by command
*_SET_ACTIVEOBJECT - switch activeObject state on/off
*_SET_FACTION - changes faction
*_MORPH_TO_ENTRY_OR_MODEL - changes model to model from creature_template entry or model id explicit
*_MOUNT_TO_ENTRY_OR_MODEL - mounts on model from creature_template entry or model id explicit
*_SET_RUN - switch walkmode on/off

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-19 19:27:33 +02:00
NoFantasy
0245efecb7 [10500] Extend SCRIPT_COMMAND_TALK to support random selected text
In addition to adding fields for text id storage (in total 4 text id's), also added a comments field for developers notes in scripts (it may help those being old of age to remember what goes on in a script).

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-18 01:55:29 +02:00
NoFantasy
167b7bfeac [10497] Add a crude documentation of script command processing
It is mostly copied from source files and should be subject for further improvement.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-17 23:44:17 +02:00