silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,484
- Solutions
- 9
- Reaction score
- 217
how send items to depot of the players?
tfs 1.2
no, I'm don't saying about mail
tfs 1.2
no, I'm don't saying about mail
Last edited:
local depotChest = player:getDepotChest(depotId)
if depotChest then
-- depotChest:addItem(2160, 1, INDEX_WHEREEVER, FLAG_NOLIMIT)
-- depotChest:addItemEx(tmpItem, INDEX_WHEREEVER, FLAG_NOLIMIT)
end
and to send inbox?Code:local depotChest = player:getDepotChest(depotId) if depotChest then -- depotChest:addItem(2160, 1, INDEX_WHEREEVER, FLAG_NOLIMIT) -- depotChest:addItemEx(tmpItem, INDEX_WHEREEVER, FLAG_NOLIMIT) end
Use the meta method getInbox.and to send inbox?
if (corpse) {
dropLoot(corpse->getContainer(), _lastHitCreature);
}
why make it in c++ ?I wanna change the server code and send the loot to a depot chest, how exactly can I get the container?
This is in creature.cpp
Code:if (corpse) { dropLoot(corpse->getContainer(), _lastHitCreature); }
I need to replace the first argument with the depot of ID 20 of the player who did the most damage (already defined as mostDamageCreature).
function onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
local targetMonster = creature:getMonster()
if not targetMonster then
return true
end
local killer = mostdamagekiller
local depotchest = killer:getDepotChest(depotId)
if depotchest then
depotChest:addItem(2160, 100, INDEX_WHEREEVER, FLAG_NOLIMIT)
end
return true
end
dropLoot(mostDamageCreature.getDepotChest(34, false)->getContainer(), _lastHitCreature);
dropLoot(mostDamageCreature.getDepotChest(34, false), _lastHitCreature);
dropLoot(mostDamageCreature:getDepotChest(34, false), _lastHitCreature);
dropLoot(mostDamageCreature->getDepotChest(34, false), _lastHitCreature);