Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
AhrefsBot, Google

Members: 0
Guests: 25
Stats
Files
Topics
Posts
Members
Newest Member
489
3,791
19,644
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » General » Coding » Another problem with Merc 2.2
Forum Rules | Mark all | Recent Posts

Another problem with Merc 2.2
< Newer Topic :: Older Topic > Problem with spell

Pages:<< prev 1 next >>
Post is unread #1 Aug 28, 2014 10:20 am   
Go to the top of the page
Go to the bottom of the page

Gunner
Fledgling
GroupMembers
Posts11
JoinedMay 26, 2011

 
Hi! thanks for the answer, the problema is fixed.

now I have another problema:
the spell 'high explosive', has a bug that does not allow to start a fight using that spell.
Does not start the fight, or starts but does not hurt, as if he had sent the command to kill.

the code here , any idea to solve this problem?
I'm sorry for my f****** english :/
void spell_high_explosive( int sn, int level, CHAR_DATA *ch, void *vo )
{
    CHAR_DATA *victim = (CHAR_DATA *) vo;
    int dam;
    int pmove;
    int i;
    int max;

    dam = number_range( level/2, 100 );
    pmove = ch->move / 10;
    ch->move -= 3*pmove;
    dam += 6 * pmove ;
    max = ch->level*5 + 300;
    if (ch->max_move > max ) ch->max_move-=10;
    if ( saves_spell( level, victim ) )
	dam = (dam*2)/3;
    if (ch->in_room)
    {
	victim=ch->in_room->people;
	while (victim)
	{
	    if (victim->fighting == ch)
	    {
		damage( ch, victim, dam, sn );
		if (ch->pcdata)
		{
		    for (i=0;ipcdata->remorts;i++)
		    {
			if (victim->fighting)
			damage( ch, victim, dam, sn );
		    }
		}
		
	    }
	    victim=victim->next_in_room;
	}
    }
return;
}

Post is unread #2 Aug 30, 2014 9:42 am   Last edited Aug 30, 2014 10:10 am by Patriot
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

 
Gunner,

It is looking for a victim the caster is fighting. Remove the fighting check if u want but then it will hit all players even if grouped unless u add a check for that.

Side note, why are you using Merc 2.2? Heh, I know you like it I'm sure. Just much more modern codebases that are more robust out there.

Pages:<< prev 1 next >>