|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days. |
 |
|
 |

02-18-2002, 02:11 AM
|
Hill Giant
|
|
Join Date: Jan 2002
Location: Midlands,UK
Posts: 149
|
|
Weapon proc spell target
I've written a small bit of code to enable weapon procs to work, however, I can't see a way of working out who the spell should be cast on (always casts on target at the moment). The spell effecttype for 'Avatar' on Primal weapons (which are cast on the player) is the same as 'Anarchy' on the Sceptre of destruction (which should be cast on the target).
Anyone know how to determine who the target should be from the spell/item? I've included to the code I put in, should anyone want it. It goes in right at the bottom of Client::Attack() in attack.cpp.
Code:
// Check for proc on weapon, proc based on DEX (Kaiyodo mod)
if((float)rand()/RAND_MAX < (GetDEX()/1500.0f)) // 255 dex = 0.17 chance of proc.
{
if(item && other && other->GetHP() > 0)
{
if((item->common.spellId < 65535ul) && (item->common.effecttype == 0))
SpellFinished(item->common.spellId, other->GetID(), 10, 0);
}
}
K.
|
 |
|
 |

02-18-2002, 02:39 AM
|
Sarnak
|
|
Join Date: Jan 2002
Posts: 46
|
|
Well, once/if/when someone comes out with a spell editor, you could create a spell that is exactly like Avatar, only it is self-only and see if that works. Have you tried putting Gate as an item effect? Or Minor Shielding?
__________________
If a kid asks where rain comes from, I think a cute thing to tell him is "God is crying." And if he asks why God is crying, another cute thing to tell him is "Probably because of something you did."
|

02-18-2002, 03:52 AM
|
Hill Giant
|
|
Join Date: Jan 2002
Location: Midlands,UK
Posts: 149
|
|
The Minor Shielding and Gate spells are flagged as 'Self-only' in the spell data (their spelltype is 'ST_Self'). Spells of this type, as well as any flagged with 'ST_AETarget' or 'ST_AECaster' will work just fine on a proccing weapon. The problems is with spells of type 'ST_Target' that need more information that I actually have, i.e. who to make the target.
I thought for a while that 'beneficial' spells would always proc on the player, while offensive spells proc on the target, but then remembered a few 'cursed' items that can proc offensive spells on the player (like the Cancel Magic proccing sword), so that was a non-starter.
K.
|

02-18-2002, 09:15 AM
|
Sarnak
|
|
Join Date: Jan 2002
Posts: 46
|
|
I know, but if self-only spells proc on yourself, you could make a spell exactly like Avatar, call it something different (or maybe you wouldn't have to, I don't know much about spell identification), but just make it self-only. This would be the "jerry-rigging" temporary fix, but it should work...
__________________
If a kid asks where rain comes from, I think a cute thing to tell him is "God is crying." And if he asks why God is crying, another cute thing to tell him is "Probably because of something you did."
|

02-18-2002, 10:26 AM
|
Hill Giant
|
|
Join Date: Jan 2002
Location: Midlands,UK
Posts: 149
|
|
That would certainly work, I've got a temporary bodge in there at the moment that basically goes 'if spell = avatar, target = me'. It's crude, but it lets me have fun with the primal weapons
K.
|

02-18-2002, 12:06 PM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
|
|
Is there possibly an overlooked bit of data in the item info that says who the spell proc is on? That would seem to make the most sense. Try comparing items that proc on target with items that proc on wielder....
|

02-19-2002, 01:48 AM
|
Sarnak
|
|
Join Date: Jan 2002
Posts: 97
|
|
Avatar is the spell that shamans get. Primal Avatar is the proc on the weapon. I haven't looked but i'm betting it's self only.
|

02-19-2002, 05:39 AM
|
Hill Giant
|
|
Join Date: Jan 2002
Location: Midlands,UK
Posts: 149
|
|
I'm pretty sure it's a targetable spell, Primal Avatar is a dropped spell in Sleepers I believe, a componentless version of Avatar.
The weapons I've been testing with are from the standard DB in the EQEmu zipfile (Primal velium warsword to be specific) so I'd presume all of the data for the weapon is spot on, i.e. packet sniffed from real EQ. All I do is cast the spell number that the weapon tells me to, I'm sure I'm just missing a bit of secret info stored in the weapon somewhere.
K.
|

02-19-2002, 06:58 AM
|
Sarnak
|
|
Join Date: Jan 2002
Posts: 97
|
|
Well, was a shot. I'll take a look deeper when i'm at home and have some time. 
|

02-19-2002, 08:55 AM
|
Hill Giant
|
|
Join Date: Jan 2002
Posts: 205
|
|
theres a primal avatar for shamans it doesnt take regent.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 07:16 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |