Please help!,
1. This can just add Wall not remove!
2. This dont remove anything... i just got problem with remove!
Edit: And this dont work!! plx haaalp
1. This can just add Wall not remove!
Code:
-- Script by Ates, Add/Remove Wall!
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = {x=31727, y=31957, z=11, stackpos=1} -- The Pos
wallFromPos = getThingfromPos(pos) -- It get item uid
local wall = 3366 -- 'ID of Wall'
if item.itemid == 1945 then
doRemoveItem(wallFromPos.uid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You removed the Wall.")
doTransformItem(item.id, 1946) -- It transform switch to id 1946
elseif item.itemid == 1946 then
doCreateItem(wall, 1, pos)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You added the Wall.")
doTransformItem(item.id, 1945) -- It transform switch to id 1945
end
end
Code:
function onStepIn(cid, item, position, fromPosition)
local pos = {X=31688, Y=31954, Z=10}
local tile = 474
local wall = 1497
local wallFromPos = getThingfromPos(pos) -- It get item uid
if item.itemid == tile and item.actionid == 40000 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You removed the magic wall.")
doRemoveItem(wallFromPos.uid, 1)
end
end
Edit: And this dont work!! plx haaalp
Code:
local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["Ushuriel"] = { { x = 33070, y = 31784, z = 13 }, { x = 33157, y = 31728, z = 11, stackpos = 1 } },
["Annihilon"] = { { x = 33199, y = 31687, z = 12 }, { x = 33197, y = 31704, z = 11, stackpos = 1 } },
["Hellgorak"] = { { x = 33110, y = 31681, z = 12 }, { x = 33104, y = 31735, z = 11, stackpos = 1 } },
["Madareth"] = { { x = 33152, y = 31782, z = 12 }, { x = 33197, y = 31768, z = 11, stackpos = 1 } },
["Zugurosh"] = { { x = 33372, y = 31614, z = 14 }, { x = 33130, y = 31703, z = 11, stackpos = 1 } },
["Latrivan"] = { { x = 33038, y = 31752, z = 15 }, { x = 33232, y = 31734, z = 11, stackpos = 1 } }
}
}
local function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
Last edited: