Ir para conteúdo

Doors 7.9


tibiaa4e

Posts Recomendados

Creditos:Raficin

faça um arquivo chamado door.lua em actions/script

e add

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

-- Doors By Rafacin

VERTICAL_CLOSED2 = {1209, 1231, 1249, 3544, 5107, 5125, 5140, 5143, 5281, 6192, 6249}

VERTICAL_CLOSED_DOOR = {1210, 1219, 1232, 1237, 1250, 3545, 3547, 5108, 5110, 5126, 5128, 5141, 5144, 5282, 5284, 5515, 5748, 6193, 6198, 6250, 6255, 1539}

VERTICAL_OPENED_DOOR = {1211, 1220, 1233, 1238, 1251, 3546, 3548, 5109, 5111, 5127, 5129, 5142, 5145, 5283, 5285, 5516, 5749, 6194, 6199, 6251, 6256, 1540}

HORIZONTAL_CLOSED2 = {1212, 1234, 1252, 3535, 5098, 5116, 5134, 5137, 5278, 6195, 6252}

HORIZONTAL_CLOSED_DOOR = {1213, 1221, 1235, 1239, 1253, 3536, 3538, 5099, 5101, 5117, 5119, 5135, 5138, 5279, 5286, 5517, 5745, 6196, 6200, 6253, 6257, 1541}

HORIZONTAL_OPENED_DOOR = {1214, 1222, 1236, 1240, 1254, 3537, 3539, 5100, 5102, 5118, 5120, 5136, 5139, 5280, 5287, 5518, 5746, 6197, 6201, 6254, 6258, 1542}

DoorPosition = {x=frompos.x, y=frompos.y, z=frompos.z, stackpos=253}

PlayerPosition = getThingfromPos(DoorPosition)

if item.actionid > 0 then

  doPlayerSendCancel(cid, "It is locked.")

end

if isInArray(VERTICAL_CLOSED2, item.itemid) or isInArray(HORIZONTAL_CLOSED2, item.itemid) == 1 then

  doTransformItem(item.uid, item.itemid+2)

end

if isInArray(VERTICAL_CLOSED_DOOR, item.itemid) or isInArray(HORIZONTAL_CLOSED_DOOR, item.itemid) == 1 then

  doTransformItem(item.uid, item.itemid+1)

end

if isInArray(VERTICAL_OPENED_DOOR, item.itemid) == 1 then

  if PlayerPosition.itemid > 0 then

  doMoveCreature(PlayerPosition.uid, 1)

  end

  doTransformItem(item.uid, item.itemid-1)

end

if isInArray(HORIZONTAL_OPENED_DOOR, item.itemid) == 1 then

  if PlayerPosition.itemid > 0 then

  doMoveCreature(PlayerPosition.uid, 2)

  end

  doTransformItem(item.uid, item.itemid-1)

end

return 1

end

em actions.xml troque tudo q tenha a ver com door e add isso

<action itemid="1209" script="door.lua" />

<action itemid="1210" script="door.lua" />

<action itemid="1211" script="door.lua" />

<action itemid="1212" script="door.lua" />

<action itemid="1213" script="door.lua" />

<action itemid="1214" script="door.lua" />

<action itemid="1219" script="door.lua" />

<action itemid="1220" script="door.lua" />

<action itemid="1221" script="door.lua" />

<action itemid="1222" script="door.lua" />

<action itemid="1231" script="door.lua" />

<action itemid="1232" script="door.lua" />

<action itemid="1233" script="door.lua" />

<action itemid="1234" script="door.lua" />

<action itemid="1235" script="door.lua" />

<action itemid="1236" script="door.lua" />

<action itemid="1237" script="door.lua" />

<action itemid="1238" script="door.lua" />

<action itemid="1239" script="door.lua" />

<action itemid="1240" script="door.lua" />

<action itemid="1249" script="door.lua" />

<action itemid="1250" script="door.lua" />

<action itemid="1251" script="door.lua" />

<action itemid="1252" script="door.lua" />

<action itemid="1253" script="door.lua" />

<action itemid="1254" script="door.lua" />

<action itemid="1539" script="door.lua" />

<action itemid="1540" script="door.lua" />

<action itemid="1541" script="door.lua" />

<action itemid="1542" script="door.lua" />

<action itemid="3535" script="door.lua" />

<action itemid="3536" script="door.lua" />

<action itemid="3537" script="door.lua" />

<action itemid="3538" script="door.lua" />

<action itemid="3539" script="door.lua" />

<action itemid="3544" script="door.lua" />

<action itemid="3545" script="door.lua" />

<action itemid="3546" script="door.lua" />

<action itemid="3547" script="door.lua" />

<action itemid="3548" script="door.lua" />

<action itemid="5098" script="door.lua" />

<action itemid="5099" script="door.lua" />

<action itemid="5100" script="door.lua" />

<action itemid="5101" script="door.lua" />

<action itemid="5102" script="door.lua" />

<action itemid="5107" script="door.lua" />

<action itemid="5108" script="door.lua" />

<action itemid="5109" script="door.lua" />

<action itemid="5110" script="door.lua" />

<action itemid="5111" script="door.lua" />

<action itemid="5116" script="door.lua" />

<action itemid="5117" script="door.lua" />

<action itemid="5118" script="door.lua" />

<action itemid="5119" script="door.lua" />

<action itemid="5120" script="door.lua" />

<action itemid="5125" script="door.lua" />

<action itemid="5126" script="door.lua" />

<action itemid="5127" script="door.lua" />

<action itemid="5128" script="door.lua" />

<action itemid="5129" script="door.lua" />

<action itemid="5134" script="door.lua" />

<action itemid="5135" script="door.lua" />

<action itemid="5136" script="door.lua" />

<action itemid="5137" script="door.lua" />

<action itemid="5138" script="door.lua" />

<action itemid="5139" script="door.lua" />

<action itemid="5140" script="door.lua" />

<action itemid="5141" script="door.lua" />

<action itemid="5142" script="door.lua" />

<action itemid="5143" script="door.lua" />

<action itemid="5144" script="door.lua" />

<action itemid="5145" script="door.lua" />

<action itemid="5278" script="door.lua" />

<action itemid="5279" script="door.lua" />

<action itemid="5280" script="door.lua" />

<action itemid="5281" script="door.lua" />

<action itemid="5282" script="door.lua" />

<action itemid="5283" script="door.lua" />

<action itemid="5284" script="door.lua" />

<action itemid="5285" script="door.lua" />

<action itemid="5286" script="door.lua" />

<action itemid="5287" script="door.lua" />

<action itemid="5745" script="door.lua" />

<action itemid="5746" script="door.lua" />

<action itemid="5748" script="door.lua" />

<action itemid="5749" script="door.lua" />

<action itemid="6192" script="door.lua" />

<action itemid="6193" script="door.lua" />

<action itemid="6194" script="door.lua" />

<action itemid="6195" script="door.lua" />

<action itemid="6196" script="door.lua" />

<action itemid="6197" script="door.lua" />

<action itemid="6198" script="door.lua" />

<action itemid="6199" script="door.lua" />

<action itemid="6200" script="door.lua" />

<action itemid="6201" script="door.lua" />

<action itemid="6249" script="door.lua" />

<action itemid="6250" script="door.lua" />

<action itemid="6251" script="door.lua" />

<action itemid="6252" script="door.lua" />

<action itemid="6253" script="door.lua" />

<action itemid="6254" script="door.lua" />

<action itemid="6255" script="door.lua" />

<action itemid="6256" script="door.lua" />

<action itemid="6257" script="door.lua" />

<action itemid="6258" script="door.lua" />

flws :bye:

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...