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

Lua Help fixing this script

kimokimo

Kimo
Joined
Jan 25, 2011
Messages
821
Solutions
6
Reaction score
156
GitHub
karimadnan
Hi

i got this script
PHP:
function onRemoveItem(moveItem, tileItem, position, cid)
	if(isPlayer(cid) and item.uid == KOH_crownAID_UID) then
		--KOH_playerPickCrown(cid)
		
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "cant pick/move crown")
		return false
	end
	return true
end

and here is the xml line
PHP:
	<movevent type="removeitem" actionid="57640" event="script" value="koh/koh_onremovecrown.lua"/>

and here is the part in the lib KOH_crownAID_UID = 57640

but the problem is players can move the crown is there anything wrong in the script?
 
try going in map editor and giving the crown the unique id of 57640, or you can go to the crown as a GM char and type /attr uniqueid 57640

tell me if it works
 
return false won't work in movements
as Joepod said set the uid from map editor not ingame
other way you could add item 8047 on it
 
Back
Top