71 Commits

Author SHA1 Message Date
false_genesis
12045179e4 * more fixes to make gcc happy
* replaced DefScriptTools::toString() with more generic template functions
2008-03-24 13:29:10 +00:00
false_genesis
46a855278e * first steps for gcc/mingw support, thx shlainn
* output & log platform+compiler+version on startup
* added early version of a movement mgr, its is not used yet and does NOT work yet!
2008-03-23 14:55:44 +00:00
false_genesis
1e39771e5f * more toNumber to toUint64 conversions, fixed ?{equal,X,ignore Y} - thx bLuma! 2008-03-09 20:26:42 +00:00
false_genesis
a9893d2957 * fixed teleport bug, now the server is correctly notified that we reached the destination. ok, we are still floating in the air, but this is fine since there is no gravity yet.
* fixed Player & Unit _type mask setting
* added exception handler for loading ADT files, just to be on the safe side if anything is going wrong there
2008-02-22 23:01:56 +00:00
false_genesis
95fce570dd * output defscript logs only in debug compile
* some conf updates
2008-02-22 19:30:10 +00:00
false_genesis
4405563a6b * fixed possible crash in defscript when an if block was appened to a script during runtime and this if was not endif'd
* more toNumber() -> toUint64() changes for number consistency
* fixed MyCharacter naming on char char list recv
* added script to list own/near player's inventory, for debugging. copy it into main scripts dir if you want to use it.
* inlined 2 funcs in DefScript
* changed args of script event "_onobjectdelete". @0 is now typeid, @1 out of range.
2008-02-21 20:24:38 +00:00
false_genesis
f865fb10a6 * added script preload cmd #escape-all=0/1 to autoescape parts of scripts, to ease up hooking and related... what needs escaping in general
* added first part of a script to help with other scripts hooking
2008-02-19 22:42:14 +00:00
false_genesis
6ccd48f719 * fixed scripted uint64 appending to bytebuffer, patch by bLuma, thx! 2008-02-17 21:32:21 +00:00
false_genesis
cf7758074a * added C++-style comment and whitespace stripping at line ends. turn this off/on with #linestrip=0/1. default is on. note: this might break older scripts using // in the code somewhere.
* added #comments-start (#cs) and #comments-end (#ce) to make commenting out large code blocks possible
2008-02-14 19:27:02 +00:00
false_genesis
281962dad0 * hopefully fixed possible crash when a script called by an event added or deleted events
* improved TypeStorage a bit (speedup?)
2008-02-14 17:19:49 +00:00
false_genesis
19cb07cfef * fixed bbread DefScript func in strnz mode
* optimized player name querying when recieving channel list (now all at once, not one by one)
* cleanup: replaced valid player name lengths by #defines instead of hardcoded numbers
2008-01-30 22:22:41 +00:00
false_genesis
94c4994a12 * fixed memory allocation crash when using ?{fread,file ALL} in scripts
* found a bug with causes block mismatches in def scripts with multiple nested if/loop/endif/endloop blocks. not yet fixed, but added small check.
2008-01-23 22:13:05 +00:00
false_genesis
40cef66995 * fixed typo in fread func, thx bLuma!
* added new funcs: freadline, fseekr, fseekw
2007-12-27 15:03:18 +00:00
false_genesis
134cd66130 * added file handling functions to DefScript
** if you are using vc80, dont forget to add DefScriptFileFunctions.cpp to the project file until updated here!
2007-12-27 02:03:45 +00:00
False.Genesis
0a9f8f41ed * added DefScript macros @clock (ms since process start), @time (unix time)
* time to release a new version! [A13.4 now done]
2007-12-09 22:14:10 +00:00
False.Genesis
cf9fcb3d20 * better error handling with missing/ not loaded MapTiles
* added some more hookable script events (_onobjectcreate, _onobjectdelete, _onteleport)
2007-11-28 18:09:53 +00:00
False.Genesis
1452efa4e8 * added bbGetPackedGUID, bbPutPackedGUID script funcs. thx bLuma for patch!
* added datatype "strnz" (non-zero-terminated string) to bytebuffer read/write script funcs.
2007-11-20 16:24:39 +00:00
False.Genesis
0aed2ee895 * fixed possible crash when script list was deleted and after that the script got executed
* fixed wrong check for #mark and #tip at script loading
* misc stuff
2007-10-30 19:35:56 +00:00
False.Genesis
1e5b463434 * implemented in-runtime script modification. every script is now stored as list #DEFSCRIPT::SCRIPTS::scriptname
* added little helper func "createdef"
* fixed crash if "listscript" was passed a name of a nonexisting script
* removed obsoelete file: TypeStorage.cpp, it was excluded from build since added.
2007-10-30 18:14:19 +00:00
False.Genesis
e7c3f27f54 * DefScript: added ByteBuffer functionality. big thx to bLuma for patch! 2007-10-28 15:21:02 +00:00
False.Genesis
83780495a8 forgot small addition 2007-10-28 12:33:01 +00:00
False.Genesis
f84037ad77 * DefScript: added initial support for escape sequences "\{ \} \x0A \n \t \\". please report any bugs with this!
note: variables MUST be stored unchanged!
* changed ListStorage class to TypeStorage template class
2007-10-28 12:08:55 +00:00
False.Genesis
87f708a0fd * made better base for different scenes (startup, loading, world,...)
* first time to display something on GUI.
* corrected (again) major typo, thx bLuma!
* added some sample data to display.
* moved log.cpp/h to shared.
* cant update vc80 files right now, sorry.
2007-10-21 20:52:29 +00:00
False.Genesis
b7a4ae92c5 * added long time forgotten script func "leavechannel"
* added script func "listchannel" (get all guids on players in a channel, query their names and store them in list macro @ChannelList.
* fixed /me-like emotes (server will no longer treat them as crash attempt :D )
* stuffextract: added output of database names into SCP files.
2007-10-21 00:28:15 +00:00
False.Genesis
8d261e5da0 * fixed some memleaks at shutdown. thx to bLuma for patch! 2007-10-19 20:01:15 +00:00
False.Genesis
f0b340ef3d * finally fixed + enabled chatAI scripting!
* added core funcs "bigger_eq/greater_eq, smaller_eq" in addition to "bigger/greater, smaller & equal"
* added scripted func "lfind" - return position of element in a list.
2007-10-17 10:59:01 +00:00
False.Genesis
993bc000df * fixed a major bug in the DefScript engine that messed up correct bracketing in nested fuctions (example:
?{equal,{hello world} {hello world}} returning false.
* enabled map tile duming also for release mode
* small fix with SCP reading in case this should ever be ported to mac osx.
2007-10-16 12:07:11 +00:00
False.Genesis
97f5d0da98 * implemented patch download supplied by realm server (does NOT yet support resuming a download)
* fixed a few bugs in RealmSession (ticket #14, thx bLuma)
* fixed a mistake in DefScript.cpp added in prev commit.
* added wrapper class for MD5 hashes
2007-08-29 18:35:12 +00:00
False.Genesis
71b17e7ced while custom script logging functions dont work, use an own logfile instead 2007-08-28 17:02:19 +00:00
False.Genesis
cb26f947c5 general fixes before release [part 1].
* added script handler "_onchatmessage" that gets triggered when ANY chat message is recieved.
* TODO: finish & debug "processchatai" and "registerchataiscript" scripts.
2007-08-27 20:46:27 +00:00
False.Genesis
12b508fc9f some little fixes 2007-08-20 16:16:33 +00:00
False.Genesis
3100f68a30 last changes before 2.1.3:
* added script to support /me-like emotes (scriptname is "me")
* changed the permission system: now a script cant be used as game command f no permission is explicitly set
* implemented threadsafe CLI queue to solve crashes with short-intervalled events that ran on 2 threads
* fixed name return at "getitemprotovalue" script
* iplemented DrawObject class and a Mgr for those objects; they will ease object drawing once implemented. the Mgr works under control of the GUI thread and is threadsafe.
* implemented auto-loading of SCP files if a name-tag is present somewhere in the file ("#dbname=...") and no explicit db name was passed to "loadscp" script.
* changed internal ObjMgr storage to std::map (instead of list) for faster access
* fixed call of "_enterworld" script
* fixed handling of MyCharacter(), which could cause crashes after newly changes
* fixed GetFileList() func in tools.cpp (this fixes also related "lgetfiles" script func). now it will only parse files, not directories. might still need some fixing for linux.
2007-08-01 19:09:17 +00:00
False.Genesis
8ff8117e53 * implemented map loading. new conf option: 'useMaps'
* found a problem with file listing, _startup.def refuses to load some .def files. trying to fix that now...
2007-06-24 17:53:54 +00:00
False.Genesis
652a599ce4 * scriptnames must be lowercased
* finished alpha 13.2 release version.
2007-06-22 11:33:40 +00:00
False.Genesis
4845888fc3 * compacted scripts. needs min rev 141 to run (skipping 'lsort'). deleted old scripts.
* added script func 'lsort'. more args will be added later.
2007-06-22 11:20:50 +00:00
False.Genesis
996256718c * implemented multiple scripts per .def file. ATTENTION: scripts will no longer be auto-loaded by the engine; they will be loaded via startup.def now. scripts will be compacted in next revs.
* forgot to use repository's openssl in Network system also.
* moved _startup.def to PseuWoW base folder!
2007-06-19 19:44:14 +00:00
False.Genesis
dff2d2085e * implemented DefScript "list" datatype.
* wiki information & documentation will come soon.
2007-06-09 17:54:13 +00:00
False.Genesis
a39849b2c9 * little scripts update 2007-05-26 23:45:07 +00:00
False.Genesis
5731cfa03b * started with linux preparations; thx to Skycrapper ;) 2007-05-13 19:51:46 +00:00
False.Genesis
6c4ae79a87 * rewrote the realm/world login code.
-> reconnecting does work now, finally.
* updated conf setting: reconnect=0: dont reconnect; reconnect=X: reconnect after X msecs.
* misc code cleanups, crash fixes, and overall improved stability.
* splitted RealmSocket into a RealmSession and the original RealmSocket code. better read-/useabilty because now its handled as WorldSession and related.
2007-05-11 20:55:38 +00:00
False.Genesis
54a37a3ff9 * updated items & items cache to 2.0.12
* added extracting of map & area names to stuffextract
* code cleanups
2007-05-06 00:34:30 +00:00
False.Genesis
c92f1ea824 * huge changes:
* few script changes; added new func "ScriptExists".
* started an extractor tool; using StormLib (thx to Ladislaw Zezula!). for now convert some dbc files to scp. more stuff will follow.
* some changes to the realm/world connect code; still needs a rewrite.
* support conf parameters for GUI (check conf/gui.conf/gui.conf[.default] )
2007-04-10 22:42:42 +00:00
False.Genesis
a3ae8273ba * auto-load all .def files in ./scripts/ directory after executing _startup.def
* fixed exception at DefScript:substr when called with empty string
* added 3 new functions: uppercase, lowercase, random[,<min>] <max>.
* added some better debug output when an incorrect script is loaded
2007-04-02 22:41:33 +00:00
False.Genesis
7961aa9046 * (hopefully) fixed several bugs related to number rounding and wrong math calculations. thx to crogge for the report.
* deleted old files
2007-04-02 01:07:28 +00:00
False.Genesis
1299c5490f * new conf option: "cmdchar". default is "."
* various .def scripts updates
* added cmd.def & getchatitem.def
* fixed: correctly check variable names in function "isset"
* fixed problems with loading scripts that cosist captalized IF/ENDIF/LOOP/ENDLOOP statments. now  upper, lower and mixedcase work as they should.
2007-03-24 00:07:59 +00:00
False.Genesis
0aaf7b45d6 * implemented usage of if/loop statements in #onload blocks
* check for if/loop/endif/endloop match in scripts
* check for brackets match (same amount of opening/closing brackets) at line load. skip corrupt lines
* some code cleanups
2007-03-23 21:00:20 +00:00
False.Genesis
74ded46daa * fixed DefScript tohex function to work with numbers up to 2^64
* fixed a bug that allowed to execute scripts via ingame commands without any permission
* added DefScript functions substr, getplayerperm, getscriptperm
2007-03-22 21:33:44 +00:00
False.Genesis
c8015e9929 * fixed if (error on multiple endifs)
* implemented loop...endloop & exitloop
* fixed crash on parsing ${} (var with no name)
* added an example .def file to explain loop/if-statements
2007-03-20 21:37:38 +00:00
False.Genesis
7de82dd3a9 * fixed if..else..endif
* small .def update
* misc, minor changes to some functions
* added a few more DefScript functions (and, or, xor, GetObjectType, ObjectKnown)
2007-03-16 16:14:13 +00:00
False.Genesis
6fef92a30c * added if..else..endif expressions to DefScript. they seem to work after a short test.
* inverted "bigger,a b", it gets now interpreted as a<b instead of b<a. same for "smaller".
2007-03-15 21:51:15 +00:00