DE
tfs 1.0/1.1

Erro de script para o tfs 1.0

Por Dennyz Dias, 12 de mai. de 2016 em Scripts

resolvido
script
6
1.5k
Dennyz DiasD
12 de maio de 2016 às 16:20

Alguem me ajuda resolver essa linha para tfs 1.0

 

doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")

 

preciso pra tfs 1.0

 

 

 

12 de maio de 2016 às 17:35
doItemSetAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")

 

Editado Maio 12 por Liipe Silva3

Dennyz DiasD
12 de maio de 2016 às 17:43

if(param == "super divine axe") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8926, 1)
doItemSetAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine axe com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end

12 de maio de 2016 às 17:44

Tenta

player = Player(cid)if(param == "super divine axe") thenif player:getItemCount(9971) >= 60 thenlocal bag = player:addItem(1997, 1)local item = bag:addItem(8926, 1)item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Este item pode ser adquirido através do shopping. Adquirido dia "  .. os.date("%d/%m/%Y - %X") .." por ".. player:getName() ..". Serial: ".. player:getGuid() ..".")player:removeItem(9971, 60)player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine axe com sucesso.")player:setStorageValue(11548, os.time()+30)returnelseplayer:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")returnendend

 

3 semanas depois...
DanihcvD
30 de maio de 2016 às 22:00

Este tópico foi movido para Tutoriais e Suporte - Tutoriais de Scripting - Suporte Scripting

DanihcvD
30 de maio de 2016 às 22:00

Tópico movido para dúvidas / pedidos resolvidos.