Log in

View Full Version : How to Stop players casting certain spells in certain areas


dreamseer
02-05-2010, 05:48 PM
There are areas in EQ where certain spells don’t work or can’t be cast
SOW inside
Velketor's Labyrinth levitate etc.

I would like to prevent gate and teleport in certain areas
I’m hoping it’s possible with an invisible npc

Derision
02-05-2010, 05:57 PM
Take a look at the blocked_spells table in the database:


mysql> describe blocked_spells;
+-------------+-----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-----------------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| spellid | mediumint(8) unsigned | NO | | 0 | |
| type | tinyint(4) | NO | | 0 | |
| zoneid | int(4) | NO | | 0 | |
| x | float | NO | | 0 | |
| y | float | NO | | 0 | |
| z | float | NO | | 0 | |
| x_diff | float | NO | | 0 | |
| y_diff | float | NO | | 0 | |
| z_diff | float | NO | | 0 | |
| message | varchar(255) | NO | | | |
| description | varchar(255) | NO | | | |
+-------------+-----------------------+------+-----+---------+----------------+


I've never actually messed with it, but as I undertand it, it will block spell spellid (or all spells of type 'type' in zone zoneid in the cube centered at x,y,z with dimensions +/- x_diff, y_diff, z_diff from being cast and send the client 'message' if the spell is blocked.

To block a spell in the whole zone, set x,y,z to 0 and x_diff,y_diff,z_diff to a large number (10000 is typically what is used for the current entries in that table).

Browsing the entries in the table should give you an idea of what to do.

EDIT: Looking at the source, it appears if 'type' is 1, then the spell is blocked zonewide, or if 'type' is 2, then it is blocked only within the cube specified by x,y,z,x_diff,y_diff,z_diff.

trevius
02-05-2010, 05:58 PM
SoW and Levitate blocking are done on a per-zone basis and are set in the zones table itself. But, if you want to stop specific spells from being cast in a whole zone or just part of it, you can use the blocked_spells table to setup what you want blocked and exactly where to block it. There should already be some examples in your table, so you can figure out how to use it based on that.

Edit: Foiled by Derision!

dreamseer
02-08-2010, 09:37 PM
Wow you guys are the best .... and the more I learn the more I appreciate the design of Everquest.

Thanks guys