Copy an item to another table.
Example my quest copy take item to other table..
Code
- 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
Code
- 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
Suggestion?