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

problem with quests

Sir MoX

New Member
Joined
Jan 14, 2009
Messages
285
Reaction score
1
I have a big problem... I have the begginer quests that are made by script, and those chest can be moveable, the other chest that dont use script doesnt move and bad players move them and erease them in the dusbin for example.

here is the script to someone help to do the chest unmoveable:

function onUse(cid, item, frompos, item2, topos)


if item.actionid == 1222 then
if isDruid(cid) then
queststatus = getPlayerStorageValue(cid,1222)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a snakebit rod")
doPlayerAddItem(cid,2182,1)
setPlayerStorageValue(cid,1222,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
doPlayerSendTextMessage(cid,22,"You don't have the right vocation.")
end
else
return 0
end

return 1
end
 
In actions.xml on the line where this script is registered, change actionid to uniqueid, also change it on the map and change the script:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isDruid(cid) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You don\'t have the right vocation.')
	elseif getPlayerStorageValue(cid, 1222) == 1 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'The chest is empty.')
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a snakebite rod.')
		doPlayerAddItem(cid, 2182, 1)
		setPlayerStorageValue(cid, 1222, 1)
	end
	return true
end
 
thnks rep++
a question how I can edit the text "You have found a snakebit rod" to be said by the player and wiyh nice effects?
 
Back
Top