Jump to content

Nuevas funciones para Quests


Croqueta

Mensajes recomendados

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
Enlace para comentar
Compartir en otros sitios

  • 9 months later...

Unirse a la conversación

Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.

Guest
Responder a este tema...

×   Has pegado contenido con formato .   Eliminar formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incorporado automáticamente.   Mostrar un enlace en su lugar

×   Se ha restaurado el contenido anterior. .   Borrar editor

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

  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...