Ir para conteúdo

[new Cvs]level Door And Quest Door


tibiaa4e

Posts Recomendados

Hoje estou começando a postar coisas da nova cvs (evolutions 0.7.1)

creditos:Talaturen

Começaremos com as level door e quest door

as quest door são akelas com a bolinha vermelha,as 2 para ativar se colcoa o actionid

exemplo

Level door para lvl 20=actionid=1020

Quest door =actionid=player storage value

crie uma pasta chamada DOORS na pasta actions/scripts e add

lvldoor.lua e add

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

if item.actionid > 0 and getPlayerLevel(cid) >= item.actionid - 1000 then

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

  doTeleportThing(cid,frompos)

else

  doPlayerSendTextMessage(cid,22,'Only the worthy may pass.')

end

doSetItemSpecialDescription(item.uid, "It is a gate of expertise for level " .. (item.actionid - 1000) .. ".")

return 1

end

questdoor.lua

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

if getPlayerStorageValue(cid,item.actionid) == -1 then

  doPlayerSendTextMessage(cid,22,'The door seems to be sealed against unwanted intruders.')

else

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

  doTeleportThing(cid,frompos)

end

return 1

end

door_open_horizontal.lua

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

if getThingfromPos({x=frompos.x, y=frompos.y, z=frompos.z, stackpos=253}).itemid > 0 then

  doMoveCreature(cid,2)

end

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

return 1

end

door_open_vertical.lua

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

if getThingfromPos({x=frompos.x, y=frompos.y, z=frompos.z, stackpos=253}).itemid > 0 then

  doMoveCreature(cid,1)

end

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

return 1

end

e e actions.xml apague tudo q tenha leveldoor.lua como arquivo e add

<action itemid="1227" script="doors/lvldoor.lua" />

<action itemid="1228" script="doors/door_open_vertical.lua" />

<action itemid="1229" script="doors/lvldoor.lua" />

<action itemid="1230" script="doors/door_open_horizontal.lua" />

<action itemid="1245" script="doors/lvldoor.lua" />

<action itemid="1246" script="doors/door_open_vertical.lua" />

<action itemid="1247" script="doors/lvldoor.lua" />

<action itemid="1248" script="doors/door_open_horizontal.lua" />

<action itemid="1259" script="doors/lvldoor.lua" />

<action itemid="1260" script="doors/door_open_vertical.lua" />

<action itemid="1261" script="doors/lvldoor.lua" />

<action itemid="1262" script="doors/door_open_horizontal.lua" />

<action itemid="3540" script="doors/lvldoor.lua" />

<action itemid="3541" script="doors/door_open_horizontal.lua" />

<action itemid="3549" script="doors/lvldoor.lua" />

<action itemid="3550" script="doors/door_open_vertical.lua" />

<action itemid="1223" script="doors/questdoor.lua" />

<action itemid="1224" script="doors/door_open_vertical.lua" />

<action itemid="1225" script="doors/questdoor.lua" />

<action itemid="1226" script="doors/door_open_horizontal.lua" />

<action itemid="1241" script="doors/questdoor.lua" />

<action itemid="1242" script="doors/door_open_vertical.lua" />

<action itemid="1243" script="doors/questdoor.lua" />

<action itemid="1244" script="doors/door_open_horizontal.lua" />

<action itemid="1255" script="doors/questdoor.lua" />

<action itemid="1256" script="doors/door_open_vertical.lua" />

<action itemid="1257" script="doors/questdoor.lua" />

<action itemid="1258" script="doors/door_open_horizontal.lua" />

<action itemid="3542" script="doors/questdoor.lua" />

<action itemid="3543" script="doors/door_open_horizontal.lua" />

<action itemid="3551" script="doors/questdoor.lua" />

<action itemid="3552" script="doors/door_open_vertical.lua" />

agr o script para ela fechar igual no rl tibia

na pasta movements/script

crie um arikivo

closingdoor.lua

function onStepOut(cid, item, pos)

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

end

e em movements.xml add no final

movevent event="StepOut" itemid="1228" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1230" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1246" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1248" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1260" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1262" script="closingdoor.lua" />

<movevent event="StepOut" itemid="3541" script="closingdoor.lua" />

<movevent event="StepOut" itemid="3550" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1224" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1226" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1242" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1244" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1256" script="closingdoor.lua" />

<movevent event="StepOut" itemid="1258" script="closingdoor.lua" />

<movevent event="StepOut" itemid="3543" script="closingdoor.lua" />

<movevent event="StepOut" itemid="3552" script="closingdoor.lua" />

é isso ai suas level door e quest door vai funfar igual o rl

comentem

flws :bye:

Link para o comentário
Compartilhar em outros sites

First? :D

Ótimo cara! Realmente muito bom...

Estava cansado daquelas velhas portas sem descrições e tal... ^^

E Aqueles teleports e ficar na frente da porta não era nada bom =)

Realmente adorei essa action!

Continue postando coisas pra gente :D \o/

Valeus cara ;]

Yours Thy.

Link para o comentário
Compartilhar em outros sites

  • 3 weeks later...
  • 1 month later...

Ta4e, aqui deu tudo certo, menos a porta de lvl com id 5112 (aquela porta de tijolos vermelhos, essa eh a id dessa portal horizontal, fechada)

 

Ai botei as ids dela, junto com tudo q vc mandou botar no actions.xml, assim:

 

 <action itemid="5103" script="doors/lvldoor.lua" />
<action itemid="5104" script="doors/door_open_vertical.lua" />
<action itemid="5112" script="doors/lvldoor.lua" />
<action itemid="5113" script="doors/door_open_horizontal.lua" />

 

Deu certo, mas a porta nao fecha ;/

Ajuda ai

:)

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...