[AYUDA]Quest De Kill de Jefe

Topic created · 5 Mensajes · 681 Visitas
  • Bueno amigos de UJ e creado la siguiente quest

    quest drop_quest begin
    state start begin
    when 3090.kill
    local suerte = math.random(1,2)
    local drop = {30205,30210,30220,41003,41004,41117}
    elseif suerte == 1 then
    game.drop_item(drop[1],1)
    elseif suerte == 2 then
    game.drop_item(drop[2],2)
    elseif suerte == 3 then
    game.drop_item(drop[3],1)
    elseif suerte == 4 then
    game.drop_item(drop[4],2)
    elseif suerte == 5 then
    game.drop_item(drop[5],2)
    elseif suerte == 6 then
    game.drop_item(drop[6],1)
    end
    end
    end
    end
    end
    end
    end
    end
    

    Y bueno cuando la intento instalar me da el siguiente error

    dedi-fr-21367# ./qc 3090.quest
    QUEST : drop_quest
    STATE : start
    WHEN : 3090.kill
    when doesn't have begin-end clause. (local)
    3090.quest:4:Abort (core dumped)

    Alguien me podria ayudar porfabor que me dia en que me equiboque :S

  • Para empezar, se inicia con if no elseif, y para cada elseif no se pone un end, solo se pone para los if.

    Si no sabes hacer quest, no las hagas, porque esto es una gilipoyez. Como vas a tirar 1 de 7 items, si solo estas poniendo un numero del 1 al 2?

    Aqui tienes la quest arreglada y mejorada.
    quest drop_quest begin

    que drop begin
    state start begin
    when 3090.kill begin
    
    local drop = {30205,30210,30220,41003,41004,41117}
    game.drop_item(drop[number(1,table.getn(drop)],1)
    
    end
    end
    end
  • Gracias pepineitor si me sirve te dejo tu +1


    Man mira lo que me da :s

    dedi-fr-21367# ./qc 3090.quest
    QUEST : drop
    STATE : start
    WHEN  : 3090.kill
    local drop = { 30205 , 30210 , 30220 , 41003 , 41004 , 41117 }
    game . drop_item ( drop [ number ( 1 , table . getn ( drop ) ] , 1 )
    
    syntax error : [string "start"]:2: `)' expected near `]'
    3090.quest:8:Abort (core dumped)
  • Faltaba un parentesis entre drop)], las prisas.

    quest drop begin
    state start begin
    when 3090.kill begin
    
    local drop = {30205,30210,30220,41003,41004,41117}
    game.drop_item(drop[number(1,table.getn(drop))],1)
    
    end
    end
    end
  • Gracias man y alo solucione :))