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

script after killing the monster you can go through the door

cocacola13

Member
Joined
Jan 18, 2019
Messages
179
Reaction score
12
Location
poland
good morning I have a question, Can you make a script that after killing a monster allows you to go through the door. and if you don't kill him you can't go.
TFS 1.3
OtserverBR
 
Use a door like 1257, set actionId to the same you will use as storage in this script

LUA:
local storage = 108476
local monstername = "demon"
function onKill(player, target)
    if target:isPlayer() or target:getMaster() or target:getName():lower() ~= monstername:lower() then
        return true
    end
player:setStorageValue(storage, 1)
    return true
end
 
It's a creaturescript, you must name the script MonsterDoor.lua and save it in data/creaturescripts/scripts
Add a line in data/creaturescripts/creaturescript.xml
XML:
       <event type="kill" name="MonsterDoor" script="MonsterDoor.lua"/>
And in data/creaturescripts/scripts/others/login.lua
LUA:
player:registerEvent("MonsterDoor")
 
thank you for your help, and I have a question if you would be able to help me with the script that after typing the word in the chat. in a given x, y, z, teleports to a given place x, y, z,
 
Back
Top