MA
pedido

Como fazer Alavanca De Compra Potions/Runas?

Por mantega11, 06 de nov. de 2015 em Scripts

como fazer alavanca de compra
2
1.2k
mantega11M
06 de novembro de 2015 às 09:28

Como fazer Alavanca De Compra Potions/Runas?

Alguem Podia me ajudar....

:D

1 mês depois...
PsychedelicP
03 de dezembro de 2015 às 16:41

<action actionid="action da alavanca" script="nome do arquivo.lua"/>

 

 

smp_id = 7589 -- Id do item

custosmp_id = 5000 -- Preço
cargassmp_id = 100 -- Quantidade
local name = getItemNameById(smp_id)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, custosmp_id) == TRUE then
doSendAnimatedText(fromPosition, "", TEXTCOLOR_YELLOW)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have purchased a 100 ".. name .."s for ".. custosmp_id .." gold.")
for i=1,1 do
doPlayerAddItem(cid,smp_id, cargassmp_id)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need ".. custosmp_id .." gold coins for a 100 ".. name .."s.")
end
return FALSE
end