PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Warn Command

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Custom Script Releases
Display posts from previous:   

Author Message
runtest



Joined: 05 Aug 2006
Posts: 118

PostPosted: Sun Aug 03, 2008 7:44 am    Post subject: Warn Command Reply with quote

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

Post new topic   Reply to topic    PenUltima Online Forum Index -> Custom Script Releases All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty