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

some can fix this script?

Stewie

Family Guy # ;3
Joined
May 3, 2010
Messages
786
Reaction score
12
Location
TV
eRRO:
Code:
[Error - TalkAction Interface] 
[28/06/2010 13:21:33] data/talkactions/scripts/noob.lua:onSay
[28/06/2010 13:21:33] Description: 
[28/06/2010 13:21:33] (luaGetPlayerCustomFlagValue) Player not found

[28/06/2010 13:21:33] [Error - TalkAction Interface] 
[28/06/2010 13:21:33] data/talkactions/scripts/noob.lua:onSay
[28/06/2010 13:21:33] Description: 
[28/06/2010 13:21:33] (internalGetPlayerInfo) Player not found when requesting player info #3

[28/06/2010 13:21:33] [Error - TalkAction Interface] 
[28/06/2010 13:21:33] data/talkactions/scripts/noob.lua:onSay
[28/06/2010 13:21:33] Description: 
[28/06/2010 13:21:33] data/talkactions/scripts/noob.lua:30: attempt to compare number with boolean
[28/06/2010 13:21:33] stack traceback:
[28/06/2010 13:21:33] 	data/talkactions/scripts/noob.lua:30: in function <data/talkactions/scripts/noob.lua:5>

Script :
Code:
local config = {
			protectionLevel = getConfigValue('protectionLevel')
		}

		function onSay(cid, words, param, channel)
			local pos = getCreaturePosition(cid)
			if(getTileInfo(pos).protection) then
				return true
			end

			local target = 0
			param = param:trim()
			if(param == '') then
				pos = getPosByDir(pos, getCreatureLookDirection(cid))
				target = getTopCreature(pos).uid
			else
				target = getPlayerByNameWildcard(param)
				if(target ~= 0) then
					pos = getCreaturePosition(target)
					if(getDistanceBetween(getCreaturePosition(cid), pos) > 1) then
						return true
					end
				end
			end

			if(target == 0 or getTileInfo(pos).protection or getPlayerCustomFlagValue(target, PlayerCustomFlag_GamemasterPrivileges)) then
				return true
			end

			if(getPlayerLevel(cid) < config.protectionLevel or getPlayerLevel(target) >= config.protectionLevel) then
				return true
			end

			local tmp = getCreaturePosition(cid)
			if(doTeleportThing(cid, pos, true) and not isPlayerGhost(cid)) then
				doSendMagicEffect(tmp, CONST_ME_POFF)
				doSendMagicEffect(pos, CONST_ME_TELEPORT)
			end
			return false
		end
 
Back
Top