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

Item from chest with 1 charge

Nutaharion

New Member
Joined
Oct 29, 2008
Messages
133
Reaction score
4
Location
Poland
Hello,

I have a problem, I added to chest silver amulet, and when I received this it has 1 charge. I tried to use doPlayerAddItem(cid, 2170, 1, 250) and doPlayerAddItem(cid, 2170, 250) and other's but nothing what I tried worked.


So can sb help me with this :)?

I'm using TFS 0.3.6



Nutaharion
 
Last edited:
might be im not right...

try to add count 100 becouse you cant add more then 100 charges with comand
Lua:
doPlayerAddItem(cid,7887,100)
 
Code:
	local id = doCreateItemEx(2170, 250)
	if(doPlayerAddItemEx(cid, id, true) ~= RETURNVALUE_NOERROR) then
		return false
	end
	
	-- do something --
 
J.Dre, can you repair my script for this chest :p?

Lua:
	elseif item.uid == 1010 then <!-- chest UID -->
			queststatus = getPlayerStorageValue(cid,5010)
		if queststatus == -1 then
			doPlayerAddItem(cid,2170,250) <!-- Here I trying to add amulet -->
			doPlayerAddItem(cid,2148,23)
			setPlayerStorageValue(cid,5010,1)
		else
			doPlayerSendTextMessage(cid,22,"It is empty.")
		end
 
Like this:
Lua:
elseif item.uid == 1010 then <!-- chest UID -->
queststatus = getPlayerStorageValue(cid,5010)
   if queststatus == -1 then
   local id = doCreateItemEx(2170, 250)
    if(doPlayerAddItemEx(cid, id, true) ~= RETURNVALUE_NOERROR) then
        return false
    end
    doPlayerAddItem(cid,2148,23)
    setPlayerStorageValue(cid,5010,1)
        else
    doPlayerSendTextMessage(cid,22,"It is empty.")
end
 
Back
Top