Jump to content

[RLS]Borrar items desde el inventario.


Shang

Mensajes recomendados

buenas tardes, segui todos los pasos que pusiste shang y me pasa esto xD

 

 

 

Debes iniciar sesión para ver el contenido del enlace en esta publicación.
 1f42fd32881820908e5a07d59ac23686

 

 

 

selecciono el item al cuadrito del bote de basura para borrarlo pero no me deja borrarlo , le doy a si y no pasa nada 

y aveces debo estar tratando y tratando para que salga el mensaje de quieres borrar tal item? no aparece ala primera , pero ya luego que aparece va normal

 

En el uiinventory.py cambia esto:

self.drag.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.0))

Por:

self.drag.SetColor(grp.GenerateColor(1.0, 0.0, 0.0, 0.2))

Verás un cuadrito de 32x32 píxeles de color rojo, debes cambiar la posición hasta que cuadre con el icono de la basura. Debes cambiarlo desde aquí:

self.drag.SetPosition(13+50,538)

(x, y)

 

Luego vuelves a poner el color como antes y a disfrutar  ^^

Enlace para comentar
Compartir en otros sitios

En el uiinventory.py cambia esto:

self.drag.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.0))

Por:

self.drag.SetColor(grp.GenerateColor(1.0, 0.0, 0.0, 0.2))

Verás un cuadrito de 32x32 píxeles de color rojo, debes cambiar la posición hasta que cuadre con el icono de la basura. Debes cambiarlo desde aquí:

self.drag.SetPosition(13+50,538)

(x, y)

 

Luego vuelves a poner el color como antes y a disfrutar  ^^

ohh! muchas gracias , ahora mismo lo pruebo xd ya que acabo de entrar al pc , gracias

 

ya hice esto que me dijiste y si aparece el cuadrito rojo y ya esta en su posición pero aun no me deja borrar los items

aqui en la foto se ve que pasa

 

Debes iniciar sesión para ver el contenido del enlace en esta publicación.

 

tambien acabo de notar que tarda en funcionar aun que este el cuadrito rojo encima del icono de la basura, debe pasar un buen rato

para que funcione .

 

Note algo mas xd el cuadrito rojo al abrir el inventario aparece en un lado y luego de mover el inventario me aparece en el icono de la basura  a que se debera eso? xd

 

Debes iniciar sesión para ver el contenido del enlace en esta publicación.

Enlace para comentar
Compartir en otros sitios

Fixx:

		self.drag = ui.Bar()
		self.drag.SetParent(self)
		self.drag.SetPosition(8,555)
		self.drag.SetColor(grp.GenerateColor(1.0, 0.0, 0.0, 0.2))
		self.drag.SetSize(32,32)
		self.drag.OnMouseLeftButtonUp = lambda: self.Add_Item()
		self.drag.Show()

first the parent then the position my frend

funciono ya aparece bien el icono rojo en el icono de la basura , pero sigue el fallo de al aceptar borrar el item no pasa nada

Enlace para comentar
Compartir en otros sitios

Syserr?

aparece eso 

 

 

0728 14:46:25695 ::   File "ui.py", line 1029, in CallEvent
 
0728 14:46:25696 ::   File "uiInventory.py", line 375, in <lambda>
 
0728 14:46:25698 ::   File "uiInventory.py", line 508, in Borrar_Item
 
0728 14:46:25698 :: NameError
0728 14:46:25698 :: : 
0728 14:46:25698 :: global name 'event' is not defined
0728 14:46:25698 :: 
 
0728 14:46:26231 :: Traceback (most recent call last):
 
0728 14:46:26231 ::   File "ui.py", line 1029, in CallEvent
 
0728 14:46:26232 ::   File "uiInventory.py", line 375, in <lambda>
 
0728 14:46:26233 ::   File "uiInventory.py", line 508, in Borrar_Item
 
0728 14:46:26234 :: NameError
0728 14:46:26234 :: : 
0728 14:46:26234 :: global name 'event' is not defined
0728 14:46:26234 :: 

Enlace para comentar
Compartir en otros sitios

 

aparece eso 

 

 

0728 14:46:25695 ::   File "ui.py", line 1029, in CallEvent
 
0728 14:46:25696 ::   File "uiInventory.py", line 375, in <lambda>
 
0728 14:46:25698 ::   File "uiInventory.py", line 508, in Borrar_Item
 
0728 14:46:25698 :: NameError
0728 14:46:25698 :: : 
0728 14:46:25698 :: global name 'event' is not defined
0728 14:46:25698 :: 
 
0728 14:46:26231 :: Traceback (most recent call last):
 
0728 14:46:26231 ::   File "ui.py", line 1029, in CallEvent
 
0728 14:46:26232 ::   File "uiInventory.py", line 375, in <lambda>
 
0728 14:46:26233 ::   File "uiInventory.py", line 508, in Borrar_Item
 
0728 14:46:26234 :: NameError
0728 14:46:26234 :: : 
0728 14:46:26234 :: global name 'event' is not defined
0728 14:46:26234 :: 

 

agrega import event a los import :v

Enlace para comentar
Compartir en otros sitios

Donde pusiste el import event? Debes ponerlo en el uiinventory.py.

me sale esto en el syserr del servidor

 

 

 

