Ir para conteúdo

Featured Replies

Postado

actions.xml

    <action uniqueid="3009" script="rook/sewer grate switch.lua" />
    <action uniqueid="3010" script="rook/sewer grate switch.lua" />

actions/script/rook/

function onUse(cid, item, frompos, item2, topos)
    tile1 = {x = 32100, y = 32205, z = 8, stackpos = 1}
    tile2 = {x = 32101, y = 32205, z = 8, stackpos = 1}
    local playerTile = {x = 32100, y = 32205, z = 8}
    local playerTile1 = {x = 32101, y = 32205, z = 8}
    gettile1 = getThingfromPos(tile1)
    gettile2 = getThingfromPos(tile2)
    if item.itemid == 1945 then
        for i = 1133, 1134 do
        doTransformItem(i, 1946)
        end
        doCreateItem(493,1,tile1)
        doCreateItem(493,1,tile2)
        doCreateItem(4799,1,tile1)
        doCreateItem(4797,1,tile2)
        if isCreature(getTopCreature(playerTile).uid) then
            doTeleportThing(getTopCreature(playerTile).uid, {x = 32102, y = 32205, z = 8})
        end
        if isCreature(getTopCreature(playerTile1).uid) then
            doTeleportThing(getTopCreature(playerTile1).uid, {x = 32102, y = 32205, z = 8})
        end
    elseif item.itemid == 1946 then
        for i = 1133, 1134 do
        doTransformItem(i, 1945)
        end
        doCreateItem(1284,1,tile1)
        doCreateItem(1284,1,tile2)
        doRemoveItem(4799,1,tile1)		
        doRemoveItem(gettile2.uid,1)
    else
        doPlayerSendCancel(cid,"Sorry, not possible.")
    end
    return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
    end

erro my distro/ erro na minha distro após usar alavanca

Lua Script Error: [Action Interface]
data/actions/scripts/rook/sewer grate switch.lua:onUse

luaDoTransformItem(). Item not found

test.png

Postado
function onUse(cid, item, frompos, item2, topos)
    tile1 = {x = 32100, y = 32205, z = 8, stackpos = 1}
    tile2 = {x = 32101, y = 32205, z = 8, stackpos = 1}
    local playerTile = {x = 32100, y = 32205, z = 8}
    local playerTile1 = {x = 32101, y = 32205, z = 8}
    gettile1 = getThingfromPos(tile1)
    gettile2 = getThingfromPos(tile2)
	
	if item.itemid == 1945 then
		for i = 1133, 1134 do
			doTransformItem(item.uid, 1946)
		end
		doCreateItem(493,1,tile1)
		doCreateItem(493,1,tile2)
		doCreateItem(4799,1,tile1)
		doCreateItem(4797,1,tile2)
		
		if isCreature(getTopCreature(playerTile).uid) then
			doTeleportThing(getTopCreature(playerTile).uid, {x = 32102, y = 32205, z = 8})
		end
		
		if isCreature(getTopCreature(playerTile1).uid) then
			doTeleportThing(getTopCreature(playerTile1).uid, {x = 32102, y = 32205, z = 8})
		end
		
	elseif item.itemid == 1946 then
		for i = 1133, 1134 do
			doTransformItem(item.uid, 1945)
		end
		doCreateItem(1284,1, tile1)
		doCreateItem(1284,1, tile2)
		doRemoveItem(gettile1.uid, 1)		
		doRemoveItem(gettile2.uid, 1)
	else
		doPlayerSendCancel(cid,"Sorry, not possible.")
	end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end

 

Não dou suporte via PM, crie um tópico caso tenha dúvidas.

Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.

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