New Insert Queries.txt 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. INSERT INTO `eq2_test`.`npcs` (`id`, `name`, `min_level`, `max_level`, `enc_level`, `race`, `race_type`, `class_`, `gender`, `hair_type_id`,
  2. `facial_hair_type_id`, `wing_type_id`, `chest_type_id`, `legs_type_id`, `soga_hair_type_id`, `soga_facial_hair_type_id`, `show_name`, `attackable`,
  3. `show_level`, `targetable`, `show_command_icon`, `display_hand_icon`, visual_state, action_state, mood_state, initial_state, activity_status, collision_radius, command_primary, size)
  4. select `id`, `name`, `level`, `level`, `difficulty`, `race`, `race_type`, `class_`, `gender`, `hair_type_id`, `facial_hair_type_id`, `wing_type_id`,
  5. `chest_type_id`, `legs_type_id`, `soga_hair_type_id`, `soga_facial_hair_type_id`, (vis_flags & 16) >0 as 'show_name', attackable_status = 0 as 'attackable',
  6. (vis_flags & 64 || vis_flags & 32) >0 as 'show_level', (vis_flags & 4) >0 as 'targetable', (vis_flags & 2) >0 as 'show_command_icon', hand_flag,
  7. visual_state, action_state, mood_state, pos_state, activity_status, pos_collision_radius, 0, pos_size
  8. from `eq2_rawdata`.`raw_spawn_info`;
  9. insert into `eq2_test`.`npc_appearance`
  10. select
  11. `id`,
  12. `spawn_id` as npc_id,
  13. `signed_value`,
  14. `type`,
  15. `red`,
  16. `green`,
  17. `blue`
  18. from `eq2_rawdata`.`raw_spawn_appearance`;
  19. insert into `eq2_test`.`npc_appearance_equip`
  20. select
  21. `id`,
  22. `spawn_id` as npc_id,
  23. `slot_id`,
  24. `equip_type`,
  25. `red`,
  26. `green`,
  27. `blue`,
  28. `highlight_red`,
  29. `highlight_green`,
  30. `highlight_blue`
  31. from `eq2_rawdata`.`raw_spawn_appearance_equip`;
  32. insert into eq2_test.spawngroup select id, 'Tutorial Island Good Spawns' from eq2_rawdata.raw_spawns where eq2_rawdata.raw_spawns.spawn_packet_type = 'Normal';
  33. insert into eq2_test.spawnentry (npcid, spawngroupid, spawnpercentage) select eq2_test.npcs.id, eq2_rawdata.raw_spawns.id, 100 from eq2_test.npcs, eq2_rawdata.raw_spawn_info, eq2_rawdata.raw_spawns where eq2_test.npcs.id = eq2_rawdata.raw_spawn_info.id and eq2_rawdata.raw_spawn_info.id = eq2_rawdata.raw_spawns.spawn_id and eq2_rawdata.raw_spawns.spawn_packet_type = 'Normal';
  34. insert into eq2_test.spawns (spawngroup_id, zone_id, x, y, z, heading, respawn, location_id) select eq2_rawdata.raw_spawns.id, 9999, eq2_rawdata.raw_spawns.x,
  35. eq2_rawdata.raw_spawns.y, eq2_rawdata.raw_spawns.z, eq2_rawdata.raw_spawns.heading, 3600, eq2_rawdata.raw_spawns.grid_id
  36. from eq2_rawdata.raw_spawn_info, eq2_rawdata.raw_spawns
  37. where eq2_rawdata.raw_spawn_info.id = eq2_rawdata.raw_spawns.spawn_id and eq2_rawdata.raw_spawns.spawn_packet_type = 'Normal';
  38. update eq2_test.spawns, eq2_test.zones, eq2_rawdata.raw_spawns, eq2_rawdata.raw_zones set eq2_test.spawns.zone_id=eq2_test.zones.id
  39. where eq2_test.spawns.zone_id= 9999 and eq2_rawdata.raw_spawns.id = eq2_test.spawns.spawngroup_id and eq2_rawdata.raw_zones.id = eq2_rawdata.raw_spawns.zone_id and eq2_rawdata.raw_zones.zone_file = eq2_test.zones.file;
  40. update eq2_test.npcs, eq2_rawdata.raw_spawn_info, eq2_test.entity_commands set eq2_test.npcs.command_primary = eq2_test.entity_commands.command_list_id
  41. where eq2_rawdata.raw_spawn_info.default_command = eq2_test.entity_commands.command_text and eq2_test.npcs.id = eq2_rawdata.raw_spawn_info.id;