203 Commits

Author SHA1 Message Date
Michael Cook (mackal)
0765d273ea More changes to task system 2018-06-13 17:08:21 -04:00
Uleat
736890119b Forgot sql script file... 2018-03-07 22:46:11 -05:00
Uleat
a493242c3c Fix and overhaul to bug reporting system 2018-02-18 14:03:13 -05:00
Uleat
97bb50a5c4 Fix for query failure on some systems 2018-02-17 17:35:54 -05:00
Michael Cook (mackal)
a32dedeb48 Fix issue with heading being incorrectly handled
So we've been doing heading wrong all these years. You will need to run
a script to fix your quests and required SQL to fix DB.

This fixes a ton of random issues with headings and as gives us a better
resolution on headings :P
2018-02-15 18:20:16 -05:00
Michael Cook (mackal)
c5e4bb08f4 Implement global loot system Fixes #619
This should allow us to emulate lives global tables

The options available to filter tables are min_level, max_level, race,
rare, raid, race, class, bodytype, and zone.

race, class, bodytype, and zone are a pipe | separated list of IDs
2018-02-10 22:15:21 -05:00
Michael Cook (mackal)
f720e51585 Implement NPC Charm Stats
These combat stats an NPC will change to while charmed
2018-02-04 16:30:16 -05:00
Michael Cook (mackal)
3c794cfc07 Add Support to define a valid HP range for NPC casting
These will allow us to define a valid HP range (HP of the caster) that
an NPC will cast a spell. For example NPC casting a defensive spell at
2018-02-01 18:34:07 -05:00
JJ
8011c48641 Make Ground Spawn sql required in 97873ff42d 2017-12-17 12:58:42 -05:00
regneq
cd748e7d8b Fixed an issue that would cause traps to not function correctly if skill is 0 in the database.
Added undetectable column, to allow content developers to make a trap undetectable and not able to be disarmed.

Pets will no longer try to aggro traps its owner triggers.

Traps will now use the radius column to determine disarm range, instead of using a hardcoded value which may not be appropriate in all cases.

Decreased the scan range for traps to disarm.

Fixed some typos, and removed some unused code.
2017-10-28 10:02:31 -07:00
regneq
ed98aa45d2 Traps overhaul. New functionality has been added, while preserving the old functionality. Numerous bug fixes occurred as well.
Added column triggered_number. If this is set, then the trap will despawn after it has been triggered this number of times. If 0, the trap will never despawn on its own.

Added group column. This allows developers to group traps together in a similar way as spawngroups for NPCs. When a trap that is grouped is despawned in anyway, a random trap in the group will take its place. Grouped traps do not have to be at the same coords or have the same type. This can allow for some spawning diversity if so required. If set to 0, the trap is not grouped and will always respawn.

Added column despawn_when_triggered. If set to 1, then a trap will despawn when a player triggers it. If 0, then there will be a 5 second reset time and then the same trap will again be active. (Assuming triggered_number has not been reached.) The player that triggered the trap will not re-trigger it until they have left and re-enetered the trap's radius.

Traps will no longer trigger on players that are currently zoning. This fixes some weirdness and at least one crash. The trap can trigger however after the connection is been completed. If a player camped out in a trap radius they can potentially still be hit.

Alarm type traps were not using effectvalue2 to determine who should be aggroed. This is now fixed.

Traps will no longer be broken by #repop, #depopzone, or #reloadworld. All 3 commands will now have the same effect on traps as they do for NPCs.

Added command #reloadtraps. This reloads all of the traps in the zone.

Added command #trapinfo. This gives some information about the traps currently spawned in the zone.

Added Traps logsys category

Required SQL:
utils/sql/git/required/2017_10_26_traps.sql
2017-10-27 21:24:24 -07:00
Michael Cook (mackal)
df1e486df6 Fix isquest issue with SQL 2017-07-24 14:35:22 -04:00
Michael Cook (mackal)
0624667572 Fix SQL 2017-07-22 21:54:40 -04:00
Michael Cook (mackal)
07c80f9560 Fix SQL 2017-07-22 21:52:51 -04:00
Michael Cook (mackal)
947341a5ee Rename SQL and add manifest 2017-07-22 21:21:15 -04:00
Michael Cook (mackal)
f534e69a90 Update SQL 2017-07-22 19:17:05 -04:00
Michael Cook (mackal)
79ff4dd944 Merge branch 'master' into auras 2017-07-19 02:19:13 -04:00
Michael Cook (mackal)
ec77e3a6fd Add show_name and untargetable to npc_types fixes #637
Note the bodytype hack is still there since I was having issues with
some npcs still showing names
2017-07-19 02:17:08 -04:00
Michael Cook (mackal)
fe8c55ac63 Auras now zone 2017-07-18 17:52:39 -04:00
Michael Cook (mackal)
ee618f70ab Add support for setting cast_time of aura 2017-07-14 13:49:32 -04:00
Michael Cook (mackal)
94038ebb75 WIP on auras
Lots to do still

