Dankoo
Active Member
- Joined
- Sep 4, 2010
- Messages
- 1,007
- Reaction score
- 27
Can't remove an item with doRemoveItem function :s
some parts of the script
creaturescripts - a monster is summoned and a statue was supposed to be gone, but I receive a message in console saying "<luaDoRemoveItem> item not found>" the creature is summoned, but the statue stills there
another creaturescript, when you kill the boss that was summoned in above script
and movements, when the player enter the portal and statue and the portal itself was supposed to disappear, but no, the GROUND disappear and the items still there :x
suggestions?
some parts of the script
creaturescripts - a monster is summoned and a statue was supposed to be gone, but I receive a message in console saying "<luaDoRemoveItem> item not found>" the creature is summoned, but the statue stills there
LUA:
local statue_iten_pos = {x=32478,y=31758,z=10, stackpos=1}
doRemoveItem(statue_iten_pos.uid)
another creaturescript, when you kill the boss that was summoned in above script
LUA:
local config = {
teleportId = 1387,
statueId = 8835,
bosse = "Black Knight"
}
local portal_in_pos = {x = 32477, y = 31758, z = 10}
local statue_in_pos = {x = 32476, y = 31758, z = 10}
local position = portal_in_pos
teleport = doCreateItem(config.teleportId,255,position)
statue = doCreateItem(config.statueId,255,statue_in_pos)
doSetItemActionId(teleport, 9023)
and movements, when the player enter the portal and statue and the portal itself was supposed to disappear, but no, the GROUND disappear and the items still there :x
LUA:
function onStepIn(cid, item, frompos, item2, topos)
local portal_in_pos = {x = 32477, y = 31758, z = 10}
local statue_in_pos = {x = 32476, y = 31758, z = 10}
local novapos = {x=32360, y = 31782, z = 7}
local portal_iten_pos = getThingfromPos(portal_in_pos)
local statue_iten_pos = getThingfromPos(statue_in_pos)
if item.actionid == 9023 then
getThingfromPos(getPlayerPosition(cid))
doSendMagicEffect(getPlayerPosition(cid),2)
doTeleportThing(cid,novapos)
doSendMagicEffect(novapos,10)
doRemoveItem(portal_iten_pos.uid, 255)
doRemoveItem(statue_iten_pos.uid, 255)
end
end
suggestions?