• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Boss Death = Remove item in "X" position

zerghel

Tsuni
Joined
Jul 1, 2008
Messages
299
Reaction score
9
I was Wondering if someone can make this script for me so the boss die and a blocking item in position x:589 y:1612 z:10 dissapears for 1 minute then appears again
i was searching but i couldn't find a script i'm using TFS 0.2 (8.42)
i know that here someone can help me with this
not like those lol's from otfans ^^

thx in advance =*

love u guys
 
i made but i am not tested.

creaturescripts>scripts>boss.lua
Code:
function onDeath(cid, corpse, killer)
local time = 60 -- in seconds
gatepos = {x=589, y=1612, z=10, stackpos=1}
getgate = getThingfromPos(gatepos)
local creaturename = getCreatureName(cid)
if creaturename == 'Ferumbras' and isPlayer(cid) == FALSE then
doRemoveItem(getgate.uid,1)
addEvent(createwall, (1000*time))
end
end

function createwall()
	if getThingfromPos({x=589, y=1612, z=10, stackpos=2}).itemid == 1027 then
	doCreateItem(getThingfromPos({x=589, y=1612, z=10, stackpos=2}).uid,1)
	doSendMagicEffect({x=589, y=1612, z=10, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end

creaturescripts.xml:
Code:
<event type="death" name="boss" script="boss.lua"/>


add this under </flags>
monstername.xml:
Code:
<script>
<event name="boss"/>
</script>

data/creaturescripts/scripts/login.lua, under "function onLogin(cid)" put...:
Code:
registerCreatureEvent(cid, "createwall")

if any bugs,write here.

Thanks.
 
Last edited:
LUA:
function onDeath(cid, corpse, killer)
local time = 60 -- in seconds
gatepos = {x=589, y=1612, z=10, stackpos=1}
getgate = getThingfromPos(gatepos)
local creaturename = getCreatureName(cid)
if creaturename == 'Ferumbras' and isPlayer(cid) == FALSE then
doRemoveItem(getgate.uid,1)
addEvent(createwall, (1000*time))
end
end

function createwall()
	if getThingfromPos({x=589, y=1612, z=10, stackpos=2}).itemid == 1027 then
	doCreateItem(getThingfromPos({x=589, y=1612, z=10, stackpos=2}).uid,1)
	doSendMagicEffect({x=589, y=1612, z=10, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end
 
it's good Pitufo but the item won't come back when the monster appear (1 minute)
the monster is Infernalist, the item to remove is 8428 (monk statue)
i don't know if i'm doing something wrong
 
Last edited:
boss.lua
Code:
  function onDeath(cid, corpse, killer)
local time = 60 -- in seconds
gatepos = {x=589, y=1612, z=10, stackpos=1}
getgate = getThingfromPos(gatepos)
local creaturename = getCreatureName(cid)
if creaturename == 'Infernalist' and isPlayer(cid) == FALSE then
doRemoveItem(getgate.uid,1)
addEvent(createwall, (1000*time))
end
end

function createwall()
        if getThingfromPos({x=589, y=1612, z=10, stackpos=2}).itemid == 8428 then
        doCreateItem(getThingfromPos({x=589, y=1612, z=10, stackpos=2}).uid,1)
        doSendMagicEffect({x=589, y=1612, z=10, stackpos=1}, CONST_ME_POFF)
        return TRUE
        end
end

infernalist.xml,under </flags>:
Code:
<script>
<event name="boss"/>
</script>

login.lua:
Code:
registerCreatureEvent(cid, "createwall")
 
i useed search and did'n find it for tfs 0.2

i did added the code under flags and changed the code for this one
but the monk statue won't appear again, i get no errors in console :(
 
Back
Top