Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing, DotBot

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,396
629
DarrenPayn
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Exempt...
Forum Rules | Mark all | Recent Posts

Exempt...
< Newer Topic :: Older Topic > Exempt missing..

Pages:<< prev 1 next >>
Post is unread #1 May 21, 2004, 9:29 am   Last edited Jun 1, 2005, 11:08 pm by RapidRunner
Go to the top of the page
Go to the bottom of the page

RapidRunner

GroupMembers
Posts72
JoinedDec 4, 2003

Command: Exempt

Re-posted, from a long time back, corrected with the stuff mentioned below, this should also look a lot better for formating wise on here..

CMDF do_exempt(CHAR_DATA *ch, char *argument)
{
  CHAR_DATA *victim;

   if(argument[0] == '\0')
   {   
   send_to_char("&OSyntax: exempt <victim>&D\n\r", ch);
   return; 
   } 

   if((victim = get_char_world(ch, argument)) == NULL) 
   {   
   ch_printf(ch, "&OCould not find &Y%s&D.\n\r", victim->name );
   return;
    } 

   if(IS_NPC(victim))
   {
   ch_printf(ch, "&Y%s&O is not a valid player&D.\n\r", victim->short_descr );
   return;
   }

  if( !IS_PLR_FLAG( victim, PLR_EXEMPT ) )
  { 
  SET_PLR_FLAG( victim, PLR_EXEMPT ); 
  send_to_char("&OYou are now protected from Auto-Deletion&D.\n\r",victim);
  ch_printf(ch, "&Y%s&O is now protected from Auto-Deletion&D.\n\r", victim->name );
  return;
  }

  else 

  if( IS_PLR_FLAG( victim, PLR_EXEMPT ) )
  {
  REMOVE_PLR_FLAG( victim, PLR_EXEMPT );
  send_to_char("&OYou are no longer protected from Auto-Deletion&D.\n\r",victim);
  ch_printf(ch, "&Y%s&O is no longer protected from Auto-Deletion&D.\n\r", victim->name );
  return;
  }
 }
       
Post is unread #2 May 21, 2004, 5:23 pm   Last edited Nov 18, 2007, 4:55 pm by Samson
Go to the top of the page
Go to the bottom of the page

cynshard

GroupMembers
Posts95
JoinedNov 19, 2003

else if (IS_PLR_FLAG( victim, PLR_EXEMPT ) )
{
 REMOVE_PLR_FLAG( victim, PLR_EXEMPT );
send_to_char("You have been UN-Exempt from Deletion.\r\n",victim);
send_to_char("They have been UN-Exempted from Deletion.\r\n",victim);
return;
}
}


should be

else if (IS_PLR_FLAG( victim, PLR_EXEMPT ) )
{
 REMOVE_PLR_FLAG( victim, PLR_EXEMPT );
send_to_char("You have been UN-Exempt from Deletion.\r\n",victim);
send_to_char("They have been UN-Exempted from Deletion.\r\n",ch);
return;
}
}


Also, I think you meant to say players instead of mobs here:
if(IS_NPC(victim))
{
  send_to_char("You can only exempt mobs.\r\n", ch);
  return;
}
       
Post is unread #3 May 21, 2004, 9:31 pm
Go to the top of the page
Go to the bottom of the page

RapidRunner

GroupMembers
Posts72
JoinedDec 4, 2003

Ahh, ok.. i didn't notice the last part being sent to victim, the npc check being pointing to the wrong thing

Thanks for the corrections, i put these two fixes into the post i did
       
Pages:<< prev 1 next >>