View Single Post
  #1  
Old 04-03-2013, 01:01 AM
Maze_EQ
Demi-God
 
Join Date: Mar 2012
Posts: 1,103
Default SQL to convert one item, to another item

if you wanted an easy way to make something like fabled the exact stats as the non fabled so you can do your own conversion ratio, this would be the best way I can think of.

You can also use this to mass create items with an ID/name and copy other items and do it quickly. Possibilities.

Code:
UPDATE
items a,
items b
SET
     a.minstatus = b.minstatus,
     a.aagi = b.aagi,
     a.ac = b.ac,
     a.accuracy = b.accuracy,
     a.acha = b.acha,
     a.adex = b.adex,
     a.aint = b.aint,
     a.artifactflag = b.artifactflag,
     a.asta = b.asta,
     a.astr = b.astr,
     a.attack = b.attack,
     a.augrestrict = b.augrestrict,
     a.augslot1type = b.augslot1type,
     a.augslot1visible = b.augslot1visible,
     a.augslot2type = b.augslot2type,
     a.augslot2visible = b.augslot2visible,
     a.augslot3type = b.augslot3type,
     a.augslot3visible = b.augslot3visible,
     a.augslot4type = b.augslot4type,
     a.augslot4visible = b.augslot4visible,
     a.augslot5type = b.augslot5type,
     a.augslot5visible = b.augslot5visible,
     a.augtype = b.augtype,
     a.avoidance = b.avoidance,
     a.awis = b.awis,
     a.bagsize = b.bagsize,
     a.bagslots = b.bagslots,
     a.bagtype = b.bagtype,
     a.bagwr = b.bagwr,
     a.banedmgamt = b.banedmgamt,
     a.banedmgraceamt = b.banedmgraceamt,
     a.banedmgbody = b.banedmgbody,
     a.banedmgrace = b.banedmgrace,
     a.bardtype = b.bardtype,
     a.bardvalue = b.bardvalue,
     a.book = b.book,
     a.casttime = b.casttime,
     a.casttime_ = b.casttime_,
     a.charmfile = b.charmfile,
     a.charmfileid = b.charmfileid,
     a.classes = b.classes,
     a.color = b.color,
     a.combateffects = b.combateffects,
     a.extradmgskill = b.extradmgskill,
     a.extradmgamt = b.extradmgamt,
     a.price = b.price,
     a.cr = b.cr,
     a.damage = b.damage,
     a.damageshield = b.damageshield,
     a.deity = b.deity,
     a.delay = b.delay,
     a.augdistiller = b.augdistiller,
     a.dotshielding = b.dotshielding,
     a.dr = b.dr,
     a.clicktype = b.clicktype,
     a.clicklevel2 = b.clicklevel2,
     a.elemdmgtype = b.elemdmgtype,
     a.endur = b.endur,
     a.factionamt1 = b.factionamt1,
     a.factionamt2 = b.factionamt2,
     a.factionamt3 = b.factionamt3,
     a.factionmod1 = b.factionmod1,
     a.factionmod2 = b.factionmod2,
     a.factionmod3 = b.factionmod3,
     a.factionmod4 = b.factionmod4,
     a.filename = b.filename,
     a.focuseffect = b.focuseffect,
     a.fr = b.fr,
     a.fvnodrop = b.fvnodrop,
     a.haste = b.haste,
     a.clicklevel = b.clicklevel,
     a.hp = b.hp,
     a.regen = b.regen,
     a.icon = b.icon,
     a.idfile = b.idfile,
     a.itemclass = b.itemclass,
     a.itemtype = b.itemtype,
     a.ldonprice = b.ldonprice,
     a.ldontheme = b.ldontheme,
     a.ldonsold = b.ldonsold,
     a.light = b.light,
     a.lore = b.lore,
     a.loregroup = b.loregroup,
     a.magic = b.magic,
     a.mana = b.mana,
     a.manaregen = b.manaregen,
     a.enduranceregen = b.enduranceregen,
     a.material = b.material,
     a.maxcharges = b.maxcharges,
     a.mr = b.mr,
     a.nodrop = b.nodrop,
     a.norent = b.norent,
     a.pendingloreflag = b.pendingloreflag,
     a.pr = b.pr,
     a.procrate = b.procrate,
     a.races = b.races,
     a.range = b.range,
     a.reclevel = b.reclevel,
     a.recskill = b.recskill,
     a.reqlevel = b.reqlevel,
     a.sellrate = b.sellrate,
     a.shielding = b.shielding,
     a.size = b.size,
     a.skillmodtype = b.skillmodtype,
     a.skillmodvalue = b.skillmodvalue,
     a.slots = b.slots,
     a.clickeffect = b.clickeffect,
     a.spellshield = b.spellshield,
     a.strikethrough = b.strikethrough,
     a.stunresist = b.stunresist,
     a.summonedflag = b.summonedflag,
     a.tradeskills = b.tradeskills,
     a.favor = b.favor,
     a.weight = b.weight,
     a.UNK012 = b.UNK012,
     a.UNK013 = b.UNK013,
     a.benefitflag = b.benefitflag,
     a.UNK054 = b.UNK054,
     a.UNK059 = b.UNK059,
     a.booktype = b.booktype,
     a.recastdelay = b.recastdelay,
     a.recasttype = b.recasttype,
     a.guildfavor = b.guildfavor,
     a.UNK123 = b.UNK123,
     a.UNK124 = b.UNK124,
     a.attuneable = b.attuneable,
     a.nopet = b.nopet,
     a.updated = b.updated,
     a.comment = b.comment,
     a.UNK127 = b.UNK127,
     a.pointtype = b.pointtype,
     a.potionbelt = b.potionbelt,
     a.potionbeltslots = b.potionbeltslots,
     a.stacksize = b.stacksize,
     a.notransfer = b.notransfer,
     a.stackable = b.stackable,
     a.UNK134 = b.UNK134,
     a.UNK137 = b.UNK137,
     a.proceffect = b.proceffect,
     a.proctype = b.proctype,
     a.proclevel2 = b.proclevel2,
     a.proclevel = b.proclevel,
     a.UNK142 = b.UNK142,
     a.worneffect = b.worneffect,
     a.worntype = b.worntype,
     a.wornlevel2 = b.wornlevel2,
     a.wornlevel = b.wornlevel,
     a.UNK147 = b.UNK147,
     a.focustype = b.focustype,
     a.focuslevel2 = b.focuslevel2,
     a.focuslevel = b.focuslevel,
     a.UNK152 = b.UNK152,
     a.scrolleffect = b.scrolleffect,
     a.scrolltype = b.scrolltype,
     a.scrolllevel2 = b.scrolllevel2,
     a.scrolllevel = b.scrolllevel,
     a.UNK157 = b.UNK157,
     a.serialized = b.serialized,
     a.verified = b.verified,
     a.serialization = b.serialization,
     a.source = b.source,
     a.UNK033 = b.UNK033,
     a.lorefile = b.lorefile,
     a.UNK014 = b.UNK014,
     a.svcorruption = b.svcorruption,
     a.UNK038 = b.UNK038,
     a.UNK060 = b.UNK060,
     a.augslot1unk2 = b.augslot1unk2,
     a.augslot2unk2 = b.augslot2unk2,
     a.augslot3unk2 = b.augslot3unk2,
     a.augslot4unk2 = b.augslot4unk2,
     a.augslot5unk2 = b.augslot5unk2,
     a.UNK120 = b.UNK120,
     a.UNK121 = b.UNK121,
     a.questitemflag = b.questitemflag,
     a.UNK132 = b.UNK132,
     a.clickunk5 = b.clickunk5,
     a.clickunk6 = b.clickunk6,
     a.clickunk7 = b.clickunk7,
     a.procunk1 = b.procunk1,
     a.procunk2 = b.procunk2,
     a.procunk3 = b.procunk3,
     a.procunk4 = b.procunk4,
     a.procunk6 = b.procunk6,
     a.procunk7 = b.procunk7,
     a.wornunk1 = b.wornunk1,
     a.wornunk3 = b.wornunk3,
     a.wornunk4 = b.wornunk4,
     a.wornunk5 = b.wornunk5,
     a.wornunk6 = b.wornunk6,
     a.wornunk7 = b.wornunk7,
     a.focusunk1 = b.focusunk1,
     a.focusunk2 = b.focusunk2,
     a.focusunk3 = b.focusunk3,
     a.focusunk4 = b.focusunk4,
     a.focusunk5 = b.focusunk5,
     a.focusunk6 = b.focusunk6,
     a.focusunk7 = b.focusunk7,
     a.scrollunk1 = b.scrollunk1,
     a.scrollunk2 = b.scrollunk2,
     a.scrollunk3 = b.scrollunk3,
     a.scrollunk4 = b.scrollunk4,
     a.scrollunk5 = b.scrollunk5,
     a.scrollunk6 = b.scrollunk6,
     a.scrollunk7 = b.scrollunk7,
     a.UNK193 = b.UNK193,
     a.purity = b.purity,
     a.evolvinglevel = b.evolvinglevel,
     a.clickname = b.clickname,
     a.procname = b.procname,
     a.wornname = b.wornname,
     a.focusname = b.focusname,
     a.scrollname = b.scrollname,
     a.dsmitigation = b.dsmitigation,
     a.heroic_str = b.heroic_str,
     a.heroic_int = b.heroic_int,
     a.heroic_wis = b.heroic_wis,
     a.heroic_agi = b.heroic_agi,
     a.heroic_dex = b.heroic_dex,
     a.heroic_sta = b.heroic_sta,
     a.heroic_cha = b.heroic_cha,
     a.heroic_pr = b.heroic_pr,
     a.heroic_dr = b.heroic_dr,
     a.heroic_fr = b.heroic_fr,
     a.heroic_cr = b.heroic_cr,
     a.heroic_mr = b.heroic_mr,
     a.heroic_svcorrup = b.heroic_svcorrup,
     a.healamt = b.healamt,
     a.spelldmg = b.spelldmg,
     a.clairvoyance = b.clairvoyance,
     a.backstabdmg = b.backstabdmg,
     a.created = b.created,
     a.elitematerial = b.elitematerial,
     a.ldonsellbackrate = b.ldonsellbackrate,
     a.scriptfileid = b.scriptfileid,
     a.expendablearrow = b.expendablearrow,
     a.powersourcecapacity = b.powersourcecapacity,
     a.bardeffect = b.bardeffect,
     a.bardeffecttype = b.bardeffecttype,
     a.bardlevel2 = b.bardlevel2,
     a.bardlevel = b.bardlevel,
     a.bardunk1 = b.bardunk1,
     a.bardunk2 = b.bardunk2,
     a.bardunk3 = b.bardunk3,
     a.bardunk4 = b.bardunk4,
     a.bardunk5 = b.bardunk5,
     a.bardname = b.bardname,
     a.bardunk7 = b.bardunk7,
     a.UNK214 = b.UNK214,
     a.UNK219 = b.UNK219,
     a.UNK220 = b.UNK220,
     a.UNK221 = b.UNK221,
     a.UNK223 = b.UNK223,
     a.UNK224 = b.UNK224,
     a.UNK225 = b.UNK225,
     a.UNK226 = b.UNK226,
     a.UNK227 = b.UNK227,
     a.UNK228 = b.UNK228,
     a.UNK229 = b.UNK229,
     a.UNK230 = b.UNK230,
     a.UNK231 = b.UNK231,
     a.UNK232 = b.UNK232,
     a.UNK233 = b.UNK233,
     a.UNK234 = b.UNK234,
     a.UNK235 = b.UNK235,
     a.UNK236 = b.UNK236,
     a.UNK237 = b.UNK237,
     a.UNK238 = b.UNK238,
     a.UNK239 = b.UNK239,
     a.UNK240 = b.UNK240,
     a.UNK242 = b.UNK242
WHERE
a.name like 'Fabled belt of growth'
AND
b.name like 'belt of growth'
__________________
"No, thanks, man. I don't want you fucking up my life, too."

Skype:
Comerian1
Reply With Quote