Ir para conteúdo

Featured Replies

Postado

Preciso de um script que repara a Soft Boots e também a Firewalker Boots com click e usando o comando o !reparar soft e !reparar firewalker.

Eu tenho esse seguinte script abaixo, mais repara só a soft com comando.


--[[ script By Subwat Reparar soft e firewalker!]]--

function onSay(cid, words, param)

local config = {

price = 10000,

new_soft = 6132, -- id da nova soft boots

worn_soft = 10021, -- id da velha soft boots

new_firewalker = 9933, -- id da firewalker boots

worn_firewalker = 10022, -- id da velha firewalker boots

needPremium = true -- se precisa ser premium (true or false)

}

if (config.needPremium == true) and (not isPremium(cid)) then

doPlayerSendTextMessage(cid, 23, "desculpe apenas Premium players podem recarregar Suas Botas.")

return TRUE

end

if param == "soft" then

if getPlayerItemCount(cid, config.worn_soft) >= 1 then

if doPlayerRemoveMoney(cid,config.price) == TRUE then

doPlayerRemoveItem(cid,config.worn_soft,1)

doPlayerAddItem(cid,config.new_soft, 1)

end

end

return TRUE

end

if param == "firewalker" then

if getPlayerItemCount(cid, config.worn_firewalker) >= 1 then

if doPlayerRemoveMoney(cid,config.price) == TRUE then

doPlayerRemoveItem(cid,config.worn_firewalker,1)

doPlayerAddItem(cid,config.new_firewalker, 1)

end

end

return TRUE

end

end

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

  • Respostas 7
  • Visualizações 7.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Olá Irei colocar aqui a que eu uso no meu servidor.. Crie um Arquivo Chamado Soft.lua Em Actions/Scripts function onUse(cid, item, fromPosition, itemEx, toPosition) -- Itens config

  • sim clicar repara, mais são arquivos distintos tem que fazer os 2

Postado

Olá Irei colocar aqui a que eu uso no meu servidor..

Crie um Arquivo Chamado Soft.lua Em Actions/Scripts

function onUse(cid, item, fromPosition, itemEx, toPosition) 


-- Itens configuravéis. 

local t = {money = 10000, item = 10021, newitem = 2640} 


  if getPlayerItemCount(cid,t.item,1) then 

  if PlayerRemoveMoney(cid,t.money) then 

    doPlayerRemoveItem(cid,t.item,1) 

    doPlayerAddItem(cid,t.newitem,1)     

    doSendMagicEffect(fromPosition, CONST_ME_POFF) 

    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got a brand new pair of soft boots.") 

  else 

    doPlayerSendCancel(cid, "Sorry, is not possible.") 

  end 

  else 

    doPlayerSendCancel(cid, "Sorry, you need a " .. t.money .. " gold pieces.") 

  end 

  end 

 return true 

end  

Crie um Arquivo CHamado firewalker.lua Em Actions/Scripts/other

function onUse(cid, item, fromPosition, itemEx, toPosition)

local moneyneed = 20000 -- price to get new fire boots

local playermoney = getPlayerMoney(cid)

if playermoney >= moneyneed then

if doPlayerTakeItem(cid, 10022, 1) then

doRemoveItem(item.uid,1)

doPlayerAddItem(cid, 9933, 1)

doPlayerRemoveMoney(cid, moneyneed)

doSendMagicEffect(fromPosition,12)

else

doPlayerSendTextMessage(cid,20, "You don't have worn firewalker boots.")

end

else

doPlayerSendTextMessage(cid,20, "Sorry, but you need ".. moneyneed .." gold coins to get a new firewalker boots.")

end

end

Em Actions .XML Coloque AS Linhas

<action itemid="10021" script="other/soft.lua" />

<action itemid="10022" script="other/firewalker.lua"/>

Ajudei? REP +

Editado por leandrovp (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.9k

Informação Importante

Confirmação de Termo