roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,210
- Solutions
- 35
- Reaction score
- 206
Hi, i have this scripts, its one quest like anihi, i want to att 2 things in this code.
1) team have 10minutes do make a quest, or they will be removed of the quest
2) if there is a team inside, the outside team must wait the first team finish. If the first team finish before 10 minutes, the other team can enter immediately, without having to wait the remaining time.
for example if the first team entered and did the quest in 5 minutes, the outside team does not need to wait another 5 minutes to enter, they can already enter immediately
1) team have 10minutes do make a quest, or they will be removed of the quest
2) if there is a team inside, the outside team must wait the first team finish. If the first team finish before 10 minutes, the other team can enter immediately, without having to wait the remaining time.
for example if the first team entered and did the quest in 5 minutes, the outside team does not need to wait another 5 minutes to enter, they can already enter immediately
LUA:
local player_positions = {
[1] = {fromPos = Position(1000, 1000, 7), toPos = Position(1000, 1000, 7)},
[2] = {fromPos = Position(1000, 1000, 7), toPos = Position(1000, 1000, 7)}
}
local monsters = {
[1] = {pos = Position(1000, 1000, 7), name = "Orshabaal"},
[2] = {pos = Position(1000, 1000, 7), name = "Orshabaal"}
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
for i = 1 , #monsters do
Game.createMonster(monsters[i].name, monsters[i].pos, false, true)
end
for i = 1, player_positions do
local creatures = Tile(player_positions[i].fromPos):getCreatures()
if creatures:isPlayer() then
creatures:teleportTo(player_positions[i].toPos)
end
end
return true
end