yeah your native language has better explanation
I don't even use google translator lol
now I get what you mean,
this is a mining script,
the user has to mine the rock within a certain time
the rock has 5 HP, plant mode
if the user failed to hit the rock for 5 times within the certain time limit
the user will die -> the rock falls on the user
not that hard, the trick is spawn it with npc
then it trigger the npc and spawn a mob
if the mob is not killed within a certain time limit, the triggering player will be dead
prontera,155,184,5 script Shining Plant 1083,{
getmapxy .@map$, .@x, .@y, 1;
monster .@map$, .@x, .@y, "--ja--", 1083, 1, strnpcinfo(0)+"::OnMobDead";
hideonnpc strnpcinfo(0);
.alive = getcharid(3);
sleep 5000; // 5 seconds to mine
if ( .alive ) {
if ( attachrid( .alive ) ) { // player might log out
message rid2name( .alive ), "the rock has fallen onto you";
unitkill .alive;
}
}
.alive = 0;
killmonster strnpcinfo(4), strnpcinfo(0)+"::OnMobDead";
hideoffnpc strnpcinfo(0);
end;
OnMobDead:
.alive = 0;
end;
}if you don't like to use npc because needs to click twice,there is another way to make it trigger immediately by using mob controller system
but it needs source modification
EDIT:
lol I already tackling this topic before I see your bump post lol