• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Modal window Teleport_spot [Help with storageid]

Mariuskens

Sword Art Online 2D-MMORPG
Joined
Nov 21, 2008
Messages
1,009
Reaction score
119
Location
Spain
GitHub
Olimpotibia
local pos1 = {x=32485, y=32604, z=7}
local pos2 = {x=32540, y=33586, z=6}
local pos3 = {x=33198, y=33184, z=6}
local pos4 = {x=50, y=80, z=7}
local pos5 = {x=135, y=53, z=5}
local pos6 = {x=50, y=80, z=7}
local pos7 = {x=135, y=53, z=5}
local pos8 = {x=50, y=80, z=7}
local pos9 = {x=135, y=53, z=5}
local pos10 = {x=50, y=80, z=7}
local pos11 = {x=135, y=53, z=5}
local pos12 = {x=50, y=80, z=7}
local pos13 = {x=135, y=53, z=5}
local pos14 = {x=50, y=80, z=7}
local pos15 = {x=135, y=53, z=5}
local pos16 = {x=50, y=80, z=7}
local pos17 = {x=135, y=53, z=5}
local pos18 = {x=50, y=80, z=7}
function onModalWindow(cid, modalWindowId, buttonId, choiceId, item, position, pos, toPosition, fromPosition, itemEx)
if modalWindowId == 1901 and choiceId == 1 then
doPlayerSendTextMessage(cid, 18, "You have teleported to Floor 1 at main Town.")
doTeleportThing(cid, pos2, true)
return true
end
if modalWindowId == 1901 and choiceId == 2 then
doPlayerSendTextMessage(cid, 18, "You have teleported to Floor 2 at main Town.")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 3 then
doPlayerSendTextMessage(cid, 18, "You have teleported to Floor 3 at main Town.")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 4 then
doPlayerSendTextMessage(cid, 18, "You have teleported to Floor 4 at main Town.")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 5 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 6 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 7 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 8 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 9 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 10 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 11 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 12 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 13 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 14 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 15 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 16 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 17 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
if modalWindowId == 1901 and choiceId == 18 then
doPlayerSendTextMessage(cid, 18, "You have joined Solo PvP")
doTeleportThing(cid, pos1, true)
return true
end
end

I can add some storageid cheking this player can teleport to destination X? Like it?

function onModalWindow(cid, modalWindowId, buttonId, choiceId, item, position, pos, toPosition, fromPosition, itemEx)
if modalWindowId == 1901 and choiceId == 1 getPlayerStorageValue(cid, StorageidBOSS001) == 1 then
doPlayerSendTextMessage(cid, 18, "You have teleported to Floor 1 at main Town.")
doTeleportThing(cid, pos1, true)
return true
end

It can possible? @Limos @Acubens
 
Last edited:
Back
Top