Normal buffing auras currently work for the most part
2017-07-14 02:05:35 -04:00
Akkadius
1c8dea909e New rules made by developers are now automatically created when world boots up, this keeps from having to issue schema SQL updates every time rules are added.
- Whenever a rule isn't present in the database, it will be automatically created
- utils/sql/git/required/2017_06_24_rule_values_expand.sql required for avoid floating point value inserts
2017-06-24 21:11:46 -05:00
Akkadius
357be65a69 Speed up saylink retrieval x 1,000 - helpful for dialogues, plugins with many saylinks 2017-06-24 20:07:01 -05:00
Athrogate
421b3bb277 Graveyards!!! 2017-04-10 11:03:36 -07:00
Uleat
58e1d9501d Added 'disable_timer' to door objects (used for click once doors) 2017-04-08 21:08:15 -04:00
regneq
4600844336 Added ignore_despawn column to npc_types to have NPCs ignore the despawn column in spawngroup. 2017-04-07 19:45:26 -07:00
Uleat
37d22e17a3 First step of implementing inventory v2.0 2017-03-09 02:46:09 -05:00
Uleat
9ae585dd81 Moved bot npc spells entries to the 3000 + class id range 2017-02-26 05:47:10 -05:00
Uleat
e3c8b75259 Moved bot spell entries out of npc spell entries (easier to manage bot changes by committing to non-bot manifest) 2017-02-15 07:42:17 -05:00
Uleat
38651258fc Updated npc spell types to 32-bit mask 2017-02-09 17:57:55 -05:00
Uleat
dc308e2ecb Fix for null columns in books.language crash 2017-01-30 03:08:00 -05:00
Uleat
05cb9d56c2 Modded 2017_01_10_book_languages.sql to eliminate error message 2017-01-27 23:17:25 -05:00
Paul Coene
80ff535215 Added code so that books/scrolls read that are in a language other
than common get language skill applied.

Added code to support ReadBook slots above and beyond main inventory slots
by decoding additional bag slot field.
2017-01-10 20:15:03 -05:00
Michael Cook (mackal)
ffbc913b9d Rename some spell fields 2016-12-01 13:35:19 -05:00
Michael Cook (mackal)
aaa116d97c Add support for object display names
Ex. Kejek Forge in Stonebrunt Mountains
2016-08-27 22:24:08 -04:00
Kinglykrab
b7b233d46f World:EnableIPExemptions should be false by default. (Woops.) 2016-08-27 21:44:04 -04:00
Kinglykrab
ed9b6db369 Added optional IP-based account exemptions. 2016-08-27 17:49:04 -04:00
Natedog2012
4de9b2c53e Add TiltX and TiltY manipulation to objects (Perl)
Translate OP_GroundSpawn for Titanium

#perl plugin http://wiki.eqemulator.org/i?Module=Pastebin&Paste=u9IbA6Ql
2016-08-26 06:39:39 -07:00
Uleat
3d61df253d Added rule 'NPC:UseClassAsLastName' to allow certain npcs' class names to be hidden 2016-07-03 19:44:45 -04:00
Michael Cook (mackal)
9599501ace Implement extra bind points (secondary recall)
For SE_Gate, base2 is which bind to use (starting at 1)
For SE_BindAffinity, base1 is which bind to set (starting at 1)
For SE_GateCastersBindpoint, base1 is which bind to use (starting at 1)
    here was actually no spells that don't send to the main bind,
    but it uses a base1 of 1 which matches with SE_Gate
    This also doesn't break anything

The quest stuff for now hasn't been updated to be able to make use of the extra binds

There are a total of 5 bind points, with the 5th being your starting city
2016-03-05 16:28:53 -05:00
Uleat
2b0ee55752 Add command #findaliases 2016-01-08 17:19:10 -05:00
Akkadius
8425607460 Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true
- When a zone boots, it will spawn an invisible npc by the name of zone_controller
	- Lua and Perl scripts can be represented with this npc as zone_controller.pl/lua
	- This NPC's ID is ruled be define ZONE_CONTROLLER_NPC_ID 10
	- Two EVENT's uniquely are handled with this NPC/controller (They only work with the zone_controller NPC)
		- EVENT_SPAWN_ZONE :: All NPC spawns in the zone trigger the controller and pass the following variables:
			$spawned_entity_id
			$spawned_npc_id
		- EVENT_DEATH_ZONE :: All NPC deaths in the zone trigger the controller event and pass the following variables:
			$killer_id
			$killer_damage
			$killer_spell
			$killer_skill
			$killed_npc_id
