i tried it but bugged server when i killed the monsteryou could edit the create teleport script to remove a wall instead of creating a teleport
local config = {
["demon"] = {time = 60, wallPos = {x = 992, y = 994, z = 7}},
}
local function deleteWall(tp)
local wall = getTileItemById(tp, 1107).uid
if(teleport > 0) then
doRemoveItem(teleport)
doSendMagicEffect(tp, CONST_ME_POFF)
end
return true
end
function onKill(cid, target)
local monster = config[getCreatureName(target):lower()]
if(isPlayer(target) or not monster) then
return true
end
doRemoveWall(1107, monster.toPos, monster.tpPos)
doCreatureSay(cid, "You have "..monster.time.." seconds to enter the teleport!", TALKTYPE_ORANGE_1)
addEvent(deleteWall, monster.time * 1000, monster.tpPos)
return true
end
but i posted script and not working :SUse the Request board for script requests.
If you have a script, but it's not working, then you can use Support.
Moving this for now.
Code:local config = { ["demon"] = {time = 60, wallPos = {x = 992, y = 994, z = 7}}, } local function deleteWall(tp) local wall = getTileItemById(tp, 1107).uid if(teleport > 0) then doRemoveItem(teleport) doSendMagicEffect(tp, CONST_ME_POFF) end return true end function onKill(cid, target) local monster = config[getCreatureName(target):lower()] if(isPlayer(target) or not monster) then return true end doRemoveWall(1107, monster.toPos, monster.tpPos) doCreatureSay(cid, "You have "..monster.time.." seconds to enter the teleport!", TALKTYPE_ORANGE_1) addEvent(deleteWall, monster.time * 1000, monster.tpPos) return true end
Sure we know what the issue is just by looking at the code, but you need to provide the error regardless, you can't just tell us your script doesn't work and leave it at that.because you are funny man![]()
i copied script from another and made some changes and its working good now ,CLOSEDOriginal Code
Sure we know what the issue is just by looking at the code, but you need to provide the error regardless, you can't just tell us your script doesn't work and leave it at that.
By providing as much information as possible increases your chances of getting help by 10 fold.
The table config, its element demon does not have properties called toPos or tpPos, teleport is not defined in deleteWall, doRemoveWall is not a tfs function and is not defined in the script. passing a nil value to deleteWall will also return an error.
You can't just copy and paste code into a script from other scripts and expect it to work without knowing what that code does. You should focus more on learning to write a script than editing it.