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
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
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
so uma? e qual o id que eu devo usar ?
e se poder fazer as quatros plx
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 sorclocal 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.COMFIKO ON TODO FINAL DE SEMANA(SEXTA.SABADO.DOMINGO)
Ajudei? Rep ,nao custa nada
http://www.xtibia.com/forum/topic/182700-global-1000x-full-24h/page__fromsearch__1NOVO GLOBAL 1000X 24/H
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
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+