• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Quest, moving walls, kill player

sestorme

Member
Joined
Dec 9, 2011
Messages
272
Reaction score
6
Location
Birmingham, UK
I am making a quest that will result in walls moving from the sides towards the middle of the room to get an opportunity to squash players locked in this room. There are ways to run away, but this is not the case. I got to the point of moving walls etc, what is my issue, how do I actually kill a player that didn't managed to run away? For now walls spawn on him and he's just getting locked, which is what I actually expected. I rep for an idea how to detect player on specific tile and a way to kill him. Thank you.

//I mean, I cold easily kill him using

doCreatureAddHealth

and give negative value, but I still need to find a way how to register his location. There will be few of them.
 
Last edited:
maybe like:
LUA:
if isPlayer(newWallPosition) then
     doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
end
This would set his HP to 0 and make him die actually.
"newWallPosition" should be declared in your moving wall function somewhere.
If the player manages to stay alive until the 4 walls corner him just check if he's still in the middle and add the lines I wrote above to kill him, or squeeze him :>
 

Similar threads

  • Question Question
Replies
11
Views
629
Back
Top