EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Database/World Building (https://www.eqemulator.org/forums/forumdisplay.php?f=625)
-   -   To disable spell casting in a zone? (https://www.eqemulator.org/forums/showthread.php?t=14799)

Kode Black 07-15-2004 11:45 AM

To disable spell casting in a zone?
 
I am currently learning C++ and I know sql... though I imagine it needs to be done with C++ in the source...
Anyway, does anyone have any information/resources or ideas on how to disable spell casting or to specifically disable certian spells in a zone?
For example to disable the use of teleports and gates in plane of justice...or to just simply disable spell casting.

Thanks in advance...

animepimp 07-15-2004 02:26 PM

This would definitely need custom code. The method that handles cast spell requests would just need to check the zone id before it processed anything for the spell.

Shadow-Wolf 07-15-2004 04:21 PM

actualy i believer that info is handled by the spell themselves.

Draupner 07-16-2004 04:15 AM

its in client_process.cpp OP_Castspell

Kode Black 07-16-2004 11:55 AM

I'm not too good with C++, I'll use the weekend to try and figure out the syntax, but basically it would need to be an "if" line of if zone=soandso... in proper syntax ofcourse?
Or does it need to be an if line with specification if "if" is met... I was looking at the syntax of other lines near it and assumed it would automatically end the cast spell if the "if" was met, unless "break" was to end the cast if "if" was met.

KhaN 07-18-2004 04:27 AM

Quote:

actualy i believer that info is handled by the spell themselves.
Actually, you can precise in what type of zone the spell can be casted (Town, Plane, ...), but you cant precise in what zone it can be casted (gfay, ec, wc, ...).

bloodgoth 07-18-2004 01:03 PM

But could you not then designate an area of a zone as one of those types?

Draupner 07-19-2004 12:12 AM

OK in OP_Castspell (clientprocess.cpp if you didn't know)

under
Code:

CastSpell_Struct* castspell = (CastSpell_Struct*)app->pBuffer;
This particular example will not let complete heal (spell id 13) to be cast in nexus (zone id 152) and will display in yellow text Can't cast spell here.
Code:

if (zone->GetZoneID() == 152 && castspell->spell_id == 13)
                                        {
                                                Message(15, "Can't cast spell here.");
                                                InterruptSpell(castspell->spell_id);
                                                break;
                                        }


Tangeleno 07-19-2004 10:09 AM

Funny thing is if I recall correctly at one point in time certain spells could only be cast in certain zones... Like the druid port to EJ could only be cast in KC.

Melwin 07-19-2004 10:48 AM

Quote:

Originally Posted by Tangeleno
Funny thing is if I recall correctly at one point in time certain spells could only be cast in certain zones... Like the druid port to EJ could only be cast in KC.

It was indoor-only.

Thus you had people going from Dreadlands to KC to have it cast, since KC was indoors and DL was outdoors.

Tangeleno 07-19-2004 11:31 AM

Oh, didn't know that :oops: at the time I was a newbie and had only played a warrior. Thought it only worked in KC since I started a druid after the patch that changed it.


All times are GMT -4. The time now is 10:29 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.