Kill Tile...

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Kill Tile...

Post by Poi »

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: Select all

if (who == monster)
ApplyRawDamage( who, GetHp(who) );
endif
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Code: Select all

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]
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Post by Poi »

That worked, thanks
Post Reply