Ir para conteúdo

Featured Replies

  • Respostas 8
  • Visualizações 933
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor

Achei esse aqui:

 

 

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

Postado

Olha eu não manjo muito de scripts, estou começando agora então pode ter algo errado mais testa ai:

Crie 1 arquivo chamado hota.lua em Actions>Scripts>Others e adicione:

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

if doPlayerTakeItem(cid, 2147, 1) then
if doPlayerTakeItem(cid, 2342, 1) then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid, 2343, 1)
doSendMagicEffect(fromPosition,12)
else
doPlayerSendTextMessage(cid,20, "Voce nao tem 1 helmet of the ancients.")
end
else
doPlayerSendTextMessage(cid,20, "Desculpe, voce precisa de 1 small ruby para reparar seu helmet.")
end
end

 
Agora abra o Actions.xml e adicione está linha:
<action itemid="2342" script="other/hota.lua"/>

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

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

local cost = 20000 -- Preço...

	if doPlayerRemoveMoney(cid, cost) then
		doRemoveItem(item.uid, 1)
		doPlayerAddItem(cid, 2343, 1)
		doSendMagicEffect(getThingPos(cid), 12)
	else
		doPlayerSendTextMessage(cid, 20, "Sorry, but you need ".. cost .." gold coins to get a new helmet of the ancients.")
	end

return true
end
<action itemid="2342" script="ARQUIVO.lua"/>

EQD4Qy4.gif

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.6k

Informação Importante

Confirmação de Termo