president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Hello, I want help with 2 scripts that one isn't working, and another is to create another part..
The Svargrond Arena isn't working, I kill the monsters, but the player doesn't go to next part, and keep saying "First kill the monsters".
And, I want make a part for the Zullaza Gate:
I want like:
- If have Zulazza in the position from: local from = {x = 33343, y = 31606, z = 1} - local to = {x = 33351, y = 31613, z = 1} - So, will open the gate and after 10 minutes the gate will be close again. And will open a teleport in a postion 999, 999, 7.
# Gesior
When I try create a new page in the Gesior all menus come to like this:
Thanks.
The Svargrond Arena isn't working, I kill the monsters, but the player doesn't go to next part, and keep saying "First kill the monsters".
LUA:
function onStepIn(cid, item, position, fromPosition)
if InitArenaScript == 0 then
InitArenaScript = 1
-- make arena rooms free
for i = 0,9 do
setGlobalStorageValue(42300+i, 0)
setGlobalStorageValue(42400+i, 0)
end
checkArenaRooms({})
end
local arena_room = item.actionid
local player_arena = getPlayerStorageValue(cid, 42355)
if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then
if getGlobalStorageValue(cid, arena_room) == 0 then
local monster_uid = getGlobalStorageValue(arena_room+100)
if monster_uid > 0 then
if isCreature(monster_uid) == TRUE then
doRemoveCreature(monster_uid)
end
end
local spawn_pos = getThingPos(arena_room)
local monster = doCreateMonster(arena_monsters[arena_room+getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z})
setGlobalStorageValue(arena_room+100, monster)
doTeleportThing(cid, spawn_pos, TRUE)
setGlobalStorageValue(arena_room, cid)
setGlobalStorageValue(arena_room-1, 0)
setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time)
else
doTeleportThing(cid, fromPosition, TRUE)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, getCreatureName(getGlobalStorageValue(cid, arena_room))..' is now in next room. Wait a moment and try again.')
end
else
doTeleportThing(cid, fromPosition, TRUE)
doCreatureSay(cid, 'First kill monster!', TALKTYPE_ORANGE_1, false, cid)
end
if arena_room == 42300 then
setPlayerStorageValue(cid, 42351, 0)
setPlayerStorageValue(cid, 42352, 1)
end
return TRUE
end
function checkArenaRooms(param)
addEvent(checkArenaRooms, 1000, {})
for i = 42300, 42309 do
local player = getGlobalStorageValue(i)
if isPlayer(player) == TRUE then
local player_storage = getPlayerStorageValue(player, 42350)
if player_storage <= os.time() then
local leave = {x=32312, y=31134, z=6}
doTeleportThing(player, leave, TRUE)
setPlayerStorageValue(player, 42350, 0)
setGlobalStorageValue(i, 0)
doPlayerSendTextMessage(player, MESSAGE_EVENT_ADVANCE,'You have been kicked from arena! You have only ' .. arena_room_max_time .. ' seconds for one room.')
elseif player_storage - 10 <= os.time() then
doPlayerSendTextMessage(player, MESSAGE_EVENT_ADVANCE, 'You\'ll be kicked in ' .. player_storage - os.time() .. ' seconds.')
end
else
setGlobalStorageValue(i, 0)
end
end
end
And, I want make a part for the Zullaza Gate:
I want like:
- If have Zulazza in the position from: local from = {x = 33343, y = 31606, z = 1} - local to = {x = 33351, y = 31613, z = 1} - So, will open the gate and after 10 minutes the gate will be close again. And will open a teleport in a postion 999, 999, 7.
LUA:
removals = {
{item = 9486, pos = {x=33303, y=31491 , z=7 }},
{item = 9486, pos = {x=33304, y=31491 , z=7 }},
{item = 9486, pos = {x=33305, y=31491 , z=7 }},
{item = 9486, pos = {x=33306, y=31491 , z=7 }},
{item = 9486, pos = {x=33307, y=31491 , z=7 }},
{item = 9486, pos = {x=33308, y=31491 , z=7 }},
{item = 9486, pos = {x=33309, y=31491 , z=7 }},
{item = 9485, pos = {x=33303, y=31498 , z=7 }},
{item = 9485, pos = {x=33304, y=31498 , z=7 }},
{item = 9485, pos = {x=33305, y=31498 , z=7 }},
{item = 9485, pos = {x=33306, y=31498 , z=7 }},
{item = 9485, pos = {x=33307, y=31498 , z=7 }},
{item = 9485, pos = {x=33308, y=31498 , z=7 }},
{item = 9485, pos = {x=33309, y=31498 , z=7 }},
{item = 9485, pos = {x=33310, y=31498 , z=7 }}
}
local from = {x = 33343, y = 31606, z = 1}
local to = {x = 33351, y = 31613, z = 1}
local monsters = {"zulazza the corruptor"}
function onThink(interval, lastExecution, thinkInterval)
for x = from.x, to.x do
for y = from.y, to.y do
local v = getTopCreature({x = x, y = y, z = 1}).uid
if isPlayer(v) then
return true
elseif isMonster(v) then
table.insert(monsters, v)
end
end
end
for i = 1, #removals do
removals[i].pos.stackpos = 1
doRemoveItem(getThingfromPos(removals[i].pos).uid, 1)
end
return TRUE
end
# Gesior
When I try create a new page in the Gesior all menus come to like this:
Thanks.