OTHispano
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

Ir abajo
Slayer
Slayer
Miembro
Mensajes Mensajes : 4

Puertas Por Vocacion Empty Puertas Por Vocacion

Dom Abr 22, 2012 7:52 pm
Bueno Aqui Les Traigo Unas Puertas Para Cada Vocation Que Se Modifica Con el Remeres[color]

primero explicare las id de las vocaciones para no batallar
Código:
 Sorcer = vocation id="1"
Druid=vocation id="2"
Paladin=vocation id="3"
Knight=vocation id="4"

Ahora Los Scripts
data/actions/scripts

Empesemos con la Puerta para Sorcer :

Código:
function onUse(cid, item, frompos, item2, topos)
reqvoc = getPlayerVocation(cid)
if item.uid == 8201 then
if reqvoc == 5 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,'Ponte Enfrente de la Puerta.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Solamente Sorcerers entran aqui.')
end
return 1
else
return 0
end
end

Druid Door:
Código:
function onUse(cid, item, frompos, item2, topos)
reqvoc = getPlayerVocation(cid)
if item.uid == 8202 then
if reqvoc == 6 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,'Ponte Enfrente de la Puerta.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Solamente Druids entran aqui.')
end
return 1
else
return 0
end
end

Paladin Door:
Código:
function onUse(cid, item, frompos, item2, topos)
reqvoc = getPlayerVocation(cid)
if item.uid == 8200 then
if reqvoc == 7 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,'Ponte Enfrente de la Puerta.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Solamente Paladins entran aqui.')
end
return 1
else
return 0
end
end

Paladin Door:
Código:
function onUse(cid, item, frompos, item2, topos)
reqvoc = getPlayerVocation(cid)
if item.uid == 8203 then
if reqvoc == 8 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,'Ponte Enfrente de la Puerta.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Solamente Knights entran aqui.')
end
return 1
else
return 0
end
end

las guardamos con el nombre de cada vocacion ejemplo "sorcdoor.lua", ahora vamos a actions.xml y pegamos esto
Código:
<action uniqueid="8200" script="palador.lua" />
<action uniqueid="8201" script="sorcdor.lua" />
<action uniqueid="8202" script="druiddor.lua" />
<action uniqueid="8203" script="kinador.lua" />

as uniqueid dependen de ustedes pueden ser las que sean solo que no se repitan con otras, y las colocan tambien en el script que hicimos antes por ejemplo:
sorcer door, aqui modifican la uniqueid que ustedes elijieron
Código:
if item.uid == 8201 then

sorcer door uniqeid
Código:
<action uniqueid="8201" script="sorcdor.lua" />

bueno ya con eso tenemos listas las uniqueid de las puertas, ahora vamos a remeres map editor , ponemos una puerta cerrada (oviamente) y damos click derecho , propiedades, y en uniqueid ponemos la de la vocacion que querramos que entre por desir paladin , seria uniqueid: 8200 y listo ,solo entraria el paladin.

Creditos
99% miisael (Blacktibia)
1% Yo por Traerlo Very Happy
Volver arriba
Permisos de este foro:
No puedes responder a temas en este foro.