wafuboe
Member
- Joined
- Dec 24, 2010
- Messages
- 881
- Solutions
- 2
- Reaction score
- 22
Hello,
Im having some issues doing the access for warzone 4,5,6, so im requesting if someone could use this part of this script to create something simple.
Use 30 gems on rock hollow geode, to remove stalagmite on x position open a teleport for x amount of time then add the stalagmite. Usinf tfs 1.4.2
thank you,
Im having some issues doing the access for warzone 4,5,6, so im requesting if someone could use this part of this script to create something simple.
Use 30 gems on rock hollow geode, to remove stalagmite on x position open a teleport for x amount of time then add the stalagmite. Usinf tfs 1.4.2
thank you,
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if not player then
return true
end
if not target:isItem() then
return false
end
if target:isCreature() then
return false
end
local WarzoneVI = Position(91, 212, 15)
local WarzoneIV = Position(222, 98, 15)
local WarzoneV = Position(140, 15, 15)
local geodeId = 30166
local targetPosition = target:getPosition()
if targetPosition == WarzoneIV and target:getId() == geodeId then -- Warzone 4 BOSS!!!
if Game.getStorageValue(GlobalStorageKeys.DangerousDepths.Geodes.WarzoneIV) < 30 then
targetPosition:sendMagicEffect(CONST_ME_HITAREA)
item:remove(1)
if Game.getStorageValue(GlobalStorageKeys.DangerousDepths.Geodes.WarzoneIV) < 0 then
Game.setStorageValue(GlobalStorageKeys.DangerousDepths.Geodes.WarzoneIV, 0)
end
Game.setStorageValue(GlobalStorageKeys.DangerousDepths.Geodes.WarzoneIV, Game.getStorageValue(GlobalStorage.DangerousDepths.Geodes.WarzoneIV) + 1)
if Game.getStorageValue(GlobalStorageKeys.DangerousDepths.Geodes.WarzoneIV) == 30 then
local spectators = Game.getSpectators(targetPosition, false, true, 3, 3, 3, 3)
for _, spectator in pairs(spectators) do
if spectator:isPlayer() then
spectator:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This crystal geode is shaking from a battle nearby.")
end
end
local stalagmites = Tile(Position(223, 98, 15)):getItemById(386)
if stalagmites then
stalagmites:remove()
local teleport = Game.createItem(1387, 1, Position(223, 98, 15))
teleport:setActionId(57243)
addEvent(function()
if teleport then
teleport:remove(1)
Game.createItem(386, 1, Position(223, 98, 15))
end
end, 30*1000)
addEvent(clearForgotten, 30*60*1000, Position(295, 156, 15), Position(333, 174, 15), Position(225, 98, 15), GlobalStorage.DangerousDepths.Geodes.WarzoneIV)
startWarzoneIV()
end
end
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The crystal geode can't carry any more crystals.")
end
end