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

Good quest script template?

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
Almost all my quests follow this template:

LUA:
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 61111 then
		if getPlayerStorageValue(cid,61111) == -1 then
			doPlayerSendTextMessage(cid,25,"You have found the ceiron's wolf tooth chain.")
			doPlayerAddItem(cid,5940,1)
			setPlayerStorageValue(cid,61111,1)
		else
			doPlayerSendTextMessage(cid,25,"This chest is empty.")
		end
	
	end
	return TRUE
end

But I found out that doPlayerAddItem isn't the right function to use, I should use doPlayerAddItemEx

Does someone have an good quest template wich uses ItemEx? 'Cause it changes some more thing besides function, like the error message and stuff, and I couldn't make it work.

Thanks.
 
Back
Top