• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent onDeath Removes Door

-.Savage.-

New Member
Joined
Jul 2, 2008
Messages
32
Reaction score
2
i been trying to get this script to work but i cant figure out
why it isnt working this script is suppose to
remove the door to a safe house, if some1 can fix the script
id be greatful thanks alot. and its suppose to broadcast
to the whole server but i dont know the function so its the orange message lol

Lua:
local monsters = { 
--name = storage 
["Orshabaal"] = 35950, 
}

doorpos = {x=1051, y=1088, z=7, stackpos=1}

 function onKill(cid, target)
 if(isMonster(target) == TRUE) then 
local name = getCreatureName(target) 
getdoor = getThingfromPos(doorpos)
local monster = monsters[string.lower(name)] 
if(monster) then 
local killedMonsters = getPlayerStorageValue(cid, monster) 
if(killedMonsters == -1) then 
killedMonsters = 1 
end 
doRemoveItem(getdoor)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Black Teams Safe House Is Now Open")
 setPlayerStorageValue(cid, monster, killedMonsters + 1) 
end 
end
 return TRUE
 end
 
Back
Top