Art, i don't know if i really understood your question.. but, maybe this could be helpfull:
Question 1:
No, at least what i know that the only way to do that is creating an item and executing the FORanything in this item, the script for that is this:
Code:
[FUNCTION posempty]
serv.newitem i_gold
serv.new.p <args>
serv.new.attr 094
serv.new.update
return <qval <UID.<serv.new.uid>.f_posempty_check <args>> == 1?0:1>
[FUNCTION f_posempty_check]
local.tem 0
foritems 0
if (<eval strlen(<baseid>)> > 1) && (<baseid> != i_gold)
local.tem 1
endif
endfor
remove
return <eval <local.tem>>
Note: this function should be called this way: if (<posempty 1000,1000,15,0>)
Question 2:
Yes, there is a way to check if the player can "see" the map point... this function also checks if the player is in distance z point, if there is walls blocking the line of sight...
Code:
If (<SRC.CANSEELOS 1000,1000,15,0>)
I don't know if this help.. but i've done an function to also check (using coordinates) if there is an item "near" of the point..
Code:
[FUNCTION isnearof]
serv.newitem i_gold
serv.new.p <argv[0]>,<argv[1]>,<argv[2]>,<argv[3]>
serv.new.attr 094
serv.new.update
return <UID.<serv.new.uid>.f_isnearof_check <argv[4]>,<argv[5]>>
[FUNCTION f_isnearof_check]
local.item <argv[0]>
local.closer 0
foritems <eval <argv[1]>>
if (<baseid> == <local.item>)
local.closer 1
endif
endfor
remove
return <eval <local.closer>>
Note: this function should be called this way: if (<isnearof <src.p.x>,<src.p.y>,<src.p.z>,<src.p.m>,i_sword_viking,3>)
Where i_sword_viking you change to the item id you are looking for and the last parameter (3) is the distance you want to see if the item is near.
Hope it help!