Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Bing, DotBot

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 8:20 am
Go to the top of the page
Go to the bottom of the page

Gunner
Fledgling
GroupMembers
Posts10
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;i<ch->pcdata->remorts;i++)
		    {
			if (victim->fighting)
			damage( ch, victim, dam, sn );
		    }
		}
		
	    }
	    victim=victim->next_in_room;
	}
    }
return;
}
       
Post is unread #2 Aug 30, 2014, 7:42 am   Last edited Aug 30, 2014, 8: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 >>