SYSERR: Jul 29 04:52:32.328576 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)
SYSERR: Jul 29 04:52:32.328618 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter
SYSERR: Jul 29 04:52:35.970904 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)
SYSERR: Jul 29 04:52:35.970941 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter
SYSERR: Jul 29 04:57:21.229698 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)
SYSERR: Jul 29 04:57:21.229744 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter
SYSERR: Jul 29 04:57:32.808596 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)
SYSERR: Jul 29 04:57:32.808652 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter
SYSERR: Jul 29 04:57:35.608675 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)
SYSERR: Jul 29 04:57:35.608703 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter
SYSERR: Jul 29 04:58:56.21538 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)
SYSERR: Jul 29 04:58:56.21593 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter
SYSERR: Jul 29 05:01:10.131575 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)
SYSERR: Jul 29 05:01:10.131629 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter

Enlace para comentar
Compartir en otros sitios

me sale esto en el syserr del servidor

 

 

 

SYSERR: Jul 29 04:52:32.328576 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)

SYSERR: Jul 29 04:52:32.328618 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter

SYSERR: Jul 29 04:52:35.970904 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)

SYSERR: Jul 29 04:52:35.970941 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter

SYSERR: Jul 29 04:57:21.229698 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)

SYSERR: Jul 29 04:57:21.229744 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter

SYSERR: Jul 29 04:57:32.808596 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)

SYSERR: Jul 29 04:57:32.808652 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter

SYSERR: Jul 29 04:57:35.608675 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)

SYSERR: Jul 29 04:57:35.608703 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter

SYSERR: Jul 29 04:58:56.21538 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)

SYSERR: Jul 29 04:58:56.21593 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter

SYSERR: Jul 29 05:01:10.131575 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to call field `get_attr' (a nil value)

SYSERR: Jul 29 05:01:10.131629 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start enter

 

 

Te falta la función item.get_attr().

 

Pratico y muy, muy util, ya no hace falta el viejo... Una pregunta. ¿Borra cualquier item sin importar el valor?

Lo borra todo.

Enlace para comentar
Compartir en otros sitios

Se posteó en el foro por Dragonslayer.

sera esta?

Debes iniciar sesión para ver el contenido del enlace en esta publicación.

 

ya la puse  y me sale ahora esto en el syserr  es algo diferente a lo que me salia antes

 

 

 

 

SYSERR: Jul 31 00:56:18.995646 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to index a number value
SYSERR: Jul 31 00:56:18.995739 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start click
SYSERR: Jul 31 00:56:27.681501 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to index a number value
SYSERR: Jul 31 00:56:27.681550 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start click
SYSERR: Jul 31 00:56:32.672991 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to index a number value
SYSERR: Jul 31 00:56:32.673049 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start click
SYSERR: Jul 31 00:56:55.61512 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to index a number value
SYSERR: Jul 31 00:56:55.61612 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start click
SYSERR: Jul 31 00:56:59.859574 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/borrar_items:3: attempt to index a number value
SYSERR: Jul 31 00:56:59.859627 :: WriteRunningStateToSyserr: LUA_ERROR: quest borrar_items.start click

Enlace para comentar
Compartir en otros sitios

Que hay en el archivo borrar_items en la carpeta ../object/state en la línea 3?

 

 

borrar_items={["start"]=0,Borrar= function (slot,vnum)item . select_cell ( slot ) 
local item_vnum , item_count , item_id = item . get_vnum ( ) , item . get_count ( ) , item . get_id ( ) 
(LINEA3) mysql_query ( "INSERT INTO log.log_delete (account_id, name, id_item, vnum, count, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2) VALUES(" .. pc . get_account_id ( ) .. ", '" .. pc . get_name ( ) .. "', " .. item_id .. ", " .. item_vnum .. ", " .. item_count .. ", " .. item . get_attr ( 0 ) [ 1 ] .. ", " .. item . get_attr ( 0 ) [ 2 ] .. ", " .. item . get_attr ( 1 ) [ 1 ] .. ", " .. item . get_attr ( 1 ) [ 2 ] .. ", " .. item . get_attr ( 2 ) [ 1 ] .. ", " .. item . get_attr ( 2 ) [ 2 ] .. ", " .. item . get_attr ( 3 ) [ 1 ] .. ", " .. item . get_attr ( 3 ) [ 2 ] .. ", " .. item . get_attr ( 4 ) [ 1 ] .. ", " .. item . get_attr ( 4 ) [ 2 ] .. ", " .. item . get_attr ( 5 ) [ 1 ] .. ", " .. item . get_attr ( 5 ) [ 2 ] .. ", " .. item . get_attr ( 6 ) [ 1 ] .. ", " .. item . get_attr ( 6 ) [ 2 ] .. ", " .. item . get_socket ( 0 ) .. ", " .. item . get_socket ( 1 ) .. ", " .. item . get_socket ( 2 ) .. ");" ) 
if is_test_server ( ) then 
syschat ( "---- Debug ----" ) 
syschat ( "Vnum: " .. tostring ( vnum ) ) 
syschat ( "Slot: " .. tostring ( slot ) ) 
syschat ( "ID: " .. tostring ( item . get_id ( ) ) ) 
syschat ( "---- End_Debug ----" ) 
end 
item . remove_stack ( ) 
end }
 

Enlace para comentar
Compartir en otros sitios

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...