PenUltima Online

It is currently Fri Sep 05, 2008 6:32 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Kill Tile...
PostPosted: Wed Jul 09, 2008 9:01 am 
Offline

Joined: Fri Apr 14, 2006 9:36 am
Posts: 240
I'm making a kill tile, but only for monsters(so monsters can't enter a certain area)

But, I need to be able to check to see if the thing that stepped on the tile is a monster or a person...
So far I have a check that sees if a tamed animal steps on it...

now I need a check to see if its a human stepping on it and/or a check to see if its a monster/animal

something like this
Code:
if (who == monster)
ApplyRawDamage( who, GetHp(who) );
endif


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 10:18 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 405
Location: San Diego, California
Code:
use uo;

program WalkOnTile(mobile, tile, prev_x, prev_y, prev_z)
     if ( !mobile.IsA(POLCLASS_NPC) )
          // Mobile wasn't an NPC - So therefore it was a player.
          return 0;
     endif

     //.... handle monster killing code here.
     //ApplyRawDamage(mobile, 10000);

     return 1;
endprogram
[/code]

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 11:12 am 
Offline

Joined: Fri Apr 14, 2006 9:36 am
Posts: 240
That worked, thanks


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: Sadahar 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