antiblock
https://i.imgur.com/aJ17bf7.gif
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
Lσяdρяiмє®

[Ajuda] Ajuda Na Quest

Question

quest caixalivros2 begin    state start begin        when 50131.use begin					say_title("Caixa do Livro de Habilidades")                    say("")                    say("Escolhe um tipo:")                    say("")                    say("")				local s = select("Corpo", "Mental", "Adagas", "Arco", "Armas", "Magia", "Dragao", "Cura", "Cancelar")				local classes = math.random(1,8)				local corpo = {{50401, 1}, {50402, 1}, {50403, 1}, {50404, 1},{50405, 1}}				local mental = {{50416, 1}, {50417, 1}, {50418, 1}, {50419, 1},{50420, 1}}				local adagas = {{50431, 1}, {50432, 1}, {50433, 1}, {50434, 1},{50435, 1}}				local arco = {{50446, 1}, {50447, 1}, {50448, 1}, {50449, 1},{50450, 1}}				local armas = {{50461, 1}, {50462, 1}, {50463, 1}, {50464, 1},{50465, 1},{50466, 1}}				local magia = {{50476, 1}, {50477, 1}, {50478, 1}, {50479, 1},{50480, 1},{50481, 1}}				local dragao = {{50491, 1}, {50492, 1}, {50493, 1}, {50494, 1},{50495, 1},{50496, 1}}				local cura = {{50506, 1}, {50507, 1}, {50508, 1}, {50509, 1},{50510, 1},{50511, 1}}					if 1==s then						if classes == 1 then							pc.give_item2(corpo[math.random(1,5)][1])							pc.remove_item(50132, 1)					elseif 2==s then						elseif classes == 2 then							pc.give_item2(mental[math.random(1,5)][1])							pc.remove_item(50132, 1)					elseif 3==s then						elseif classes == 3 then							pc.give_item2(adagas[math.random(1,5)][1])							pc.remove_item(50132, 1)					elseif 4==s then						elseif classes == 4 then							pc.give_item2(arco[math.random(1,5)][1])							pc.remove_item(50132, 1)					elseif 5==s then						elseif classes == 5 then							pc.give_item2(armas[math.random(1,6)][1])													pc.remove_item(50132, 1)					elseif 6==s then						elseif classes == 6 then							pc.give_item2(magia[math.random(1,6)][1])							pc.remove_item(50132, 1)					elseif 7==s then						elseif classes == 7 then							pc.give_item2(dragao[math.random(1,6)][1])							pc.remove_item(50132, 1)					elseif 8==s then						elseif classes == 8 then							pc.give_item2(cura[math.random(1,6)][1])							pc.remove_item(50132, 1)					elseif 9==s then						say("")						say("Nao te preocupes, podes na mesma")						say("abrir a caixa outravez!")						say("")						wait()				end			end		end	endend

 

 

Alguem me sabe dizer o erro nesta quest que fiz?

 

 

 

Cumprimentos

 

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

Estou a tentar criar uma quest que ao escolher um tipo de habilidade me dê um manual random desse tipo de habilidade.

Não sei se está bem feita, tentei fazê-la com os conhecimentos que adquiri. 

Share this post


Link to post
Share on other sites
antiblock
Elveron
  • 0
local array = {	[1] = {livro1,livro2,livro3,...},	[2] = {livro1,livro2,livro3,...},	[3] = {livro1,livro2,livro3,...},	[4] = {livro1,livro2,livro3,...},	[5] = {livro1,livro2,livro3,...},	[6] = {livro1,livro2,livro3,...},	[7] = {livro1,livro2,livro3,...},	[8] = {livro1,livro2,livro3,...}}if s != 9 then pc.give_item2(array[s][math.random(1,6)]) pc.remove_item(50132, 1) end
[] -> opções{} -> ids livros

Share this post


Link to post
Share on other sites
  • 0

Assim?

 

quest caixalivros2 begin    state start begin        when 50131.use begin					say_title("Caixa do Livro de Habilidades")                    say("")                    say("Escolhe um tipo:")                    say("")                    say("")				local s = select("Corpo", "Mental", "Adagas", "Arco", "Armas", "Magia", "Dragao", "Cura", "Cancelar")				local array = {					[1] = {50401,50402,50403,50404,50405},					[2] = {50416,50416,50416,50416,50416},					[3] = {50431,50431,50431,50431,50431},					[4] = {50446,50446,50446,50446,50446},					[5] = {50461,50461,50461,50461,50461,50461},					[6] = {50476,50477,50478,50479,50480,50481},					[7] = {50491,50492,50493,50494,50495,50496},					[8] = {50506,50507,50508,50509,50510,50511},}				if s != 9 then pc.give_item2(array[s][math.random(1,6)]) pc.remove_item(50131, 1)					elseif 9==s then						say("")						say("Nao te preocupes, podes na mesma")						say("abrir a caixa outravez!")						say("")						wait()			end		end	endend

 

Share this post


Link to post
Share on other sites
  • 0

Estar

elseif 9==s

 

 

Ou  

elseif s==9

é igual?..

 

Share this post


Link to post
Share on other sites
  • 0

Estar

elseif 9==s

Ou  

elseif s==9

é igual?..

Não correto é elseif s == 9

Share this post


Link to post
Share on other sites
  • 0

Não correto é elseif s == 9

É igual...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this