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

[Need a fix] (internalGetPlayerInfo) Player not found when requesting player info #1

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
Hello,
I'm my console is spamming an error with this script

Description:
(internalGetPlayerInfo) Player not found when requesting player info #1

Lua:
function onStepIn(cid, item, position, fromPosition)
 
if (not isPlayer(cid)) then
	return true
end

--Config-->
local starting = {x = 321, y = 829, z = 15, stackpos = 253}
local ending = {x = 337, y = 849, z = 15, stackpos = 253}
local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = starting.stackpos}
local portal_in_pos = {x = 335, y = 839, z = 15, stackpos = 1}
local portal_iten_pos = getThingfromPos(portal_in_pos)
local teleportId = 1387
local player_pos_entrada = {x = 326, y = 840, z = 15}
local player_pos_saida = {x = 842, y = 839, z = 15}
local boss_pos = {x = 333, y = 837, z = 15}
local boss = "Pythius The Rotten"
local queststatus = getPlayerStorageValue(cid, 9933)
--EndConfig-->
 
--Do not touch this--
if getPlayerLookDir(cid) == 0 then
newdir = 2
elseif getPlayerLookDir(cid) == 1 then
newdir = 3
elseif getPlayerLookDir(cid) == 2 then
newdir = 0
else
newdir = 1
end
--Don't edit this unless you know what you are doing.
 
if item.actionid == 9022 then
	doTeleportThing(cid, player_pos_saida)
	doSendMagicEffect(player_pos_saida, 10)
	doRemoveItem(portal_iten_pos.uid, 1)
	return TRUE
end
 
if item.actionid == 9021 and queststatus == -1 then
	players = 0
	totalmonsters = 0
	monster = {}
	repeat
	creature = getThingfromPos(checking)
	if creature.itemid > 0 then
 
		if getPlayerAccess(creature.uid) == 0 then
			players = players + 1
		end
 
		if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
			totalmonsters = totalmonsters + 1
			monster[totalmonsters] = creature.uid
		end
	end
		checking.x = checking.x + 1
 
	if checking.x > ending.x then
		checking.x = starting.x
		checking.y = checking.y + 1
	end
 
	until checking.y > ending.y
 
	if players == 0 then
 
		if totalmonsters ~= 0 then
			current = 0
			repeat
			current = current + 1
			doRemoveCreature(monster[current])
			until current >= totalmonsters
		end
 
		doTeleportThing(cid, player_pos_entrada)
		doSendMagicEffect(player_pos_entrada, 10)
		doCreateMonster(boss, boss_pos)
 
		if portal_iten_pos.itemid == teleportId then
			doRemoveItem(portal_iten_pos.uid, 1)
		end
 
	else
		doMoveCreature(cid, newdir)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '" .. getCreatureName(cid) .." is in the room now. Wait a moment!')
	end
else
	doMoveCreature(cid, newdir)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Sorry you already did this quest!')
end
end
 
Last edited:
Lua:
local c = {
	from = {x = 100, y = 100, z = 7},
	to = {x = 100, y = 100, z = 7},
	boss_pos = {x = 100, y = 100, z = 7},
	player_pos = {x = 100, y = 100, z = 7},
	str = 9933,
	boss = "?"
	}
	
local function checkPlayers(from, to)
	local list = {}
	for x = from.x, to.x do
		for y = from.y, to.y do
			for z = from.z, to.z do
				local g = getTopCreature({x = x , y = y, z = z}).uid
				if isPlayer(g) then
					table.insert(list, g)
				end
			end
		end
	end
	return list
end

local function checkMonsters(from, to)
	local list = {}
	for x = from.x, to.x do
		for y = from.y, to.y do
			for z = from.z, to.z do
				local g = getTopCreature({x = x , y = y, z = z}).uid
				if isMonster(g) then
					table.insert(list, g)
				end
			end
		end
	end
	return list
end

