{Pedido}{Script}

merck
Por merck
em Lixeira Pública

merck

Jakiin
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 17/04/11Posts: 10

eu quero uma script que tipo 4 portas 1 de cada clase uma para Knight,paly,sorc,druid

cada porta só uma clase entrasse 1 so para Knight outra para paly e assim em diante

ii e isto ae se alguen pode me ajudar

valendo +rep

PsyMcKenzie

Grounder
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 18/05/11Posts: 1106Gênero: Masculino

vá em data/actions/scripts, cria um arquivo com o nome de portas depois cola isso :

 

 

function onUse(cid, item, frompos, item2, topos) local Vocid = 8 -- Id da vocação local LEVEL = 10000 -- LEVEL do player if item.uid == 22554 then status1 = getPlayerVocation(cid) if status1 == Vocid and getPlayerLevel(cid) >= LEVEL then pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end else doPlayerSendCancel(cid,'Stand in front of the door.') return 1 end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) else doPlayerSendCancel(cid,'You are not a knight or level 10000.') end return 1 else return 0 end end

 

 

depois em actionsxml se coloka :

 

 

<action uniqueid="22554" script="portas" />

 

 

malz ae spoiler saiu errado ;S

 

 

 

eh isso akeee

 

 

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

 

 

local Vocid = 8 -- Id da vocação

local LEVEL = 10000 -- LEVEL do player

 

if item.uid == 22554 then

status1 = getPlayerVocation(cid)

if status1 == Vocid and getPlayerLevel(cid) >= LEVEL then

 

pos = getPlayerPosition(cid)

 

if pos.x == topos.x then

if pos.y < topos.y then

pos.y = topos.y + 1

else

pos.y = topos.y - 1

end

elseif pos.y == topos.y then

if pos.x < topos.x then

pos.x = topos.x + 1

else

pos.x = topos.x - 1

end

else

doPlayerSendCancel(cid,'Stand in front of the door.')

return 1

end

 

doTeleportThing(cid,pos)

doSendMagicEffect(topos,12)

else

doPlayerSendCancel(cid,'You are not a knight or level 10000.')

end

return 1

else

return 0

end

end

Atenciosamente,

PsyMcKenzie.

 

 

Meus Trabalhos.

 

 

merck

Jakiin
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 17/04/11Posts: 10

so uma? e qual o id que eu devo usar ?

e se poder fazer as quatros plx

joao33

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 24/01/11Posts: 254Char no Tibia: Zemekiz

Man se faiz issu de acordo com a vocation do player sorc id=1 druid=2 pally=3 kina=4

 

vai en data/actions/scripts cria 1 arquivo xamado doorsvocations.lua

e adiciona issu

 

local Vocid = 1 -- Id da vocação no caso aki sorc

local LEVEL = 8 -- LEVEL do player

 

if item.uid == 22554 then

status1 = getPlayerVocation(cid)

if status1 == Vocid and getPlayerLevel(cid) >= LEVEL then

 

pos = getPlayerPosition(cid)

 

if pos.x == topos.x then

if pos.y < topos.y then

pos.y = topos.y + 1

else

pos.y = topos.y - 1

end

elseif pos.y == topos.y then

if pos.x < topos.x then

pos.x = topos.x + 1

else

pos.x = topos.x - 1

end

else

doPlayerSendCancel(cid,'Stand in front of the door.')

return 1

end

 

doTeleportThing(cid,pos)

doSendMagicEffect(topos,12)

else

doPlayerSendCancel(cid,'You are not a SORC or level 8.')------------oque vai dizer se a pessoa nao for do level ou da vocaçao escolhida

end

return 1

else

return 0

end

end

 

vai em data/actions/actions.xml

e add issu

<action uniqueid="22554" script="portas" />

DPS ABRE SEU MAP EDITOR BOTA 1 CLOSED DOOR E VAI NAS PROPRIEDADES DELA E ADD NO UNIQUEID=22554

 

PRA FAZER A OTRA PORTA SO VOCE FAZER OS MESMOS PASSOS SO Q MUDAR A VOCATION E O UNIQUEID BOTE QUALQUER 1 QUE NAO ESTEJA SENDO USADO E MUDE NO ACTIONS.XML TBM E NO MAP EDITOR

 

