renssis 5 Report post Posted October 29, 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? Quote Share this post Link to post Share on other sites
1 caanmasu 397 Report post Posted October 30, 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. 1 renssis reacted to this Quote Share this post Link to post Share on other sites
1 caanmasu 397 Report post Posted November 2, 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 1 renssis reacted to this Quote Share this post Link to post Share on other sites
0 renssis 5 Report post Posted October 30, 2019 bump Quote Share this post Link to post Share on other sites
0 renssis 5 Report post Posted October 31, 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 Quote Share this post Link to post Share on other sites
0 renssis 5 Report post Posted November 1, 2019 bump Quote Share this post Link to post Share on other sites
0 renssis 5 Report post Posted November 3, 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 1 caanmasu reacted to this Quote Share this post Link to post Share on other sites
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?
Share this post
Link to post
Share on other sites