Jump to content

Recommended Posts

Posted

Hola, estaba aburrido, entonces decidí hacer una quest para este nuevo cofre de los oficiales que se consiguen en los nuevos Jefes.

Está todo = al oficial lo único que puede que no esté exactamente = son los niveles de los items (+0, +1, +2, +3, etc) pero eso lo modificáis a vuestro gusto.

 

http://pastebin.com/aiQpmQ3d 

 

Saludos.

Posted

Ya te lo he visto hacer en otras quests, que sentido tiene hacer esto:

local experiencia = {{50000},{100000},{200000},{300000},{400000},{500000}}

Pudiendo hacer esto:

local experiencia = {50000,100000,200000,300000,400000,500000}

Y llamarlo asi:

 pc.give_exp2(experiencia[math.random(1,6)])

En vez de meterle

 pc.give_exp2(experiencia[math.random(1,6)][1])
Posted

con 

table.getn(experiencia)

te da tambien lo maximo q esta escrito en la tabla,por ejemplo

local experiencia = {50000,100000,200000,300000,400000,500000}print(experiencia[math.random(1,table.getn(experiencia))])

es lo mismo q esto

local experiencia = {{50000},{100000},{200000},{300000},{400000},{500000}} print(experiencia[math.random(1,table.getn(experiencia))][1])

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

This site uses cookies to enhance your browsing experience and provide relevant content. By continuing to browse, you agree to our We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. and Terms of Use. For more information on how we protect your data, please check our Privacy Policy.