function onStepIn(cid, item, pos, fromPos)
	local t = checkPlayers(c.from, c.to)
	local m = checkMonsters(c.from, c.to)
	if getCreatureStorage(cid, c.str) ~= 1 then
		if #t == 1 then
			doTeleportThing(cid, fromPos)
			doPlayerSendCancel(cid, getPlayerName(t[1]) .. ' already in the room now. wait a moment !')
		else
			for i = 1,#m do
				if isMonster(m[i]) then
					doRemoveCreature(m[i])
				end
			end
			doCreateMonster(c.boss, c.boss_pos)
			doTeleportThing(cid, c.player_pos)
			doCreatureSetStorage(cid, c.str,1)
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You've already done this quest.")
		doTeleportThing(cid, fromPos)
	end
	return true
end
 
Fixed
Lua:
local function changetiles(cid, item, pos, fromPos)

	local kapos1 = {x=314, y=807, z=15}
	local kapos2 = {x=313, y=807, z=15}
	local kapos3 = {x=314, y=808, z=15}
	local kapos4 = {x=313, y=808, z=15}
	local kapos5 = {x=314, y=809, z=15}
	local kapos6 = {x=313, y=809, z=15}
	local kapos7 = {x=314, y=810, z=15}
	local kapos8 = {x=313, y=810, z=15}
	local kapos9 = {x=314, y=811, z=15}
	local kapos10 = {x=313, y=811, z=15}
	local kapos11 = {x=314, y=812, z=15}
	local kapos12 = {x=313, y=812, z=15}
	local kapos13 = {x=314, y=813, z=15}
	local kapos14 = {x=313, y=813, z=15}

	doCreateItem(598,1,kapos1)
	doCreateItem(598,1,kapos2)
	doCreateItem(598,1,kapos3)
	doCreateItem(598,1,kapos4)
	doCreateItem(598,1,kapos5)
	doCreateItem(598,1,kapos6)
	doCreateItem(598,1,kapos7)
	doCreateItem(598,1,kapos8)
	doCreateItem(598,1,kapos9)
	doCreateItem(598,1,kapos10)
	doCreateItem(598,1,kapos11)
	doCreateItem(598,1,kapos12)
	doCreateItem(598,1,kapos13)
	doCreateItem(598,1,kapos14)
	doSendMagicEffect({x=314, y=807, z=15}, 2)
	doSendMagicEffect({x=314, y=808, z=15}, 2)
	doSendMagicEffect({x=314, y=809, z=15}, 2)
	doSendMagicEffect({x=314, y=810, z=15}, 2)
	doSendMagicEffect({x=314, y=811, z=15}, 2)
	doSendMagicEffect({x=314, y=812, z=15}, 2)
	doRemoveItem(getTileItemById(kapos7, 1387).uid, 1)
	return true
end

local c = {
	from = {x = 319, y = 828, z = 15},
	to = {x = 349, y = 850, z = 15},
	oldpos = {x = 315, y = 810, z = 15},
	boss_pos = {x = 333, y = 837, z = 15},
	player_pos = {x = 326, y = 840, z = 15},
	storage = 9933,
	boss = "Pythius The Rotten"
	}
 
local function checkPlayers(from, to)
	local list = {}
	for x = from.x, to.x do
		for y = from.y, to.y do
			for z = from.z, to.z do
				local g = getTopCreature({x = x , y = y, z = z}).uid
				if isPlayer(g) then
					table.insert(list, g)
				end
			end
		end
	end
	return list
end
 
local function checkMonsters(from, to)
	local list = {}
	for x = from.x, to.x do
		for y = from.y, to.y do
			for z = from.z, to.z do
				local g = getTopCreature({x = x , y = y, z = z}).uid
				if isMonster(g) then
					table.insert(list, g)
				end
			end
		end
	end
	return list
end
 
function onStepIn(cid, item, pos, fromPos)
	local t = checkPlayers(c.from, c.to)
	local m = checkMonsters(c.from, c.to)
	if getCreatureStorage(cid, c.storage) ~= 1 then
		if #t == 1 then
			doTeleportThing(cid, c.oldpos)
			doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, getPlayerName(t[1]) .. ' is in the room now.')
			changetiles
		else
			for i = 1,#m do
				if isMonster(m[i]) then
					doRemoveCreature(m[i])
				end
			end
			doCreateMonster(c.boss, c.boss_pos)
			doTeleportThing(cid, c.player_pos)
			changetiles
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You already done this quest.")
		doTeleportThing(cid, c.oldpos)
		changetiles
	end
	return true
