• 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!

Kazordoon wagon

cedooooo

New Member
Joined
Jan 7, 2013
Messages
13
Reaction score
0
Anyone have script of kazordoon wagons?
Rep ++

Anyone can help? Need script of wagons in kazordoon depot.
 
Last edited by a moderator:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

  if item.itemid == 7132 then
    return
    elseif(item.actionid == 53232) and getPlayerStorageValue(cid, 35974) <= 1 then
       doTeleportThing(getTopCreature({x=33167,y=31639,z=7}).uid, {x=33110,y=31589,z=12})
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have been teleported.")
    elseif (item.actionid == 53233) and getPlayerStorageValue(cid, 35974) <= 1 then
        doTeleportThing(getTopCreature({x=33107,y=31590,z=12}).uid, {x=33167,y=31639,z=7})
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have been teleported.")
    elseif (item.actionid == 53234) and getPlayerStorageValue(cid, 35974) <= 1 then
        doTeleportThing(getTopCreature({x=33109,y=31588,z=12}).uid, {x=33187,y=31697,z=13})
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have been teleported.") 
    elseif (item.actionid == 53235) and getPlayerStorageValue(cid, 35974) <= 1 then
        doTeleportThing(getTopCreature({x=33187,y=31697,z=13}).uid, {x=33110,y=31589,z=12})
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have been teleported.") 
    end
    return true
end

I found that on otland, but i dont know how to put it to work.
Thank's.
 
Last edited by a moderator:
Hello cedooooooooooooooooooooo,

following: This script wont work if you don't have the ActionID's declared on your actions.lua.

Try to get that actions.lua from the same place you found this script.

I don't know much about 8.0+ servers, I mainly work with oldschool stuff, but once you got it, I can try to explain you how to make it work.

For now all I can say is you need actionID's inside your actions.lua to make it work, there could also be a problem with your StorageID's (conflicts).
 
<action itemid="7132" event="script" value="wagon.lua"/> this is not going to work.

The wagon script says: if item.itemid == 7132 then...

that 7132 must be the wagon(? sorry I can't give you an exact answer since I don't use newer tibia versions)

Once you click the wagon and it has the actionID 53232, or 53233 or 5324 or 53235 it will teleport you somewhere.

These actionID's must go into the actions.lua file.
 
Ensure the correct actionID's are placed on the wagons and/or start posting some errors.
 
local config = {
-- outside wagons --
[50136] = Position(32618, 31899, 9),
[50137] = Position(32620, 31899, 9),
[50138] = Position(32614, 31899, 9),
[50139] = Position(32616, 31899, 9),
-- kaz main gate wagons --
[50140] = Position(32673, 31975, 15), -- Steamboat
[50141] = Position(32625, 31921, 11), -- Temple
[50142] = Position(32605, 31902, 9), -- Shops
[50143] = Position(32654, 31902, 8), -- Depot
-- kaz temple wagons --
[50144] = Position(32575, 31974, 9), -- Main gate
[50145] = Position(32674, 31975, 15), -- Steamboat
[50146] = Position(32605, 31907, 9), -- Shops
[50147] = Position(32655, 31902, 8), -- Depot
-- kaz steamboat wagons --
[50148] = Position(32575, 31977, 9), -- Main gate
[50149] = Position(32626, 31921, 11), -- Temple
[50150] = Position(32605, 31908, 9), -- Shops
[50151] = Position(32660, 31902, 8), -- Depot
-- kaz depot wagons --
[50152] = Position(32575, 31968, 9), -- Main gate
[50153] = Position(32631, 31921, 11), -- Temple
[50154] = Position(32605, 31903, 9), -- Shops
[50155] = Position(32679, 31975, 15), -- Steamboat
-- kaz shop wagons --
[50156] = Position(32678, 31975, 15), -- Steamboat
[50157] = Position(32630, 31921, 11), -- Temple
[50158] = Position(32659, 31902, 8), -- Depot
[50159] = Position(32575, 31971, 9), -- Main gate
-- inside to outside wagons --
[50230] = Position(32600, 31875, 7), -- Kazordoon Surface North
[50231] = Position(32577, 31929, 0), -- Colossus Top
[50232] = Position(32619, 31944, 7), -- Kazordoon Surface South
[50233] = Position(32553, 31930, 7), -- Kazordoon Surface West
-- Lost Cavern
[50245] = Position(32526, 31840, 9), -- To: Entrance Area
[50246] = Position(32559, 31852, 7), -- To: Entrance Door
[50247] = Position(32499, 31827, 9), -- To: Crystal Storage
[50248] = Position(32517, 31806, 9), -- To: Crystal Mining
[50249] = Position(32515, 31827, 9), -- To: Entrance Area
[50250] = Position(32489, 31812, 9), -- To: Crystal Cultivation
[50251] = Position(32495, 31833, 9), -- To: Crystal Storage
[50252] = Position(32511, 31806, 9), -- To: Crystal Mining
[50253] = Position(32498, 31807, 9), -- To: Crystal Cultivation
[50254] = Position(32516, 31829, 9) -- To: Entrance Area
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local targetPosition = config[item.actionid]
if not targetPosition then
return true
end

if item.actionid < 50245 and player:getStorageValue(Storage.wagonTicket) < os.time() then
player:say("Purchase a weekly ticket from Gewen, Lokur in the post office, The Lukosch brothers or from Brodrosch on the steamboat.", TALKTYPE_MONSTER_SAY)
return true
end

player:addAchievementProgress('Rollercoaster', 100)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(targetPosition)
targetPosition:sendMagicEffect(CONST_ME_TELEPORT)
return true
end


WHY I CANT USE THAT SCRIPT? I GET ERROR. I THINK TO NEED CONVERT SCRIPT FOR 8.6 SERVERS.
 
Back
Top