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

Solved LUA** HOW add more?

Vrotz

Member
Joined
Apr 7, 2011
Messages
1,071
Reaction score
7
Location
Brazil
I created a quest and inside the trunk comes a Backpack with an article inside. K, however, im going to add MORE items in the backpack without have that do many alterations in the script.

As it would stay this?

Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 10015 then
queststatus = getPlayerStorageValue(cid,50003)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Estes são os seus items. Boa War.")
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2420, 1)
setPlayerStorageValue(cid,50003,1)
else
doPlayerSendTextMessage(cid,22,"O baú está vazio.")
end
else
return 0
end
return 1
end

As it would stay this?
Code:
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2420, 1), 2120, 1), 5710, 1), 2420, 1), 2789, 100), 2195, 1), 2472, 1), 2493, 1), 2514, 1), 2470, 1), 2274, 1), 2261, 1), 2305, 1), 2293, 1), 2313, 1), 8473, 1), 7591, 1), 7620, 1), 2431, 1), 2400, 1)

I tried like this and gives error in console ","


Solved :D
 
Last edited:
LUA:
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 10015 then
		queststatus = getPlayerStorageValue(cid,50003)
		if queststatus == -1 then
			doPlayerSendTextMessage(cid,22,"Estes sao os seus items. Boa War.")
			local container = doPlayerAddItem(cid, 1988, 1)
			doAddContainerItem(container, 2420, 1)
			doAddContainerItem(container, XXXX, 1)
			setPlayerStorageValue(cid,50003,1)
		else
			doPlayerSendTextMessage(cid,22,"O baú está vazio.")
		end
	else
		return 0
	end
	return 1
end
 
Back
Top