2015-12-29 04:08:10 -06:00
Natedog2012
8133f5312f First step into implementing evolving items, added fields to database that were missing. 2015-12-21 05:39:39 -08:00
regneq
17bbd8dfbe eqtime is now stored in the DB.
required/2015_12_17_eqtime.sql
2015-12-17 14:14:04 -08:00
Uleat
6f1ad1fbc1 Major change to how commands are loaded 2015-12-07 19:28:13 -05:00
Uleat
fe48f18f71 Added rule-based check for race/class restriction of spell scribing 2015-12-01 20:30:43 -05:00
Akkadius
63051dda9c Performance boost (exponential) - Adjusted default idle cast check timers in rules
- NPC:NPCToNPCAggroTimerMin	500 (Now 6000) 6 seconds
	- NPC:NPCToNPCAggroTimerMax	2000 (Now 60000) 60 seconds
	- Database version 9089 will take care of this update automatically only if you used the default values
	- The CPU cost of NPC's checking the entire entity list to cast beneficial spells (Heals/Buffs) becomes extremely high when
		higher NPC count zones exist (Based off of process profiling)
			- Distance checks for every single NPC to every single other NPC who are casting beneficial spells occur every .5 - 2 seconds unless
				npc_spells dictates other values, which most of the time it does not
	- Zones that once fluctuated from 1-8% CPU with no activity (Idle but players present) now idle at .5% based on my testings due
		to this change in conjunction with the past few performance commits, these are zones that have 600-800 NPC's in them
	- These values normally are overidden by the spells table (npc_spells), fields (idle_no_sp_recast_min, idle_no_sp_recast_max)
2015-11-02 22:12:41 -06:00
Akkadius
0ee70a663c Small adjustments to my rushing [skip ci] 2015-11-01 20:31:01 -06:00
Akkadius
e8d18cb014 Made many performance optimizing oriented code changes in the source
- Added Rate limit the rate in which signals are processed for NPC's (.5 seconds instead of .01 seconds)
Added Perl Export Settings which should heavily reduce the Perl footprint
	- Normally when any sub EVENT_ gets triggered, all kinds of variables have to get exported every single time an event is triggered and
		this can make Perl very slow when events are triggered constantly
			- The two most taxing variable exports are the item variables ($itemcount{} $hasitem{} $oncursor{}) and qglobals ($qglobals{})
			- qglobals can pose to be an issue quickly when global qglobals build up, it is highly recommend to use the GetGlobal() and SetGlobal()
				methods instead as they don't reference the hashmap $qglobals{} that is rebuilt every single time a sub event is triggered
	- A stress test conducted with 10,000 samples shows an excess of time taken to export variables: http://i.imgur.com/NEpW1tS.png
	- After the Perl Export Settings table is implemented, and all exports are shut off you see the following test result:
		http://i.imgur.com/Du5hth9.png
	- The difference of eliminating uneeded exports brings the overhead and footprint of 10,000 triggers from 54 seconds to 2 seconds
	- In a 10,000 sample test (10,000 sub event triggers), exporting item variables adds 12 seconds alone, when item variables are only needed in
		EVENT_ITEM and EVENT_SAY a majority of the time if at all
	- In a 10,000 sample test (10,000 sub event triggers), exporting qglobals with approximately 1,000 global qglobals in the database creates
		about 11-20 seconds of delay on its own (Depending on hardware of course)
	- I've written a parser that has determined which of these exports are needed in which sub routines and have turned off all of the unneeded
		exports in sub routines that do not need them and used it to create the default table that will be installed in the database.
	- The export table is called 'perl_event_export_settings' and it resembles the following structure and contains all current 81 EVENTS
		- If an entry doesn't exist in this table and a new subroutine is added to the source, all exports will be on by default for that routine

	+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+
	| event_id | event_description                       | export_qglobals | export_mob | export_zone | export_item | export_event |
	+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+
	|        0 | EVENT_SAY                               |               1 |          1 |           1 |           1 |            1 |
	|        1 | EVENT_ITEM                              |               1 |          1 |           1 |           0 |            1 |
	|        2 | EVENT_DEATH                             |               1 |          1 |           1 |           0 |            1 |
	|        3 | EVENT_SPAWN                             |               1 |          1 |           1 |           0 |            1 |
	|        4 | EVENT_ATTACK                            |               0 |          1 |           1 |           0 |            1 |
	|        5 | EVENT_COMBAT                            |               1 |          1 |           1 |           0 |            1 |
	+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+

	- If a change is made to this table while the server is live and running, you can hot reload all zone process settings via:
		#reloadperlexportsettings
	- For those who wonder what "exports" are, they are reference to variables that are made available at runtime of the sub event, such as:
		(export_qglobals) (Heavy) : $qglobals https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L916
		(export_item) (Heavy) : $itemcount{} $hasitem{} $oncursor{} https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1103
		(export_zone) : $zoneid, $instanceid, $zoneln etc. https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1083
		(export_mob) : $x, $y, $z, $h, $hpratio etc. https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1032
		(export_event) : (event specific) IE: EVENT_SAY ($text) https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1141
2015-11-01 20:29:51 -06:00
Akkadius
cbcfa2f2df Fix issue with an old SQL update and newer database engines [skip ci] 2015-10-02 19:35:02 -05:00