Obrigado por contribuir. Acrescente mais infos sobre o funcionamento do script.
- Forums
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Own Loot Backpack
HE
action
Own Loot Backpack
By heberpcl, 18 de jan. de 2016 in Actions e Talkactions
own
loot
backpack
tfs1.0
4
2.3k
2 weeks later...
info
Group: Administrador
Joined: 08/07/05
Posts: 5.8k
Reputation: +1.4k
Gender: Outro

29 de janeiro de 2016 às 00:04
7 months later...
21 de agosto de 2016 às 02:21
O que faz este Script?
info
Group: Barão
Joined: 04/07/16
Posts: 242
Reputation: +100
Gender: Masculino

21 de agosto de 2016 às 02:26
3 minutos atrás, Ashukel disse:O que faz este Script?
Uma backpack comprada por talkaction que dura 24 horas e só qm comprou pode abrir, podendo jogar no chao e tal




info
Group: Campones
Joined: 27/08/05
Posts: 33
Reputation: +2
Gender: Masculino
Hello,
remaker script for tfs 1.x.
talkactions.xml
ownbp.lualocal config = { cost = 1000, -- Cost (GP) ownTime = 24 * 60 * 60 * 1000, -- Time (24 horas) backpackId = 2000 } function onSay(player, words, param) local playerID = player:getGuid() local owner = (playerID + 100) local ownerName = player:getName() local function noOwner(o) o:removeAttribute(ITEM_ATTRIBUTE_DESCRIPTION) o:setActionId(0) end if (player:removeMoney(config.cost) == true) then local backpack = doPlayerAddItem(player:getId(), config.backpackId, 1) if (backpack ~= nil) then doSetItemSpecialDescription(backpack, ownerName..' owns this container.') doSetItemActionId(backpack, owner) addEvent(noOwner, 1000 * config.ownTime, backpack) end else doPlayerSendCancel(cid, "You do not have the amount of GP ("..config.cost..").") end endactions.xml
ownbp.luafunction onUse(cid, item, fromPosition, target, toPosition, isHotkey) local playerID = cid:getGuid() -- getPlayerGUID(cid) local owner = (item.actionid - 100) if (owner > 0) then if (owner ~= playerID) then doPlayerSendCancel(cid, "You aren\'t owner of this container.") return TRUE end end endby @@azi