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

Key with unique id - uid

vvantrigt

New Member
Joined
May 3, 2009
Messages
4
Reaction score
0
Location
Holland
hello,
I'm working on a quest, starting with a key that opens a door.

2 options:
1. an npc that sells the key with an uid.
2. a quest box with the key in it, WITH the uid.


for both options, I don't know how i can add the uid.
please help!

msn: [email protected]
 
A piece of code from Seymour.lua:
Lua:
	elseif msgcontains(msg, "key") then
		npcHandler:say("Do you want to buy the Key to Adventure for 5 gold coins?", cid)
		Topic[talkUser] = 4
	elseif Topic[talkUser] == 4 then
		if msgcontains(msg, "yes") then
			if getPlayerMoney(cid) >= 5 then
				npcHandler:say("Here you are.", cid)
				doPlayerRemoveMoney(cid, 5)
				local key = doCreateItemEx(2088, 1)
				doSetItemActionId(key, 4600)
				doPlayerAddItemEx(cid, key, 1)
			else
				npcHandler:say("You don't have enough money.", cid)
				
			end
		elseif msgcontains(msg, "no") then
			npcHandler:say("As you wish.", cid)
		else
			npcHandler:say("Only nonsense on your mind, eh?", cid)
		end
		Topic[talkUser] = 0
You can make scripted quest chests pretty much the same way.
 
Back
Top