English clean items from floor

2 replies
Goto Page
To the start Previous 1 Next To the start
02.03.13 10:53:14 am
Up
Sudden Death
User
Offline Off
Like in title, is it possible to clean items from floor?
Like from x 11 y 11 to x 15 y 15 clean all items on floor and npc, if possible (but no with explosion)

second question: spawnnpc haven't got health parametr, so i can't spawn npc with specified amount of health?
edited 1×, last 02.03.13 11:28:09 am
Sniffin'Man "If it cannot be done with lua, it must be you mama, coz she's too fat"
02.03.13 12:32:42 pm
Up
iii
User
Offline Off
user Sudden Death has written:
second question: spawnnpc haven't got health parametr, so i can't spawn npc with specified amount of health?


Code:
1
2
3
4
5
6
7
parse("spawnnpc 1 "..player(id,"tilex").." "..player(id,"tiley").." 0")
local objectlist=object(0,"table")
for _,npcid in pairs(objectlist) do
     if object(npcid,"health")==150 and object(npcid,"type")==30 then
          parse("damageobject "..npcid.." -850 0")
     end
end
02.03.13 01:27:44 pm
Up
Sudden Death
User
Offline Off
thanks iii
Sniffin'Man "If it cannot be done with lua, it must be you mama, coz she's too fat"
To the start Previous 1 Next To the start