end

Why it's not working? changetiles
 
Last edited:
Lua:
local function changetiles(cid, item, pos, fromPos)

	local kapos1 = {x=314, y=807, z=15}
	local kapos2 = {x=313, y=807, z=15}
	local kapos3 = {x=314, y=808, z=15}
	local kapos4 = {x=313, y=808, z=15}
	local kapos5 = {x=314, y=809, z=15}
	local kapos6 = {x=313, y=809, z=15}
	local kapos7 = {x=314, y=810, z=15}
	local kapos8 = {x=313, y=810, z=15}
	local kapos9 = {x=314, y=811, z=15}
	local kapos10 = {x=313, y=811, z=15}
	local kapos11 = {x=314, y=812, z=15}
	local kapos12 = {x=313, y=812, z=15}
	local kapos13 = {x=314, y=813, z=15}
	local kapos14 = {x=313, y=813, z=15}

	doCreateItem(598,1,kapos1)
	doCreateItem(598,1,kapos2)
	doCreateItem(598,1,kapos3)
	doCreateItem(598,1,kapos4)
	doCreateItem(598,1,kapos5)
	doCreateItem(598,1,kapos6)
	doCreateItem(598,1,kapos7)
	doCreateItem(598,1,kapos8)
	doCreateItem(598,1,kapos9)
	doCreateItem(598,1,kapos10)
	doCreateItem(598,1,kapos11)
	doCreateItem(598,1,kapos12)
	doCreateItem(598,1,kapos13)
	doCreateItem(598,1,kapos14)
	doSendMagicEffect({x=314, y=807, z=15}, 2)
	doSendMagicEffect({x=314, y=808, z=15}, 2)
	doSendMagicEffect({x=314, y=809, z=15}, 2)
	doSendMagicEffect({x=314, y=810, z=15}, 2)
	doSendMagicEffect({x=314, y=811, z=15}, 2)
	doSendMagicEffect({x=314, y=812, z=15}, 2)
	doRemoveItem(getTileItemById(kapos7, 1387).uid, 1)
	return true
end

local c = {
	from = {x = 319, y = 828, z = 15},
	to = {x = 349, y = 850, z = 15},
	oldpos = {x = 315, y = 810, z = 15},
	boss_pos = {x = 333, y = 837, z = 15},
	player_pos = {x = 326, y = 840, z = 15},
	storage = 9933,
	boss = "Pythius The Rotten"
	}
 
local function checkPlayers(from, to)
	local list = {}
	for x = from.x, to.x do
		for y = from.y, to.y do
			for z = from.z, to.z do
				local g = getTopCreature({x = x , y = y, z = z}).uid
				if isPlayer(g) then
					table.insert(list, g)
				end
			end
		end
	end
	return list
end
 
local function checkMonsters(from, to)
	local list = {}
	for x = from.x, to.x do
		for y = from.y, to.y do
			for z = from.z, to.z do
				local g = getTopCreature({x = x , y = y, z = z}).uid
				if isMonster(g) then
					table.insert(list, g)
				end
			end
		end
	end
	return list
end
 
function onStepIn(cid, item, pos, fromPos)
	local t = checkPlayers(c.from, c.to)
	local m = checkMonsters(c.from, c.to)
	if getCreatureStorage(cid, c.storage) ~= 1 then
		if #t == 1 then
			doTeleportThing(cid, c.oldpos)
			doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, getPlayerName(t[1]) .. ' is in the room now.')
			changetiles
		else
			for i = 1,#m do
				if isMonster(m[i]) then
					doRemoveCreature(m[i])
				end
			end
			doCreateMonster(c.boss, c.boss_pos)
			doTeleportThing(cid, c.player_pos)
			changetiles
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You already done this quest.")
		doTeleportThing(cid, c.oldpos)
		changetiles
	end
	return true
