Ir para conteúdo

Featured Replies

Postado

Boa Tarde,

 

 

 

Estou tentando criar um Actions que doma a montaria fora a que já vem no servidor, mais não sei o que tem de errado =( 

 

 

Configurações;

 

Actions.xml

<action itemid="13537" script="other/donkey.lua"/> - ID do item que doma = 13537

 

 

 

donkey.lua

local monster = "donkey"

function onUse(cid, item, frompos, itemEx, topos )

	if itemEx.itemid == id then
		doPlayerAddMount(cid, 13)
		doPlayerSendTextMessage(cid, 19,"The strange wheel seems to vibrate and slowly starts turning continuosly.")
		doPlayerRemoveItem(cid, 13537, 1)
	else
		doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")
	end
	
	return true
end 

 

 

 

 

OBS: Não da erro algum na distro, quando eu vou dar use no item e clico no Donkey aparece essa msg e não adiciona o monstro =/

 

Msg que aparece 

Sorry, you already have that ride. 

 

 

 

 

 

abs

 

 

Resolvido por zipter98

Ir para solução
  • Respostas 15
  • Visualizações 447
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local monster, storage = "donkey", 5918 function onUse(cid, item, frompos, itemEx, topos)     if getPlayerStorageValue(cid, storage) > -1 then         return doPlayerSendTextMessage(cid, 19, "Sorry

  • local mounts = {     --[itemid] = {name = "monster", storage = storage, mountId = xxx, chance = xxx},      [13937] = {name = "donkey", storage = 5918, mountId = 13, chance = 50},        --Sendo a chan

  • local mounts = {     --[itemid] = {name = "monster", storage = storage, mountId = xxx},      [13937] = {name = "donkey", storage = 5918, mountId = 13}, } function onUse(cid, item, frompos, itemEx, top

Postado

Tenta assim :

local id = 13937

function onUse(cid, item, frompos, item2, topos )

	if item2.itemid == id then
		doPlayerAddMount(cid, 13)
		doPlayerSendTextMessage(cid, 19,"The strange wheel seems to vibrate and slowly starts turning continuosly.")
		doPlayerRemoveItem(cid, item.uid, 1)
	else
		return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")
	end
	
	return true
end

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

Postado
  • Autor

 

Tenta assim :

local id = 13937

function onUse(cid, item, frompos, item2, topos )

	if item2.itemid == id then
		doPlayerAddMount(cid, 13)
		doPlayerSendTextMessage(cid, 19,"The strange wheel seems to vibrate and slowly starts turning continuosly.")
		doPlayerRemoveItem(cid, item.uid, 1)
	else
		return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")
	end
	
	return true
end

assim ele não vai usar no monstro que é o certo =(

Postado

local monster, storage = "donkey", 5918
function onUse(cid, item, frompos, itemEx, topos)
    if getPlayerStorageValue(cid, storage) > -1 then
        return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")
    elseif not isMonster(itemEx.uid) then
        return doPlayerSendCancel(cid, "Use this in a monster.")
    elseif getCreatureName(itemEx.uid):lower() ~= monster then
        return doPlayerSendCancel(cid, "Use this in "..monster..".")
    end
    doPlayerAddMount(cid, 13)
    doPlayerSendTextMessage(cid, 19, "The strange wheel seems to vibrate and slowly starts turning continuosly.")
    doRemoveItem(item.uid, 1)
    setPlayerStorageValue(cid, storage, 1)
    return true
end

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