Jump to content

Recommended Posts

Posted

con estas funciones se puede leer lo q el jugador utilisa...por ejemplo, si qieres saver qual escdo el jugador utiliza pos lo escribes en la quest asi

say(pc.shield())

te da el vnum del escudo q usas actualmente, si no usas nada el vnum es 0y una funcion mas q ise, 'slen' esta funcion te lee el tamaño de un string o una tabla, so el attribute no es un string o tabla te retira false por ejemplo...

slen('Noa')-->> 3 por que  N = 1 o = 2 a = 3

lo mismo con tablas

slen({1,2,3,4,5,6})-->> 6 por q 1,2,3,4,5,6  6 values en la tabla, no funciona con nombres en el index  por  ejemplo asi ['Noa']=1 asi no lee el tamaño de las tablas

pos a q las funcionesInformacion: El item utilizado se selectiona, asi se puede usar varias funciones mas...function_list 

pc.armor	pc.helmet 	pc.shoes 	pc.bracelet pc.weapon 	pc.necklace pc.earrings pc.shield 	pc.slot1 	pc.slot2 	slen

Questlib.lua

pc = pc or {}pc.armor	= function() item.select_cell(90) return item.get_cell()==90 and item.vnum or 0 end-- armadurapc.helmet 	= function() item.select_cell(91) return item.get_cell()==91 and item.vnum or 0 end-- cascopc.shoes 	= function() item.select_cell(92) return item.get_cell()==92 and item.vnum or 0 end-- zapatospc.bracelet = function() item.select_cell(93) return item.get_cell()==93 and item.vnum or 0 end-- pulserapc.weapon 	= function() item.select_cell(94) return item.get_cell()==94 and item.vnum or 0 end-- armapc.necklace = function() item.select_cell(95) return item.get_cell()==95 and item.vnum or 0 end-- collarpc.earrings = function() item.select_cell(96) return item.get_cell()==96 and item.vnum or 0 end-- aretepc.shield 	= function() item.select_cell(100)return item.get_cell()==100 and item.vnum or 0 end-- escudopc.slot1 	= function() item.select_cell(97) return item.get_cell()==97 and item.vnum or 0 end-- slot1 abajo de la armapc.slot2 	= function() item.select_cell(98) return item.get_cell()==98 and item.vnum or 0 end-- slot2 abajo de la pulsera--pc.outfit_body = function() item.select_cell(109) return item.get_cell()==109 and item.vnum or 0 end-- kostum-armadura--pc.outfit_head = function() item.select_cell(110) return item.get_cell()==110 and item.vnum or 0 end-- kostum-cascofunction slen(typ)	return ((type(typ)=='string' and string.len(typ)) or (type(typ)=='table' and table.getn(typ))) or falseend
  • 9 months later...

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.