renssis Publicado 29 de Octubre del 2019 Reportar Compartir Publicado 29 de Octubre del 2019 Copie un elemento a otra tabla. Ejemplo: mi copia de búsqueda lleva el elemento a otra tabla when 9005.take begin ----"111111222222333333444444555555666666777777888888999999000000" say_title("bla bla bla") say("") local store=select("Save item", "Exit") if store==2 then return end mysql_direct_query("select * from player.save_item;") mysql_direct_query("INSERT INTO `save_item` (`id`, `owner_id`, `window`, `pos`, `count`, `vnum`, `socket0`, `socket1`, `socket2`, `socket3`, `socket4`, `socket5`, `attrtype0`, `attrvalue0`, `attrtype1`, `attrvalue1`, `attrtype2`, `attrvalue2`, `attrtype3`, `attrvalue3`, `attrtype4`, `attrvalue4`, `attrtype5`, `attrvalue5`, `attrtype6`, `attrvalue6`) VALUES ('"..pc.get_player_id().."');") item.remove() setskin(NOWINDO) end quest 2 when 9005.take with item.get_id() begin code = item_attr.set_value() codu = item.get_vnum() ----"111111222222333333444444555555666666777777888888999999000000" say_title("bla bla bla") say("") local store=select("Save item", "Exit") if store==2 then return end local code, codu = mysql_direct_query("INSERT INTO save_item_copy1 (id, owner_id, window, pos, count, vnum, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6) SELECT id, owner_id, window, pos, count, vnum, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6 FROM save_item WHERE id LIMIT 1) item.remove() setskin(NOWINDO) end ¿Tienes alguna sugerencia? Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
1 caanmasu Publicado 30 de Octubre del 2019 Reportar Compartir Publicado 30 de Octubre del 2019 Try: INSERT INTO save_item_copy1 SELECT * FROM player.save_item WHERE id = id_item; mysql_direct_query("INSERT INTO save_item_copy1 SELECT * FROM player.save_item WHERE id = "..item.get_id()..";") Source: Debes iniciar sesión para ver el contenido del enlace en esta publicación. renssis reacciono a esto 1 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
1 caanmasu Publicado 2 de Noviembre del 2019 Reportar Compartir Publicado 2 de Noviembre del 2019 En 30/10/2019 a las 21:14, renssis dijo: Not work =/ when 9005.take begin ----"111111222222333333444444555555666666777777888888999999000000" say_title("bla bla bla") say("") local store=select("Save item", "Exit") if store==2 then return end mysql_direct_query("INSERT INTO save_item_copy1 SELECT * FROM player.save_item WHERE id = "..item.get_id()..";") item.remove() setskin(NOWINDO) end Source: Debes iniciar sesión para ver el contenido del enlace en esta publicación. Remove "setskin(NOWINDO)" Those avoid say, select, etc. Also, is "NOWINDOW" "setskin(NOWINDOW)" is equals to "setskin(0)" Try make the only query and check if works renssis reacciono a esto 1 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
0 renssis Publicado 30 de Octubre del 2019 Author Reportar Compartir Publicado 30 de Octubre del 2019 bump Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
0 renssis Publicado 31 de Octubre del 2019 Author Reportar Compartir Publicado 31 de Octubre del 2019 hace 22 horas, caanmasu dijo: Try: INSERT INTO save_item_copy1 SELECT * FROM player.save_item WHERE id = id_item; mysql_direct_query("INSERT INTO save_item_copy1 SELECT * FROM player.save_item WHERE id = "..item.get_id()..";") Source: Debes iniciar sesión para ver el contenido del enlace en esta publicación. Not work =/ when 9005.take begin ----"111111222222333333444444555555666666777777888888999999000000" say_title("bla bla bla") say("") local store=select("Save item", "Exit") if store==2 then return end mysql_direct_query("INSERT INTO save_item_copy1 SELECT * FROM player.save_item WHERE id = "..item.get_id()..";") item.remove() setskin(NOWINDO) end Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
0 renssis Publicado 1 de Noviembre del 2019 Author Reportar Compartir Publicado 1 de Noviembre del 2019 bump Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
0 renssis Publicado 3 de Noviembre del 2019 Author Reportar Compartir Publicado 3 de Noviembre del 2019 thanks Camilo when 9005.take begin ----"111111222222333333444444555555666666777777888888999999000000" say_title("bla bla bla2") say("") local store=select("Save item", "Exit") if store==2 then return end mysql_direct_query("INSERT INTO save_item SELECT * FROM player.item WHERE id = "..item.get_id()..";") item.remove() end caanmasu reacciono a esto 1 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Pregunta
renssis
Copie un elemento a otra tabla.
Ejemplo: mi copia de búsqueda lleva el elemento a otra tabla
when 9005.take begin ----"111111222222333333444444555555666666777777888888999999000000" say_title("bla bla bla") say("") local store=select("Save item", "Exit") if store==2 then return end mysql_direct_query("select * from player.save_item;") mysql_direct_query("INSERT INTO `save_item` (`id`, `owner_id`, `window`, `pos`, `count`, `vnum`, `socket0`, `socket1`, `socket2`, `socket3`, `socket4`, `socket5`, `attrtype0`, `attrvalue0`, `attrtype1`, `attrvalue1`, `attrtype2`, `attrvalue2`, `attrtype3`, `attrvalue3`, `attrtype4`, `attrvalue4`, `attrtype5`, `attrvalue5`, `attrtype6`, `attrvalue6`) VALUES ('"..pc.get_player_id().."');") item.remove() setskin(NOWINDO) end
quest 2
when 9005.take with item.get_id() begin code = item_attr.set_value() codu = item.get_vnum() ----"111111222222333333444444555555666666777777888888999999000000" say_title("bla bla bla") say("") local store=select("Save item", "Exit") if store==2 then return end local code, codu = mysql_direct_query("INSERT INTO save_item_copy1 (id, owner_id, window, pos, count, vnum, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6) SELECT id, owner_id, window, pos, count, vnum, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6 FROM save_item WHERE id LIMIT 1) item.remove() setskin(NOWINDO) end
¿Tienes alguna sugerencia?
Enlace para comentar
Compartir en otros sitios
6 respuestas a esta pregunta
Mensajes recomendados
Unirse a la conversación
Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.