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

doAddContainer function for 0.2

ragal

Member
Joined
Nov 29, 2007
Messages
735
Reaction score
19
Location
Germany - Berlin
Hello I need doAddContainer function for The Forgottenserver 0.2.2



Who Have it and can explain me how i add it??

i will add rep++ for sure for everyone who helped me :D

Thanks
 
it should already be there i beleive but open data>lib>function.lua

Lua:
function doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)
	if(doPlayerRemoveMoney(cid, cost) == TRUE) then
		for i = 1, count do
			local container = doCreateItemEx(containerid, 1)
			for x = 1, getContainerCapById(containerid) do
				doAddContainerItem(container, itemid, charges)
			end
			doPlayerAddItemEx(cid, container)
		end
		return LUA_NO_ERROR
	end
	return LUA_ERROR
end
 
it should already be there i beleive but open data>lib>function.lua

Lua:
function doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)
	if(doPlayerRemoveMoney(cid, cost) == TRUE) then
		for i = 1, count do
			local container = doCreateItemEx(containerid, 1)
			for x = 1, getContainerCapById(containerid) do
				doAddContainerItem(container, itemid, charges)
			end
			doPlayerAddItemEx(cid, container)
		end
		return LUA_NO_ERROR
	end
	return LUA_ERROR
end
In my Data Folder Dont exist lib :confused:

I USE TFS 0.2.2 Mystic Spirit
 
Back
Top