Obrigado por contribuir. Acrescente mais infos sobre o funcionamento do script.
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Own Loot Backpack
HE
action
Own Loot Backpack
Por heberpcl, 18 de jan. de 2016 em Actions e Talkactions
own
loot
backpack
tfs1.0
4
2.2k
2 semanas depois...
info
Grupo: Administrador
Registrado: 08/07/05
Posts: 5.8k
Reputação: +1.4k
Gênero: Outro

29 de janeiro de 2016 às 00:04
7 meses depois...
21 de agosto de 2016 às 02:21
O que faz este Script?
info
Grupo: Barão
Registrado: 04/07/16
Posts: 242
Reputação: +100
Gênero: 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
Grupo: Campones
Registrado: 27/08/05
Posts: 33
Reputação: +2
Gênero: 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