Como envio esse item direto para o depot do player?
Não quero ele indo para a bag do plyr.
Valendo Rep+
Como envio esse item direto para o depot do player?
Não quero ele indo para a bag do plyr.
Valendo Rep+
testa assim
local card_id = {13495, 13488, 13566, 13559, 13573, 13580, 13551, 13544, 13767, 13774} -- joga os id dos card aqui
local quantidade = 1
function onUse(cid, item, frompos, item2, topos)
local level = 0 -- level
if item.itemid == 1990 then -- id da box
if getPlayerLevel(cid) >= level then
local w = math.random (1,#card_id)
doAddContainerItem(cid, card_id[w], quantidade)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Vc Abriu um Held Box T2 e ganhou >>> ["..getItemNameById(card_id[w]).."] <<<")
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"Voce deve estar pelo menos nivelado "..level.."")
end return true
end
end
7 horas atrás, Poke X Ice disse:testa assim
local card_id = {13495, 13488, 13566, 13559, 13573, 13580, 13551, 13544, 13767, 13774} -- joga os id dos card aqui local quantidade = 1 function onUse(cid, item, frompos, item2, topos) local level = 0 -- level if item.itemid == 1990 then -- id da box if getPlayerLevel(cid) >= level then local w = math.random (1,#card_id) doAddContainerItem(cid, card_id[w], quantidade) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Vc Abriu um Held Box T2 e ganhou >>> ["..getItemNameById(card_id[w]).."] <<<") doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid,"Voce deve estar pelo menos nivelado "..level.."") end return true end end
[16/07/2019 10:19:21] [Error - Action Interface]
[16/07/2019 10:19:21] data/actions/scripts/box held 2.lua:onUse
[16/07/2019 10:19:21] Description:
[16/07/2019 10:19:21] (luaDoAddContainerItem) Container not found
Em 15/07/2019 em 23:16, Black Clover disse:Versão do Servidor: TFS - 0.3.5Tipo de Script: actionsCódigo:local card_id = {13495, 13488, 13566, 13559, 13573, 13580, 13551, 13544, 13767, 13774} -- joga os id dos card aqui function onUse(cid, item, frompos, item2, topos) local level = 0 -- level if item.itemid == 1990 then -- id da box if getPlayerLevel(cid) >= level then local w = math.random (1,#card_id) doPlayerAddItem(cid, card_id[w]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Vc Abriu um Held Box T2 e ganhou >>> ["..getItemNameById(card_id[w]).."] <<<") doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid,"Voce deve estar pelo menos nivelado "..level.."") end return true end endComo envio esse item direto para o depot do player?
Não quero ele indo para a bag do plyr.
Valendo Rep+
Teste aí, aqui está 100%
local card_id = {13495, 13488, 13566, 13559, 13573, 13580, 13551, 13544, 13767, 13774} -- joga os id dos card aqui function onUse(cid, item, frompos, item2, topos) local level = 0 -- level if item.itemid == 1990 then -- id da box if getPlayerLevel(cid) >= level then local w = math.random (1,#card_id) presente = doCreateItemEx(card_id[w], 1) doPlayerSendMailByName(getCreatureName(cid), presente, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Vc Abriu um Held Box T2 e ganhou >>> ["..getItemNameById(card_id[w]).."] <<<") doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid,"Voce deve estar pelo menos nivelado "..level.."") end return true end end
Meus tópicos
Se ajudei você deixe seu Rep! para fortalecer a amizade
Vamos ajudar o fórum a crescer mais.
----- NPC que vende informação -----
-----Baú Que dá Outfit se tiver Level -----
50 minutos atrás, Ayron5 disse:Teste aí, aqui está 100%
local card_id = {13495, 13488, 13566, 13559, 13573, 13580, 13551, 13544, 13767, 13774} -- joga os id dos card aqui function onUse(cid, item, frompos, item2, topos) local level = 0 -- level if item.itemid == 1990 then -- id da box if getPlayerLevel(cid) >= level then local w = math.random (1,#card_id) presente = doCreateItemEx(card_id[w], 1) doPlayerSendMailByName(getCreatureName(cid), presente, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Vc Abriu um Held Box T2 e ganhou >>> ["..getItemNameById(card_id[w]).."] <<<") doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid,"Voce deve estar pelo menos nivelado "..level.."") end return true end end
Era disso que eu estava falando ❤️ Reputado!
╔══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ══════════════════════════╗
ALGUNS DOS MEUS TRABALHOS:
Newstory dbo+nto+bleach[DOWNLOAD]
- Projetos lançados também feitos por mim {
DBO SKY
POKE SKY
WODBOWARS
Tic-tac-War
Dbo Universe(em desenvolvimento)
}
Te Ajudei? Rep + e ficamos Quits
Precisando de ajuda?
Discord: Yan Liima #3702
Programador Júnior de LUA, PHP e JavaScript
Juntos somos lendas, separados somos Mitos!
╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