Postado Maio 29, 2015 10 anos Olá pessoal! Ao usar o a corda no item 4988, o player sobe um andar com esse script.. local holeId = {3369, 7062, 7064, 7066, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136} function onUse(cid, item, fromPosition, itemEx, toPosition) local groundTile = getThingfromPos(toPosition) if groundTile.itemid == 7062 or groundTile.itemid == 7066 or groundTile.itemid == 4988 then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y - 1, z = toPosition.z - 1}, FALSE) elseif isInArray(holeId, itemEx.itemid) == TRUE then local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if hole.itemid > 0 then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE) else doPlayerSendCancel(cid, "Sorry, not possible.") end else return FALSE end return TRUE end Então pessoal, gostaria que esse mesmo script tivesse além dessa função de subir um andar, descer um andar.. seria só colocar o inverso mas não to conseguindo colocar um mísero else ai, realmente n ta indo pra subir um andar precisa usar a corda no itemid 4988, quero que pra descer tenha que usar a corda no itemid 1409.. Grato desde já!
Postado Maio 29, 2015 10 anos local holeId = {3369, 7062, 7064, 7066, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136} function onUse(cid, item, fromPosition, itemEx, toPosition) local groundTile = getThingfromPos(toPosition) if groundTile.itemid == 7062 or groundTile.itemid == 7066 or groundTile.itemid == 4988 then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y - 1, z = toPosition.z - 1}, false) elseif groundTiel.itemid == 1409 then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y - 1, z = toPosition.z + 1}, false) elseif isInArray(holeId, itemEx.itemid) then local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if hole.itemid > 0 then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendCancel(cid, "Sorry, not possible.") end else return false 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.