end

Why it's not working? changetiles
 
Thank you. Here is the perfect script
Lua:
local function changetiles(cid, item, pos, fromPos)

	local kapos1 = {x=314, y=807, z=15}
	local kapos2 = {x=313, y=807, z=15}
	local kapos3 = {x=314, y=808, z=15}
	local kapos4 = {x=313, y=808, z=15}
	local kapos5 = {x=314, y=809, z=15}
	local kapos6 = {x=313, y=809, z=15}
	local kapos7 = {x=314, y=810, z=15}
	local kapos8 = {x=313, y=810, z=15}
	local kapos9 = {x=314, y=811, z=15}
	local kapos10 = {x=313, y=811, z=15}
	local kapos11 = {x=314, y=812, z=15}
	local kapos12 = {x=313, y=812, z=15}
	local kapos13 = {x=314, y=813, z=15}
	local kapos14 = {x=313, y=813, z=15}

	doCreateItem(598,1,kapos1)
	doCreateItem(598,1,kapos2)
	doCreateItem(598,1,kapos3)
	doCreateItem(598,1,kapos4)
	doCreateItem(598,1,kapos5)
	doCreateItem(598,1,kapos6)
	doCreateItem(598,1,kapos7)
	doCreateItem(598,1,kapos8)
	doCreateItem(598,1,kapos9)
	doCreateItem(598,1,kapos10)
	doCreateItem(598,1,kapos11)
	doCreateItem(598,1,kapos12)
	doCreateItem(598,1,kapos13)
	doCreateItem(598,1,kapos14)
	doSendMagicEffect({x=314, y=807, z=15}, 2)
	doSendMagicEffect({x=314, y=808, z=15}, 2)
	doSendMagicEffect({x=314, y=809, z=15}, 2)
	doSendMagicEffect({x=314, y=810, z=15}, 2)
	doSendMagicEffect({x=314, y=811, z=15}, 2)
	doSendMagicEffect({x=314, y=812, z=15}, 2)
	doRemoveItem(getTileItemById(kapos7, 1387).uid, 1)
	return true
end

local c = {
	from = {x = 319, y = 828, z = 15},
	to = {x = 349, y = 850, z = 15},
	oldpos = {x = 315, y = 810, z = 15},
	boss_pos = {x = 333, y = 837, z = 15},
	player_pos = {x = 326, y = 840, z = 15},
	storage = 9933,
	boss = "Pythius The Rotten"
	}
 
local function checkPlayers(from, to)
	local list = {}
	for x = from.x, to.x do
		for y = from.y, to.y do
			for z = from.z, to.z do
				local g = getTopCreature({x = x , y = y, z = z}).uid
				if isPlayer(g) then
					table.insert(list, g)
				end
			end
		end
	end
	return list
end
 
local function checkMonsters(from, to)
	local list = {}
	for x = from.x, to.x do
		for y = from.y, to.y do
			for z = from.z, to.z do
				local g = getTopCreature({x = x , y = y, z = z}).uid
				if isMonster(g) then
					table.insert(list, g)
				end
			end
		end
	end
	return list
end
 
function onStepIn(cid, item, pos, fromPos)
	local t = checkPlayers(c.from, c.to)
	local m = checkMonsters(c.from, c.to)
	if getCreatureStorage(cid, c.storage) ~= 1 then
		if #t == 1 then
			doTeleportThing(cid, c.oldpos)
			doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, getPlayerName(t[1]) .. ' is in the room now.')
			addEvent(changetiles, 0)
		else
			for i = 1,#m do
				if isMonster(m[i]) then
					doRemoveCreature(m[i])
				end
			end
			doCreateMonster(c.boss, c.boss_pos)
			doTeleportThing(cid, c.player_pos)
			addEvent(changetiles, 0)
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You already done this quest.")
		doTeleportThing(cid, c.oldpos)
		addEvent(changetiles, 0)
	end
	return true
end
 
Back
Top