ivvanek
New Member
- Joined
- Mar 24, 2009
- Messages
- 113
- Reaction score
- 3
Svargrond Arena
When enter into teleport and was teleported into arena the monsters doesn't respawn.
I have put in mapeditor on Teleport ActionID 26100
Here is scripts:
XML
LUA
When enter into teleport and was teleported into arena the monsters doesn't respawn.
I have put in mapeditor on Teleport ActionID 26100
Here is scripts:
XML
XML:
<!-- Arena Quest-->
<action actionid="13100" script="quests/svargrond arena/arena_door.lua" />
<action actionid="26100" script="quests/svargrond arena/arena_door.lua" />
<action actionid="27100" script="quests/svargrond arena/arena_door.lua" />
<action actionid="28100" script="quests/svargrond arena/arena_door.lua" />
LUA
Lua:
local storages = {
[26100] = Storage.SvargrondArena.Greenhorn,
[27100] = Storage.SvargrondArena.Scrapper,
[28100] = Storage.SvargrondArena.Warlord
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
-- Cannot use opened door
if item.itemid == 5133 then
return false
end
if player:getStorageValue(Storage.SvargrondArena.Arena) < 1 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This door seems to be sealed against unwanted intruders.')
return true
end
-- Doors to rewards
local cStorage = storages[item.actionid]
if cStorage then
if player:getStorageValue(cStorage) ~= 1 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'It\'s locked.')
return true
end
item:transform(item.itemid + 1)
player:teleportTo(toPosition, true)
-- Arena entrance doors
else
if player:getStorageValue(Storage.SvargrondArena.Pit) ~= 1 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This door seems to be sealed against unwanted intruders.')
return true
end
item:transform(item.itemid + 1)
player:teleportTo(toPosition, true)
end
return true
end
Last edited: