renssis Posted October 29, 2019 Report Share 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 Link to comment Share on other sites More sharing options...
1 caanmasu Posted October 30, 2019 Report Share 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. renssis 1 Quote Link to comment Share on other sites More sharing options...
1 caanmasu Posted November 2, 2019 Report Share 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 renssis 1 Quote Link to comment Share on other sites More sharing options...
0 renssis Posted October 30, 2019 Author Report Share Posted October 30, 2019 bump Quote Link to comment Share on other sites More sharing options...
0 renssis Posted October 31, 2019 Author Report Share 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 Link to comment Share on other sites More sharing options...
0 renssis Posted November 1, 2019 Author Report Share Posted November 1, 2019 bump Quote Link to comment Share on other sites More sharing options...
0 renssis Posted November 3, 2019 Author Report Share 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 caanmasu 1 Quote Link to comment Share on other sites More sharing options...
Question
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?
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.