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

Lua Own Backpack Not Working?

Alyhide

Banned User
Joined
Aug 21, 2010
Messages
1,945
Reaction score
55
Location
Switzerland
Hello, I am using a mod made by Cykotitan, it's your 'Own Backpack' the thing is, it says "It is owned by blah blah." but any other player can open it o.0

XML:
<mod name="Own Loot Backpack" enabled="yes">
	<config name="ownbp_config"><![CDATA[
		config = {
			itemid = 10521,
			cost = 1000000
		}
	]]></config>
	<talkaction words="!backpack" event="buffer"><![CDATA[
		domodlib('ownbp_config')
		if doPlayerRemoveMoney(cid, config.cost) then
			local backpack = doPlayerAddItem(cid, config.itemid, 1)
			doCreatureSay(cid,"You Have Bought A Private Backpack!",19)  
			doItemSetAttribute(backpack, "description", getPlayerName(cid) .. ' owns this container.')
			return doItemSetAttribute(backpack, "aid", getPlayerGUID(cid) + 1000)
		end
		return doPlayerSendCancel(cid, "You don't have enough money, it costs " .. config.cost .. " gold.")
	]]></talkaction>
	<action itemid="2000" event="buffer"><![CDATA[
		_result = item.actionid >= 1000 and item.actionid - 1000 ~= getPlayerGUID(cid) and doPlayerSendCancel(cid, 'You\'re not owner of this container.')
	]]></action>
</mod>
 
Back
Top