Jump to content

Recommended Posts

Posted

Hola chicos, hace tiempo vi está función que marca el nivel del monstruo ya sea para comparar el nivel con el nuestro o para lo que sea, pero la putada es tener que hacer cada vnum de monstruo y nivel manualmente así que me invente un pequeño script php que sirve bastante:

<html> <body> <?php $link = mysql_connect("IP_DE_TU_SERVIDOR", "USUARIO_SERVIDOR(NORMALMENTE ROOT)", "CONTRASEÑA_BASE_DE_DATOS"); mysql_select_db("player", $link); $result = mysql_query("SELECT vnum, level FROM mob_proto  WHERE type = '0' or type= '2' ORDER BY vnum, level DESC", $link); echo "<table border = '0'> n"; echo "<tr><td>get_mob_level =</td><td></td><td></td></tr> n"; echo "<tr><td>{</td><td></td><td></td></tr> n"; while ($row = mysql_fetch_row($result)){        echo "<tr><td>[$row[0]]<td>=<td>$row[1],</td></tr> n"; } echo "<tr><td>}</td><td></td><td></td></tr> n"; echo "</table> n"; ?> </body> </html> 

Donde pone mysql_connect debéis rellenarlo con lo que os pide y teneis que subirlo a un hosting y entrar a la dirección donde lo habéis subido, una vez ahí copiar todo (cntrl+a) y pegarlo en el questlib.lua

 

Por ejemplo yo lo uso para esto:

quest mob begin	state start begin		when kill with not npc.is_pc()  pc.get_level() - get_mob_level[npc.get_race()] < 10 begin			pc.give_item2(10,1)		end	endend

Así solo os daría el objeto si no superáis en 10 niveles el nivel del mob.

 

Se que no es mucho pero a alguien le servirá, un saludo ^^

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.