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

Action A weird quest

Santy

Member
Joined
Aug 14, 2007
Messages
654
Reaction score
22
This is a quest that if you use an item on a certain pos, you will get another item! :O.. Btw u can only do it once..

Code:
function onUse(cid, item, frompos, item2, topos)
playapos = {x=1000, y=1000, z=7}
playapoz = getPlayerPosition(cid)
prize = item.uid
queststatus = getPlayerStorageValue(cid,prize)

	if item.itemid == 2193 then
		if playapoz == playapos then
			if queststatus == -1 then
				doPlayerAddItem(cid,2354,1)
				doPlayerSendTextMessage(cid,22,"The gods have given you this precious gift.")
				doRemoveItem(item.uid,1)
				setPlayerStorageValue(cid,prize,1)
			else
				doPlayerSendCancel(cid,"You already got your gift.")
			end
		else
			doPlayerSendCancel(cid,"You are not in the correct place.")
		end

		return 1
	else
		return 0
	end
end
 
I dont understand this one, playapos = the place where you put the item?
and what about actions.xml? what to give aid/uid? be more specific
 
In actions.xml set the item u want to be used in the pos id and in playapos is where the player must be to do the action.
 
Back
Top