Jump to content

[PETICION]Quest


EzekielitohMercury

Mensajes recomendados

Hola Amigos Queria Saber Si Se Puede Hacer Una Quest Que Sea Como Una "Mision Teleport"

 

Que Sea Como Una Mision Y La Abres Y Te Da A Elegir Si Quieres Ir A

 

Jinno City1

Jinno City2

 

Shinsoo City1

ShinsooCity2

 

Chunjo City1

Chunjo City2

 

Ya Que Muchos Aveces Se Olvidan De Comprar Anillo De Teleport Y Se Quedan Encerrado En Algun Mapa!...

 

Si Es Posible Alguien Me La Hacen? Porfavor Se Los Agradeceria!.

Enlace para comentar
Compartir en otros sitios


quest teleportar begin

state start begin

when login begin

set_state(teleport)

end

end

state teleport begin

when letter begin

send_letter("Teleportar")

end

when info or button begin

say("Donde quieres ir?")

local b = select ("Ciudad 1 - Jinno", "Ciudad 2 - Jinno", "Ciudad 1 - Shinsoo", "Ciudad 2 - Shinsoo", "Ciudad 1 - Chunjo", "Ciudad 2 - Chunjo", "Salir")

if b == 1 then

pc.warp(969600, 278400)

elseif b == 2 then

pc.warp(873100, 242600)

elseif b == 3 then

pc.warp (469300, 964200)

elseif b == 4 then

pc.warp (360800, 877600)

elseif b == 5 then

pc.warp (55700, 157900)

elseif b == 6 then

pc.warp (138500, 234900)

end

end

end

end

end

Enlace para comentar
Compartir en otros sitios

se puede escribir mejor, para eso no se nesesita cambiar el state

quest teleportar begin
state start begin
  when letter begin
   send_letter("Teleportar")
  end
  when info or button begin
   say("Donde quieres ir?")
   local b = select ("Ciudad 1 - Jinno", "Ciudad 2 - Jinno", "Ciudad 1 - Shinsoo", "Ciudad 2 - Shinsoo", "Ciudad 1 - Chunjo", "Ciudad 2 - Chunjo", "Salir")
   local tele={
   {969600, 278400},--Ciudad 1 - Jinno
   {873100, 242600},--Ciudad 2 - Jinno
   {469300, 964200},--Ciudad 1 - Shinsoo
   {360800, 877600},--Ciudad 2 - Shinsoo
   {55700, 157900},--Ciudad 1 - Chunjo
   {138500, 234900}--Ciudad 2 - Chunjo
   }
   pc.warp(tele[b][1], tele[b][2])
  end
end
end
Enlace para comentar
Compartir en otros sitios

se puede escribir mejor, para eso no se nesesita cambiar el state

quest teleportar begin
state start begin
  when letter begin
   send_letter("Teleportar")
  end
  when info or button begin
   say("Donde quieres ir?")
   local b = select ("Ciudad 1 - Jinno", "Ciudad 2 - Jinno", "Ciudad 1 - Shinsoo", "Ciudad 2 - Shinsoo", "Ciudad 1 - Chunjo", "Ciudad 2 - Chunjo", "Salir")
   local tele={
   {969600, 278400},--Ciudad 1 - Jinno
   {873100, 242600},--Ciudad 2 - Jinno
   {469300, 964200},--Ciudad 1 - Shinsoo
   {360800, 877600},--Ciudad 2 - Shinsoo
   {55700, 157900},--Ciudad 1 - Chunjo
   {138500, 234900}--Ciudad 2 - Chunjo
   }
   pc.warp(tele[b][1], tele[b][2])
  end
end
end
Me Puedes Hacer Otra Que Te Lleve A 1 Solo Mapa? Porfavor Te Lo Agradeceria! :D
Enlace para comentar
Compartir en otros sitios

quest teleportar begin
	state start begin
		when letter begin
			send_letter("Teleportar")
		end
		when info or button begin
			local warp={"Ciudad 1 - Jinno", "Ciudad 2 - Jinno", "Ciudad 1 - Shinsoo", "Ciudad 2 - Shinsoo", "Ciudad 1 - Chunjo", "Ciudad 2 - Chunjo","otro mapa"}
			local warps= select2(warp)
			local tele={
			{969600, 278400},--Ciudad 1 - Jinno
			{873100, 242600},--Ciudad 2 - Jinno
			{469300, 964200},--Ciudad 1 - Shinsoo
			{360800, 877600},--Ciudad 2 - Shinsoo
			{55700, 157900},--Ciudad 1 - Chunjo
			{138500, 234900},--Ciudad 2 - Chunjo
			{otromX,otromY}
			}
			pc.warp(tele[warps][1], tele[warps][2])
		end
	end
end
asi tu puedes poner muchoas partes en la tabla, hasta tiene un boton para atras.

Pone esta funcion

en tu questlib y quest_function

la funcion:

function select3(...)
    arg.n = nil
    local tp,max = arg,5
    if type(tp[1]) == 'number' then
        max = tp[1]
        if type(tp[2]) == 'table' then
            tp = tp[2]
        else
            table.remove(tp,1)
        end
    elseif type(tp[1]) == 'table' then
        if type(tp[1][1]) == 'number' then
            max = tp[1][1]
            table.remove(tp[1],1)
            tp = tp[1]
        end
        tp = tp[1]
    end
    local str = '{'
    local tablen,act,incit = table.getn(tp),0,0
    table.foreach(tp,function(i,l)
        act = act + 1
        if act == 1 then
            str = str .. '{'..string.format('%q',l)
        elseif act == max+1 and tablen > act+incit then
            if tablen ~= act+incit+1 then
                str = str..'},{'..string.format('%q',l)
            else
                str=str..','..string.format('%q',l)
            end
            incit = incit + max
            act = 1
        else
            str=str..','..string.format('%q',l)
        end
    end)
    local px = loadstring('return '..str ..'}}')()
    local function copy_tab(t) local p= {} for i = 1,table.getn(t) do p[i] = t[i] end return p end
    local pe = {}
    for i = 1,table.getn(px) do pe [i] = copy_tab(px[i]) end
    local function init(i,ip)
        pe[i] = copy_tab(px[i])
        local next,back,exit = 0,0,0
        if i < table.getn(pe) and table.getn(pe) ~=1 then  table.insert(pe[i],table.getn(pe[i])+1,'Para alante Pagina '..(i+1)); next = table.getn(pe[i]) end
        if i > 1 then table.insert(pe[i],table.getn(pe[i])+1,'Para atraz pagina '..(i-1)); back = table.getn(pe[i]) end
        table.insert(pe[i],table.getn(pe[i])+1,'Cerrar'); exit = table.getn(pe[i])
        if table.getn(pe) > 1 then
            say('pagina '..i..' de '..table.getn(pe))
        end
        local e = select_table(pe[i])
        if e == next then return init(i+1,ip+max)
        elseif e == back then return init(i-1,ip-max)
        elseif e == exit then return -1
        else return e+ip,pe[i][e] end
    end
    return init(1,0) or -1
end
Enlace para comentar
Compartir en otros sitios

  • Dilong locked this tema
Guest
Este tema está cerrado a otras respuestas.
  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...