Ir para conteúdo

(Resolvido)[AJUDA] Alavanca de sumonar monster esta bugada

Featured Replies

Postado
local config = 
{
	item1_id = 1543,
	item2_id = 1544,
	item1_pos = {x=761, y=1277, z=3, stackpos=1},
	item2_pos = {x=762, y=1277, z=3, stackpos=1},
	monster_pos = {x=755, y=1277, z=3},
	storage = 64246
}


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

	local item1_thing = getThingfromPos(config.item1_pos)
	local item2_thing = getThingfromPos(config.item2_pos)

	if getPlayerStorageValue(cid, config.storage) >= 1 then
		if item.itemid == 1945 then
			
			if getPlayerStorageValue(cid, config.storage) == 1 then
				doSummonCreature("Ron the Ripper", config.monster_pos)
				doPlayerSetStorageValue(cid, config.storage, 2)
			end
			
			doTransformItem(item.uid, 1946)
			doRemoveItem(item1_thing.uid, 1)
			doRemoveItem(item2_thing.uid, 1)
		else
			doTransformItem(item.uid, 1945)
			doCreateItem(config.item1_id, 1, config.item1_pos)
			doCreateItem(config.item2_id, 1, config.item2_pos)
		end
	else
		doPlayerSendTextMessage(cid, 22, "You cannot use this")
	end
	
	return true
end

testa ai

  • Respostas 48
  • Visualizações 2.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    Cara, eu tentei fazer algo encima do que eu entendi ... ;S local config = { item1 = {1543, {x=761, y=1277, z=3, stackpos=1}}, item2 = {1544, {x=762, y=1277, z=3, stackpos=1}}, monster_pos = {x=7

  • luanluciano93
    luanluciano93

    Agora vai ... function onUse(cid, item, frompos, item2, topos) local x = { item1 = {1543, {x=761, y=1277, z=3, stackpos=1}}, item2 = {1544, {x=762, y=1277, z=3, stackpos=1}}, monster_pos =

  • Poe o post do luan como melhor resposta.

Postado
  • Solução

 Agora vai ...

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

	local x = 
	{
		item1 = {1543, {x=761, y=1277, z=3, stackpos=1}},
		item2 = {1544, {x=762, y=1277, z=3, stackpos=1}},
		monster_pos = {x=755, y=1277, z=3},
		storage = 64246
	}

	if item.itemid == 1945 then
		if getPlayerStorageValue(cid, x.storage) < 1 then
			doSummonCreature("Ron the Ripper", x.monster_pos)
			doPlayerSetStorageValue(cid, x.storage, 1)
		end

		doTransformItem(item.uid, 1946)
		doRemoveItem(getThingfromPos(x.item1[2]).uid, 1)
		doRemoveItem(getThingfromPos(x.item2[2]).uid, 1)
	else
		doTransformItem(item.uid, 1945)
		doCreateItem(x.item1[1], 1, x.item2[2])
		doCreateItem(x.item1[1], 1, x.item2[2])
	end

	return true
end
Postado

@luanluciano93

 

Funciono perfeito no inicio, mas depois ele buga o cercado e não abre.

 

e aparece esse erro.

 

Ta quase :)

 

WUGTLf6.png

Tenta assim:

 

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

	local x = 
	{
		item1 = {1543, {x=761, y=1277, z=3, stackpos=1}},
		item2 = {1544, {x=762, y=1277, z=3, stackpos=1}},
		monster_pos = {x=755, y=1277, z=3},
		storage = 64246
	}

	if item.itemid == 1945 then
		if getPlayerStorageValue(cid, x.storage) < 1 then
			doSummonCreature("Ron the Ripper", x.monster_pos)
			doPlayerSetStorageValue(cid, x.storage, 1)
		end

		doTransformItem(item.uid, 1946)
		doRemoveItem(getThingFromPos(x.item1[2]).uid, 1)
		doRemoveItem(getThingFromPos(x.item2[2]).uid, 1)
	else
		doTransformItem(item.uid, 1945)
		doCreateItem(x.item1[1], 1, x.item2[2])
		doCreateItem(x.item1[1], 1, x.item2[2])
	end

	return true
end
                              _
                          .-'` `}
                  _./)   /       }
                .'o   \ |       }
                '.___.'`.\    {`
                /`\_/  , `.    }                                      ME DA UMA NOZ!
                \=' .-'   _`\  {
                 `'`;/      `,  }
                    _\   @   ;  }
                   /__`;-...'--'

Cluck!

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