Login
User Name:

Password:



Register

Forgot your password?
Any Smaug muds running?
Oct 5, 2024 4:34 pm
By Zedethar
SmaugFUSS 1.8/1.9
Sep 21, 2024 5:04 am
By Elwood
Bug: char_check( )
Aug 31, 2024 12:27 am
By GatewaySysop
Bug: move_char( )
Aug 30, 2024 3:52 am
By GatewaySysop
Bug: spell_animate_dead
Aug 25, 2024 10:48 pm
By GatewaySysop
Discord Websocket Server
Author: Khonsu
Submitted by: Khonsu
Mapout Fix
Author: Khonsu
Submitted by: Khonsu
Progfind command
Author: Khonsu
Submitted by: Khonsu
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
Users Online
Bing, DuckDuckGo

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
492
3,803
19,667
598
MADEiUM

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 >>