• 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!

kill monster remove wall

kimokimo

Kimo
Joined
Jan 25, 2011
Messages
821
Solutions
6
Reaction score
156
GitHub
karimadnan
can anyone make this when player kill monster then remove wall for 10min and then back again :) +rep
 
Lua:
function onDeath(cid, corpse, killer) 

local M ={
 ["rat"] = {Pos = {x=177,y=40,z=7},id= 1058 ,time = 600},
}

local x = M[getCreatureName(cid)]
function criar() 
        local parede = getTileItemById(x.Pos, x.id) 
        doCreateItem(x.id, 1, x.Pos) 
        end
if x then
        local parede = getTileItemById(x.Pos, x.id) 
        if parede then 
                doRemoveItem(parede.uid, 1) 
                 doCreatureSay(cid, "The wall will appears in "..x.time.." seconds.", TALKTYPE_ORANGE_1) 
                addEvent(criar, x.time*1000) 
        end 
end
return TRUE 
end
 
creaturescript.xml
PHP:
<event type="death" name="KillMonster" event="script" value="KillMonster.lua"/>

in login.lua
PHP:
	registerCreatureEvent(cid,'KillMonster')

in monster after of: </flags>
add
PHP:
<script>
   <event name="KillMonster"/>
</script>
 
Lua:
local M ={
 ["rat"] = {Pos = {x=177,y=40,z=7},id= 1058 ,time = 600},
}

ID = Id of wall will be removed. Exmaple: 1058
and monster name
 
bRrSlGS0m.png


I don't get this...
 
Back
Top