PenUltima Online

It is currently Sun Oct 12, 2008 4:19 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Warn Command
PostPosted: Sun Aug 03, 2008 3:44 am 
Offline

Joined: Sat Aug 05, 2006 11:43 am
Posts: 176
I just thought it would be nice, this if for the Pol96 distro.

Code:
use uo;
use os;

include "include/attributes";

program textcmd_warn( who )   
   var trgt := Target( who );
   var t_health := GetHp(trgt);
   var t_minus := t_health - 1;

   SendSysMessage(who, "Who do you wish to warn?", color := 65);

   //Just for general sillyness.
   if(trgt.Name == "Runtest" || trgt.Name == "The Duke of Yew")
      SendSysMessage(who, "You can not target this!", color := 65);
      SendSysMessage(trgt, trgt.Name + ", you have been targeted for warn.", color := 65);
      return;
   endif

   //Actual effect and reduction.
   SendSysMessage( who, "They have been warned.", color := 65 );
   PlayLightningBoltEffect(trgt);
   PlaySoundEffect( trgt, 0x0207 );
   PlayLightningBoltEffect(trgt);
   PlaySoundEffect( trgt, 0x0207 );
   SendSysMessage( trgt, "YOU ARE BEING WARNED!", color := 480, font := 3 );
   //Leave one hp.
   ApplyRawDamage( trgt, t_minus );
      sleep(2);
      PlayLightningBoltEffect(trgt);
      PlaySoundEffect( trgt, 0x0029 );

endprogram

_________________
I am sorry, Runtest is to cool to see you right now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl