Anthony King
New Member
- Joined
- Sep 12, 2014
- Messages
- 11
- Reaction score
- 0
Im using TFS 0.2 (Mystic Spirit) For client 8.6.
I had problems Compiling it when I first got it. So I found one already compiled.
Well my Depots Do not work Town id is set tile ids are correct on Rme aswell as ingame. problem is when u walk up to the dp nothing is saying x amount of items are in dp. if u put something in the dp atleast only u can access it but if u log out it goes away.
Here is My movements Lua. Could be the prob with no msg appearing when stepping on tiles infront of dp?
Not sure about this Tho as I have seen Longer lua code for this specific file. but could just be because of diff Tfs Version.
I have been Trying to fix the dps for about 3 days now with little sleep. If anyone could help me that would be awesome
Rep++ Available if anyone can help me.
I had problems Compiling it when I first got it. So I found one already compiled.
Well my Depots Do not work Town id is set tile ids are correct on Rme aswell as ingame. problem is when u walk up to the dp nothing is saying x amount of items are in dp. if u put something in the dp atleast only u can access it but if u log out it goes away.
Here is My movements Lua. Could be the prob with no msg appearing when stepping on tiles infront of dp?
Code:
local increasingItemID = {416, 446, 3216}
local decreasingItemID = {417, 447, 3217}
function onStepIn(cid, item, position, fromPosition)
if isInArray(increasingItemID, item.itemid) == TRUE then
doTransformItem(item.uid, item.itemid + 1)
if item.actionid > 1000 then
getLevelTile(cid, item, position)
elseif getTilePzInfo(position) == TRUE then
getDepotItems(cid, item)
end
elseif item.itemid == 426 then
doTransformItem(item.uid, 425)
if item.actionid > 1000 then
getLevelTile(cid, item, position)
elseif getTilePzInfo(position) == TRUE then
getDepotItems(cid, item)
end
end
return TRUE
end
function onStepOut(cid, item, position, fromPosition)
if isInArray(decreasingItemID, item.itemid) == TRUE then
doTransformItem(item.uid, item.itemid - 1)
elseif item.itemid == 425 then
doTransformItem(item.uid, item.itemid + 1)
end
return TRUE
end
function getLevelTile(cid, item, position)
if isPlayer(cid) == TRUE then
if getPlayerLevel(cid) < item.actionid - 1000 then
doTeleportThing(cid, {x = getPlayerPosition(cid).x, y = getPlayerPosition(cid).y, z = getPlayerPosition(cid).z + 1}, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
end
end
return TRUE
end
function getDepotItems(cid, item)
if item.actionid > 100 then
if isPlayer(cid) == TRUE then
depotItems = getPlayerDepotItems(cid, item.actionid - 100) - 3
if depotItems == 1 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your depot contains 1 item.")
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your depot contains " ..depotItems.. " items.")
end
end
end
return TRUE
end
Not sure about this Tho as I have seen Longer lua code for this specific file. but could just be because of diff Tfs Version.
I have been Trying to fix the dps for about 3 days now with little sleep. If anyone could help me that would be awesome
Rep++ Available if anyone can help me.