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

Solved help me Bug gate of expertise [video]

brTT

New Member
Joined
Jun 20, 2014
Messages
33
Reaction score
0
Base TFS 0.3.6 (Crying Damson) 8.54
I've tried to do in several different locations, and the same thing happens

i need help
 
Does this happen with every level door?
Please post doors.lua (data/actions)
Replace your doors.lua from a correct version of your tfs, in thisc ase 0.3.6.

door.lua
local function checkStackpos(item, position)
position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local thing = getThingFromPos(position)

position.stackpos = STACKPOS_TOP_FIELD
local field = getThingFromPos(position)

return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0)
end

local function doorEnter(cid, item, toPosition)
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if(fromPosition.x ~= CONTAINER_POSITION and isPlayerPzLocked(cid) and getTileInfo(fromPosition).protection) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
return true
end

if(getItemLevelDoor(item.itemid) > 0) then
if(item.actionid == 189) then
if(not isPremium(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
return true
end

doorEnter(cid, item, toPosition)
return true
end

local gender = item.actionid - 186
if(isInArray({PLAYERSEX_FEMALE, PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then
if(gender ~= getPlayerSex(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
return true
end

doorEnter(cid, item, toPosition)
return true
end

local skull = item.actionid - 180
if(skull >= SKULL_NONE and skull <= SKULL_BLACK) then
if(skull ~= getCreatureSkullType(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
return true
end

doorEnter(cid, item, toPosition)
return true
end

local group = item.actionid - 150
if(group >= 0 and group < 30) then
if(group > getPlayerGroupId(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
return true
end

doorEnter(cid, item, toPosition)
return true
end

local vocation = item.actionid - 100
if(vocation >= 0 and vocation < 50) then
local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
return true
end

doorEnter(cid, item, toPosition)
return true
end

if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
doorEnter(cid, item, toPosition)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
end

return true
end

if(isInArray(specialDoors, item.itemid)) then
if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) then
doorEnter(cid, item, toPosition)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
end

return true
end

if(isInArray(keys, item.itemid)) then
if(itemEx.actionid > 0) then
if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
doTransformItem(itemEx.uid, doors[itemEx.itemid])
return true
end

doPlayerSendCancel(cid, "The key does not match.")
return true
end

return false
end

if(isInArray(horizontalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then
local newPosition = toPosition
newPosition.y = newPosition.y + 1
local doorPosition = fromPosition
doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local doorCreature = getThingfromPos(doorPosition)
if(doorCreature.itemid ~= 0) then
local pzDoorPosition = getTileInfo(doorPosition).protection
local pzNewPosition = getTileInfo(newPosition).protection
if((pzDoorPosition and not pzNewPosition and doorCreature.uid ~= cid) or
(not pzDoorPosition and pzNewPosition and doorCreature.uid == cid and isPlayerPzLocked(cid))) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
else
doTeleportThing(doorCreature.uid, newPosition)
if(not isInArray(closingDoors, item.itemid)) then
doTransformItem(item.uid, item.itemid - 1)
end
end

return true
end

doTransformItem(item.uid, item.itemid - 1)
return true
end

if(isInArray(verticalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then
local newPosition = toPosition
newPosition.x = newPosition.x + 1
local doorPosition = fromPosition
doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local doorCreature = getThingfromPos(doorPosition)
if(doorCreature.itemid ~= 0) then
if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
else
doTeleportThing(doorCreature.uid, newPosition)
if(not isInArray(closingDoors, item.itemid)) then
doTransformItem(item.uid, item.itemid - 1)
end
end

return true
end

doTransformItem(item.uid, item.itemid - 1)
return true
end

if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) then
if(item.actionid == 0) then
doTransformItem(item.uid, doors[item.itemid])
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
end

return true
end

return false
end
 
How are they added in movements? Can you post that script?

closingdoor.lua in movements

function onStepOut(cid, item, position, fromPosition)
local newPosition = {x = position.x, y = position.y, z = position.z}
if(isInArray(verticalOpenDoors, item.itemid)) then
newPosition.x = newPosition.x + 1
else
newPosition.y = newPosition.y + 1
end

doRelocate(position, newPosition)
local tmpPos = {x = position.x, y = position.y, z = position.z, stackpos = -1}
local tileCount = getTileThingByPos(tmpPos)

local i = 1
local tmpItem = {uid = 1}
while(tmpItem.uid ~= 0 and i < tileCount) do
tmpPos.stackpos = i
tmpItem = getTileThingByPos(tmpPos)
if(tmpItem.uid ~= item.uid and tmpItem.uid ~= 0 and isMoveable(tmpItem.uid)) then
doRemoveItem(tmpItem.uid)
else
i = i + 1
end
end

doTransformItem(item.uid, item.itemid - 1)
return true
end
 
I mean your datapack, the folder called data, I assume you used an other one, because the default one doesn't have this problem.
 
I noticed you made an other support thread about an issue on a pokemon server, I assume this is the same server, which means you are not using the default datapack from TFS 0.3.6pl1 8.54.
Can you post the link where you downloaded the datapack?
Or you can also upload your actions and movements folder.
 
It's because of the walkback.lua in movements, which is changed in your datapack.
The script you have now always teleports the person back.
It should be this.
Code:
local SPECIAL_QUESTS = {2001}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
   if(not isPlayer(cid)) then
     return true
   end

   if(isContainer(item.uid)) then
     if(not isInArray(SPECIAL_QUESTS, item.actionid) and item.uid > 65535) then
       return true
     end
   elseif(getTileInfo(position).creatures <= 1) then
     return true
   end
 
   if(fromPosition.x == 0) then -- player just logged in
     fromPosition = getTownTemplePosition(getPlayerTown(cid))
     doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
   end

   doTeleportThing(cid, fromPosition, true)
   return true
end
 
It's because of the walkback.lua in movements, which is changed in your datapack.
The script you have now always teleports the person back.
It should be this.
Code:
local SPECIAL_QUESTS = {2001}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
   if(not isPlayer(cid)) then
     return true
   end

   if(isContainer(item.uid)) then
     if(not isInArray(SPECIAL_QUESTS, item.actionid) and item.uid > 65535) then
       return true
     end
   elseif(getTileInfo(position).creatures <= 1) then
     return true
   end

   if(fromPosition.x == 0) then -- player just logged in
     fromPosition = getTownTemplePosition(getPlayerTown(cid))
     doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
   end

   doTeleportThing(cid, fromPosition, true)
   return true
end
walkback in movements

local SPECIAL_QUESTS = {2001}
local fotos = {
["Bulbasaur"] = {fotopoke = 2377},
["Ivysaur"] = {fotopoke = 2378},
["Venusaur"] = {fotopoke = 2379},
["Charmander"] = {fotopoke = 2380},
["Charmeleon"] = {fotopoke = 2381},
["Charizard"] = {fotopoke = 2382},
["Squirtle"] = {fotopoke = 2383},
["Wartortle"] = {fotopoke = 2384},
["Blastoise"] = {fotopoke = 2385},
["Caterpie"] = {fotopoke = 2386},
["Metapod"] = {fotopoke = 2387},
["Butterfree"] = {fotopoke = 2388},
["Weedle"] = {fotopoke = 2389},
["Kakuna"] = {fotopoke = 2390},
["Beedrill"] = {fotopoke = 2391},
["Pidgey"] = {fotopoke = 2392},
["Pidgeotto"] = {fotopoke = 2393},
["Pidgeot"] = {fotopoke = 2394},
["Rattata"] = {fotopoke = 2395},
["Raticate"] = {fotopoke = 2396},
["Spearow"] = {fotopoke = 2397},
["Fearow"] = {fotopoke = 2398},
["Ekans"] = {fotopoke = 2399},
["Arbok"] = {fotopoke = 2400},
["Pikachu"] = {fotopoke = 2401},
["Raichu"] = {fotopoke = 2402},
["Sandshrew"] = {fotopoke = 2403},
["Sandslash"] = {fotopoke = 2404},
["Nidoran female"] = {fotopoke = 2405},
["Nidorina"] = {fotopoke = 2406},
["Nidoqueen"] = {fotopoke = 2407},
["Nidoran male"] = {fotopoke = 2408},
["Nidorino"] = {fotopoke = 2409},
["Nidoking"] = {fotopoke = 2410},
["Clefairy"] = {fotopoke = 2411},
["Clefable"] = {fotopoke = 2412},
["Vulpix"] = {fotopoke = 2413},
["Ninetales"] = {fotopoke = 2414},
["Jigglypuff"] = {fotopoke = 2415},
["Wigglytuff"] = {fotopoke = 2416},
["Zubat"] = {fotopoke = 2417},
["Golbat"] = {fotopoke = 2418},
["Oddish"] = {fotopoke = 2419},
["Gloom"] = {fotopoke = 2420},
["Vileplume"] = {fotopoke = 2421},
["Paras"] = {fotopoke = 2422},
["Parasect"] = {fotopoke = 2423},
["Venonat"] = {fotopoke = 2424},
["Venomoth"] = {fotopoke = 2425},
["Diglett"] = {fotopoke = 2426},
["Dugtrio"] = {fotopoke = 2427},
["Meowth"] = {fotopoke = 2428},
["Persian"] = {fotopoke = 2429},
["Psyduck"] = {fotopoke = 2430},
["Golduck"] = {fotopoke = 2431},
["Mankey"] = {fotopoke = 2432},
["Primeape"] = {fotopoke = 2433},
["Growlithe"] = {fotopoke = 2434},
["Arcanine"] = {fotopoke = 2435},
["Poliwag"] = {fotopoke = 2436},
["Poliwhirl"] = {fotopoke = 2437},
["Poliwrath"] = {fotopoke = 2438},
["Abra"] = {fotopoke = 2439},
["Kadabra"] = {fotopoke = 2440},
["Alakazam"] = {fotopoke = 2441},
["Machop"] = {fotopoke = 2442},
["Machoke"] = {fotopoke = 2443},
["Machamp"] = {fotopoke = 2444},
["Bellsprout"] = {fotopoke = 2445},
["Weepinbell"] = {fotopoke = 2446},
["Victreebel"] = {fotopoke = 2447},
["Tentacool"] = {fotopoke = 2448},
["Tentacruel"] = {fotopoke = 2449},
["Geodude"] = {fotopoke = 2450},
["Graveler"] = {fotopoke = 2451},
["Golem"] = {fotopoke = 2452},
["Ponyta"] = {fotopoke = 2453},
["Rapidash"] = {fotopoke = 2454},
["Slowpoke"] = {fotopoke = 2455},
["Slowbro"] = {fotopoke = 2456},
["Magnemite"] = {fotopoke = 2457},
["Magneton"] = {fotopoke = 2458},
["Farfetch'd"] = {fotopoke = 2459},
["Doduo"] = {fotopoke = 2460},
["Dodrio"] = {fotopoke = 2461},
["Seel"] = {fotopoke = 2462},
["Dewgong"] = {fotopoke = 2463},
["Grimer"] = {fotopoke = 2464},
["Muk"] = {fotopoke = 2465},
["Shellder"] = {fotopoke = 2466},
["Cloyster"] = {fotopoke = 2467},
["Gastly"] = {fotopoke = 2468},
["Haunter"] = {fotopoke = 2469},
["Gengar"] = {fotopoke = 2470},
["Onix"] = {fotopoke = 2471},
["Drowzee"] = {fotopoke = 2472},
["Hypno"] = {fotopoke = 2473},
["Krabby"] = {fotopoke = 2474},
["Kingler"] = {fotopoke = 2475},
["Voltorb"] = {fotopoke = 2476},
["Electrode"] = {fotopoke = 2477},
["Exeggcute"] = {fotopoke = 2478},
["Exeggutor"] = {fotopoke = 2479},
["Cubone"] = {fotopoke = 2480},
["Marowak"] = {fotopoke = 2481},
["Hitmonlee"] = {fotopoke = 2482},
["Hitmonchan"] = {fotopoke = 2483},
["Lickitung"] = {fotopoke = 2484},
["Koffing"] = {fotopoke = 2485},
["Weezing"] = {fotopoke = 2486},
["Rhyhorn"] = {fotopoke = 2487},
["Rhydon"] = {fotopoke = 2488},
["Chansey"] = {fotopoke = 2489},
["Tangela"] = {fotopoke = 2490},
["Kangaskhan"] = {fotopoke = 2491},
["Horsea"] = {fotopoke = 2492},
["Seadra"] = {fotopoke = 2493},
["Goldeen"] = {fotopoke = 2494},
["Seaking"] = {fotopoke = 2495},
["Staryu"] = {fotopoke = 2496},
["Starmie"] = {fotopoke = 2497},
["Mr. mime"] = {fotopoke = 2498},
["Scyther"] = {fotopoke = 2499},
["Jynx"] = {fotopoke = 2500},
["Electabuzz"] = {fotopoke = 2501},
["Magmar"] = {fotopoke = 2502},
["Pinsir"] = {fotopoke = 2503},
["Tauros"] = {fotopoke = 2504},
["Magikarp"] = {fotopoke = 2505},
["Gyarados"] = {fotopoke = 2506},
["Lapras"] = {fotopoke = 2507},
["Ditto"] = {fotopoke = 2508},
["Eevee"] = {fotopoke = 2509},
["Vaporeon"] = {fotopoke = 2510},
["Jolteon"] = {fotopoke = 2511},
["Flareon"] = {fotopoke = 2512},
["Porygon"] = {fotopoke = 2513},
["Omanyte"] = {fotopoke = 2514},
["Omastar"] = {fotopoke = 2515},
["Kabuto"] = {fotopoke = 2516},
["Kabutops"] = {fotopoke = 2517},
["Aerodactyl"] = {fotopoke = 2518},
["Snorlax"] = {fotopoke = 2519},
["Articuno"] = {fotopoke = 2520},
["Zapdos"] = {fotopoke = 2521},
["Moltres"] = {fotopoke = 2522},
["Dratini"] = {fotopoke = 2523},
["Dragonair"] = {fotopoke = 2524},
["Dragonite"] = {fotopoke = 2525},
["Mewtwo"] = {fotopoke = 2526},
["Mew"] = {fotopoke = 2527},
}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
doTeleportThing(cid, fromPosition)
end
 
Back
Top