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

Send item to depot if no space or cap

televolt

Member
Joined
Jun 21, 2010
Messages
153
Reaction score
9
Hi can someone show me a way to send an event item to player depot if he doesnt have space or cap?
I think i can create a Mail in a X position to send a parcel, but i dont know the functions needed

otx based on 0.3.7 [10.35]

thks in advance
 
hahaha np

but.. you can create something like that? XD

if(doPlayerAddItem(cid, xxxx, 1, false)) then
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
else
doCreateItem parcel inside xxxx,1 label text getPlayername pos x pos y pos z
 
You may have this function:
Code:
doPlayerSendMailByName(name, item[, town[, actor]])

Example would be:
[CODE]
if(doPlayerAddItem(cid, xxxx, 1, false)) then
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
else
doPlayerSendMailByName(getCreatureName(cid), xxxx, 1, getPlayerTown(cid))
end
 
thx for rep @Flatlander

yaa i havee this function!! xD
i tried what u said but i got an error

doPlayerSendMailByName(getCreatureName(winner), 21400, 5, getPlayerTown(winner))

Code:
[9/4/2014 16:33:2] [Error - TalkAction Interface]
[9/4/2014 16:33:2] In a timer event called from:
[9/4/2014 16:33:2] data/talkactions/scripts/monsterhunter.lua:onSay
[9/4/2014 16:33:2] Description:
[9/4/2014 16:33:2] (LuaInterface::luaDoPlayerSendMailByName) Item not found
 
It's: name, item, town, actor.
Example:
doPlayerSendMailByName("Andu", item.uid, getPlayerTown(cid), "Andu's Server")

Example code:
Code:
local v = {21400, 5}
if getPlayerFreeCap(cid) < getItemWeightById(v[1], v[2]) then
    local item = doCreateItemEx(v[1], v[2])
    doPlayerSendMailByName(getCreatureName(cid), item, getPlayerTown(cid), "Server")
end

You can also check the older way:
http://otland.net/threads/doplayeradddepotitems.51239/
 
Last edited:
Back
Top