SE AJUDEI REP+

 

SE NAO CONSEGUIU ADD EU NO MSN

 

TROJAN.BR@HOTMAIL.COM

FIKO ON TODO FINAL DE SEMANA(SEXTA.SABADO.DOMINGO)

douguera

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/05/08Posts: 69

em action.xml coloque

 

<action uniqueid="8300" script="palador.lua" />

<action uniqueid="8301" script="sorcdor.lua" />

<action uniqueid="8302" script="druiddor.lua" />

<action uniqueid="8303" script="kinador.lua" />

 

 

em actions/scripts

 

crie 4 arquivos com nome de

 

palador.lua

sorcdor.lua

druiddor.lua

kinador.lua

 

e coloque isso dentro

palador.lua

 

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

reqvoc = getPlayerVocation(cid)

if item.uid == 8300 then

if reqvoc == 3 then

pos = getPlayerPosition(cid)

 

if pos.x == topos.x then

if pos.y < topos.y then

pos.y = topos.y + 1

else

pos.y = topos.y - 1

end

elseif pos.y == topos.y then

if pos.x < topos.x then

pos.x = topos.x + 1

else

pos.x = topos.x - 1

end

else

doPlayerSendTextMessage(cid,22,'Stand in front of the door.')

return 1

end

 

doTeleportThing(cid,pos)

doSendMagicEffect(topos,12)

else

doPlayerSendTextMessage(cid,22,'Somente Paladins entram aqui.')

end

return 1

else

return 0

end

end

 

sorcdor.lua

 

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

reqvoc = getPlayerVocation(cid)

if item.uid == 8301 then

if reqvoc == 1 then

pos = getPlayerPosition(cid)

 

if pos.x == topos.x then

if pos.y < topos.y then

pos.y = topos.y + 1

else

pos.y = topos.y - 1

end

elseif pos.y == topos.y then

if pos.x < topos.x then

pos.x = topos.x + 1

else

pos.x = topos.x - 1

end

else

doPlayerSendTextMessage(cid,22,'Stand in front of the door.')

return 1

end

 

doTeleportThing(cid,pos)

doSendMagicEffect(topos,12)

else

doPlayerSendTextMessage(cid,22,'Somente Sorcerers entram aqui.')

end

return 1

else

return 0

end

end

 

druiddor.lua

 

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

reqvoc = getPlayerVocation(cid)

if item.uid == 8302 then

if reqvoc == 2 then

pos = getPlayerPosition(cid)

 

if pos.x == topos.x then

if pos.y < topos.y then

pos.y = topos.y + 1

else

pos.y = topos.y - 1

end

elseif pos.y == topos.y then

if pos.x < topos.x then

pos.x = topos.x + 1

else

pos.x = topos.x - 1

end

else

doPlayerSendTextMessage(cid,22,'Stand in front of the door.')

return 1

end

 

doTeleportThing(cid,pos)

doSendMagicEffect(topos,12)

else

doPlayerSendTextMessage(cid,22,'Somente Druids entram aqui.')

end

return 1

else

return 0

end

end

 

kinador.lua

 

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

reqvoc = getPlayerVocation(cid)

if item.uid == 8303 then

if reqvoc == 4 then

pos = getPlayerPosition(cid)

 

if pos.x == topos.x then

if pos.y < topos.y then

pos.y = topos.y + 1

else

pos.y = topos.y - 1

end

elseif pos.y == topos.y then

if pos.x < topos.x then

pos.x = topos.x + 1

else

pos.x = topos.x - 1

end

else

doPlayerSendTextMessage(cid,22,'Stand in front of the door.')

return 1

end

 

doTeleportThing(cid,pos)

doSendMagicEffect(topos,12)

else

doPlayerSendTextMessage(cid,22,'Somente Knights entram aqui.')

end

return 1

else

return 0

end

end

 

PsyMcKenzie

Grounder
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 18/05/11Posts: 1106Gênero: Masculino

leke é só você usar o mesmo script e fazer mais 3 portas ;S

e o action que você coloca na porta eh o que ta no actions.xml

=D

 

ajudei ?? rep+

Atenciosamente,

PsyMcKenzie.

 

 

Meus Trabalhos.