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

[8.54] The Forgotten Server 0.3.6pl1 (Crying Damson)

Request fix for tiles script, players are still able to walk through another player at the dp and steal items. The push-back function is not working.

Crying-Damson 0.3.6.
Thanks Much, Will Rep++

Code:
local config = {
	maxLevel = getConfigInfo('maximumDoorLevel')
}

local increasingItems = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215, [11059] = 11060}
local decreasingItems = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202, [11060] = 11059}
local depots = {2589, 2590, 2591, 2592}

local checkCreature = {isPlayer, isMonster, isNpc}
local function pushBack(cid, position, fromPosition, displayMessage)
	doTeleportThing(cid, fromPosition, false)
	doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
	if(displayMessage) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
	end
end

function onStepIn(cid, item, position, fromPosition)
	if(not increasingItems[item.itemid]) then
		return false
	end

	if(not isPlayerGhost(cid)) then
		doTransformItem(item.uid, increasingItems[item.itemid])
	end

	if(item.actionid >= 194 and item.actionid <= 196) then
		local f = checkCreature[item.actionid - 193]
		if(f(cid)) then
			pushBack(cid, position, fromPosition, false)
		end

		return true
	end

	if(item.actionid >= 191 and item.actionid <= 193) then
		local f = checkCreature[item.actionid - 190]
		if(not f(cid)) then
			pushBack(cid, position, fromPosition, false)
		end

		return true
	end

	if(not isPlayer(cid)) then
		return true
	end

	if(item.actionid == 189 and not isPremium(cid)) then
		pushBack(cid, position, fromPosition, true)
		return true
	end

	local gender = item.actionid - 186
	if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then
		if(gender ~= getPlayerSex(cid)) then
			pushBack(cid, position, fromPosition, true)
		end

		return true
	end

	local skull = item.actionid - 180
	if(skull >= SKULL_NONE and skull <= SKULL_BLACK) then
		if(skull ~= getCreatureSkullType(cid)) then
			pushBack(cid, position, fromPosition, true)
		end

		return true
	end

	local group = item.actionid - 150
	if(group >= 0 and group < 30) then
		if(group > getPlayerGroupId(cid)) then
			pushBack(cid, position, fromPosition, true)
		end

		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
			pushBack(cid, position, fromPosition, true)
		end

		return true
	end

	if(item.actionid >= 1000 and item.actionid <= config.maxLevel) then
		if(getPlayerLevel(cid) < item.actionid - 1000) then
			pushBack(cid, position, fromPosition, true)
		end

		return true
	end

	if(item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) <= 0) then
		pushBack(cid, position, fromPosition, true)
		return true
	end

	if(getTileInfo(position).protection) then
		local depotPos, depot = getCreatureLookPosition(cid), {}
		depotPos.stackpos = STACKPOS_GROUND
		while(true) do
			if(not getTileInfo(depotPos).depot) then
				break
			end

			depotPos.stackpos = depotPos.stackpos + 1
			depot = getThingFromPos(depotPos)
			if(depot.uid == 0) then
				break
			end

			if(isInArray(depots, depot.itemid)) then
				local depotItems = getPlayerDepotItems(cid, getDepotId(depot.uid))
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s" or "") .. ".")
				break
			end
		end

		return true
	end

	return false
end

function onStepOut(cid, item, position, fromPosition)
	if(not decreasingItems[item.itemid]) then
		return false
	end

	if(not isPlayerGhost(cid)) then
		doTransformItem(item.uid, decreasingItems[item.itemid])
		return true
	end

	return false
end

My Movements.xml is fine I checked it. Also I tested this with a normal character not my god character, because of the ghost properties.

I also need help with this
 
it is SUSPICIOUS part of code, the thing allowing you to control serv using some admin app.
many trojans use simmilar things to take full controll on your pc, but this one just allows to control itself
 
dude, my map bug on all console :S someone know the problem? its bug here to... on the map it look perfect but in-game it bug...

bugwt.jpg
 
dude, my map bug on all console :S someone know the problem? its bug here to... on the map it look perfect but in-game it bug...

bugwt.jpg

The newest RME uses a new OTB. This version of TFS doesn't have it yet. Not much you can do about it right now...
 
just change items.otb and update items.xml to the rme format, its not hard, just takes some time
 
well, if you have modified items.xml it takes time :D
and its possible that tfs wont load otb without small source edit because its too strict when checking otb version
 
well, if you have modified items.xml it takes time :D
and its possible that tfs wont load otb without small source edit because its too strict when checking otb version

The problem with that isn't just if you've edited items... But a lot of the items aren't named in the RME items.xml. I've looked at it and most items aren't even included. I have way more items available without being item of type in my items.xml that came with TFS...
 
Hey,
I downloaded this, and i can login myself, but i dont know how to make gm character, i tried to use sqlitebrowswer, but that still didn't work. Can someone help me out?
Thanks in advance =)

/Azu
 
Fuck u!!!
Its fucking win32 virus -.-
trojan!!
Dont download!!!!

It's suspicious, not a virus. It's a suspicious piece of code that allows you control of the program basically... We went over this in the last page I think? Maybe 2 pages back? Go read it >.> Can someone throw the link about it in here? >.>
 
Hello guys, sorry for my noobness haha but..
Is there a bug at arrays?

I was scripting an system and I just deleted cuz I couldn`t find any bug.. so I`ve noticed that a system that came togheter with the server had the same problem..

--- CODE ---

local config = {
daily = "no", -- allow only one enter per day? (like in global Tibia)
level = 100,
storage = 30015
entry =
{
{x = 247, y = 659, z = 13},
{x = 247, y = 660, z = 13},
{x = 247, y = 661, z = 13},
{x = 247, y = 662, z = 13}
},
destination =
{
{x = 189, y = 650, z = 13},
{x = 189, y = 651, z = 13},
{x = 189, y = 652, z = 13},
{x = 189, y = 653, z = 13}
}
}

-- BUG --

[15/03/2010 14:11:50] [Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/annihilator.lua:5: '}' expected (to close '{' at line 1) near 'entry'
[15/03/2010 14:11:50] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/annihilator.lua)
[15/03/2010 14:11:50] data/actions/scripts/quests/annihilator.lua:5: '}' expected (to close '{' at line 1) near 'entry'

--

The array looks just fine to me.. maybe someone can help me or is it just bugged?
 
Back
Top