PDA

View Full Version : Possible Memory Blur Fix


trevius
10-15-2008, 06:07 PM
I don't think I have ever seen any Memory Blur spells work in the emu. I think the problem was that it was only wiping the hate list for NPCs and not client hate lists. It may actually work in the current SVN with the recent changes to hate lists now only being on NPCs. But, in the case that it gets reverted back so both Clients and NPCs have hate lists again, I think we need to just wipe all hate lists as shown below.

The other thing that I noticed was that even if the code for Memory Blur did work, it is still missing something important. Any spell that has no limitation for wipechance will be set to 0. But, the code wasn't checking for 0, so those types of spells would always fail. The most common spell that uses this setting is Guide Memory Blur, which is the instant clicky on GM shoulders. So, I added the 0 check in there as well.

I haven't tested this yet, but I figured I would post here first to see if anyone had any thoughts on how I am doing this, or if charm is already working properly and I am just crazy or something :P

spell_effects.cpp - replace the current SE_WhipeHateList with this:
case SE_WipeHateList:
{
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Memory Blur: %d", effect_value);
#endif
int wipechance = spells[spell_id].base[i];
if(MakeRandomInt(0, 100) < wipechance || wipechance == 1)
{
WhipeHateList();
Message(13, "Your memory blurs");
}
break;
}

Congdar
10-15-2008, 07:16 PM
|| wipechance = 0)

is assigning a value of 0 to the variable wipechance, I think you want to check if it is equal to zero.

|| wipechance == 0)


So lucy says it's a 1% chance for Guide Memory Blur, not 100% so you shouldn't use || wipechance == 0) either. Maybe if the value is 0 then set it to 1?

if(wipechance == 0) {
wipechance = 1;
}
if(MakeRandomInt(0, 100) < wipechance)


or maybe it's a float value and it's coming back as 0 since wipechance is an int and it's really equal to 0.9999997

trevius
10-16-2008, 05:27 PM
I changed the code in the first post. Tested it and it works great! Guide Memory Blur works basically 100% now.

Congdar
10-17-2008, 09:04 AM
???

Guide Memory Blur should only work 1% or am I not understanding Lucy's entry?

steve
10-17-2008, 12:45 PM
I never understood the Guide Memory Blur. It was single target only and when used around multiple agro mobs, the others always reaggro'd the blurred mob. It never worked 100% of the time, but if it does on the emulator, I see that as a definite improvement.

Congdar
10-17-2008, 01:42 PM
Maybe it should be by spell_id then because guide memory blur isnt the only spell with 1% chance.

trevius
10-17-2008, 04:39 PM
I was a guide on live for about a year. I used guide memory blur alot and it may not have been 100%, but it was very close. Maybe we need to look at the base of different memblur spells and see if we might have the calculations wrong. Maybe 1 is the highest and 10 is the lowest? I dunno. I checked regular Memory Blur and it was set to 10. I am 100% sure that guide memory blur worked much better than normal memory blur. It was given to guides to help move stuck mobs or help with certain other NPC issues. If it wasn't close to 100%, then it would have been useless.

steve
10-17-2008, 06:14 PM
Maybe they improved it over the years, but when I was around, it had to be spammed quite a bit to get it to work. And it was useless for mobs that had to be moved around multiple spawns on the same faction. I tried for quite a bit for them to put Eugene's Memblur on the clickie (AE mem blurr) but it never saw the light of day.

Angelox
10-17-2008, 06:25 PM
I used memblur alot with a enchanter I had - had this enchanter for years. I was always under the impression memblur was also charisma related ( that could be wrong).
Anyways, for an enchanter, memblur was very effective and hardly ever failed. I would imagine for a GM, it should be at least better.
I don't see where it would matter anyway - if your a GM, you're not really playing legal anymore, might as well as have a fail-proof memblur too.