Postado Outubro 31, 2018 6 anos Seguinte pessoal, eu tenho um script de uma arma que criei no meu ot, onde ela a cada hit troca o Dano (holy, Earth, fire,...) e tbm o ShootyType, porem eu so conseguir fazer isso com um script que já tinha de um "WAND" ou "STAFF", porem o dano é fixo entre (x) e (y), queria que se tivesse como, essa arma usasse o Dano e o ShootyType que esta, porem o atk seja por skill, ou seja qnt mais skill o char tem mais dano tira! no caso (DISTANCE) Items.xml Spoiler <item id="2410" article="a" name="Donate Knife" plural="Donate Knifes"> <attribute key="weight" value="10" /> <attribute key="attack" value="700" /> <attribute key="weaponType" value="distance" /> <attribute key="elementIce" value="150" /> <attribute key="shootType" value="arrow" /> <attribute key="range" value="7" /> </item> Weapons.xml Spoiler <distance id="2410" swing="true" level="7" event="script" value="donatearrow.lua"/> <!-- Donate Knife --> donatearrow.lua (script) Spoiler local min, max = 5000,10000 --Ataque mínino e ataque máximo local w = { [1] = {ef = 15, sh = 33, dmg = COMBAT_FIREDAMAGE}, [2] = {ef = 43, sh = 34, dmg = COMBAT_ICEDAMAGE}, [3] = {ef = 8, sh = 39, dmg = COMBAT_POISONDAMAGE}, [4] = {ef = 38, sh = 23, dmg = COMBAT_DEATHDAMAGE}, [5] = {ef = 47, sh = 32, dmg = COMBAT_ENERGYDAMAGE}, [6] = {ef = 9, sh = 21, dmg = COMBAT_PHYSICALDAMAGE}, [7] = {ef = 48, sh = 17, dmg = COMBAT_HOLYDAMAGE} } function onUseWeapon(cid, var) local effect = getPlayerStorageValue(cid, 4561) local target = getCreatureTarget(cid) if target ~= 0 then local wx = w[effect] or w[math.random(#w)] doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh) addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef) end return true end REP+ pra quem ajudar !!
Postado Outubro 31, 2018 6 anos 1 hora atrás, KillerWatts disse: Seguinte pessoal, eu tenho um script de uma arma que criei no meu ot, onde ela a cada hit troca o Dano (holy, Earth, fire,...) e tbm o ShootyType, porem eu so conseguir fazer isso com um script que já tinha de um "WAND" ou "STAFF", porem o dano é fixo entre (x) e (y), queria que se tivesse como, essa arma usasse o Dano e o ShootyType que esta, porem o atk seja por skill, ou seja qnt mais skill o char tem mais dano tira! no caso (DISTANCE) Items.xml Mostrar conteúdo oculto <item id="2410" article="a" name="Donate Knife" plural="Donate Knifes"> <attribute key="weight" value="10" /> <attribute key="attack" value="700" /> <attribute key="weaponType" value="distance" /> <attribute key="elementIce" value="150" /> <attribute key="shootType" value="arrow" /> <attribute key="range" value="7" /> </item> Weapons.xml Mostrar conteúdo oculto <distance id="2410" swing="true" level="7" event="script" value="donatearrow.lua"/> <!-- Donate Knife --> donatearrow.lua (script) Mostrar conteúdo oculto local min, max = 5000,10000 --Ataque mínino e ataque máximo local w = { [1] = {ef = 15, sh = 33, dmg = COMBAT_FIREDAMAGE}, [2] = {ef = 43, sh = 34, dmg = COMBAT_ICEDAMAGE}, [3] = {ef = 8, sh = 39, dmg = COMBAT_POISONDAMAGE}, [4] = {ef = 38, sh = 23, dmg = COMBAT_DEATHDAMAGE}, [5] = {ef = 47, sh = 32, dmg = COMBAT_ENERGYDAMAGE}, [6] = {ef = 9, sh = 21, dmg = COMBAT_PHYSICALDAMAGE}, [7] = {ef = 48, sh = 17, dmg = COMBAT_HOLYDAMAGE} } function onUseWeapon(cid, var) local effect = getPlayerStorageValue(cid, 4561) local target = getCreatureTarget(cid) if target ~= 0 then local wx = w[effect] or w[math.random(#w)] doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh) addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef) end return true end REP+ pra quem ajudar !! local dano = 5 --- Aqui é a % da skill, ou seja, ele irá causar 5% do Distance dele de dano local w = { [1] = {ef = 15, sh = 33, dmg = COMBAT_FIREDAMAGE}, [2] = {ef = 43, sh = 34, dmg = COMBAT_ICEDAMAGE}, [3] = {ef = 8, sh = 39, dmg = COMBAT_POISONDAMAGE}, [4] = {ef = 38, sh = 23, dmg = COMBAT_DEATHDAMAGE}, [5] = {ef = 47, sh = 32, dmg = COMBAT_ENERGYDAMAGE}, [6] = {ef = 9, sh = 21, dmg = COMBAT_PHYSICALDAMAGE}, [7] = {ef = 48, sh = 17, dmg = COMBAT_HOLYDAMAGE} } function onUseWeapon(cid, var) local skill = getPlayerSkill(cid, 4) local min, max = (dano * skill), (dano * skill/100) local effect = getPlayerStorageValue(cid, 4561) local target = getCreatureTarget(cid) if target ~= 0 then local wx = w[effect] or w[math.random(#w)] doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh) addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef) end return true end Editado Outubro 31, 2018 6 anos por Joaovettor (veja o histórico de edições)
Postado Outubro 31, 2018 6 anos Autor 2 horas atrás, Joaovettor disse: local dano = 5 --- Aqui é a % da skill, ou seja, ele irá causar 5% do Distance dele de dano local w = { [1] = {ef = 15, sh = 33, dmg = COMBAT_FIREDAMAGE}, [2] = {ef = 43, sh = 34, dmg = COMBAT_ICEDAMAGE}, [3] = {ef = 8, sh = 39, dmg = COMBAT_POISONDAMAGE}, [4] = {ef = 38, sh = 23, dmg = COMBAT_DEATHDAMAGE}, [5] = {ef = 47, sh = 32, dmg = COMBAT_ENERGYDAMAGE}, [6] = {ef = 9, sh = 21, dmg = COMBAT_PHYSICALDAMAGE}, [7] = {ef = 48, sh = 17, dmg = COMBAT_HOLYDAMAGE} } function onUseWeapon(cid, var) local skill = getPlayerSkill(cid, 4) local min, max = (dano * skill), (dano * skill/100) local effect = getPlayerStorageValue(cid, 4561) local target = getCreatureTarget(cid) if target ~= 0 then local wx = w[effect] or w[math.random(#w)] doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh) addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef) end return true end Entao cara aqui deu certo, esta atacando conforme a skill e o dano da arma... porem o efeito não ta mundando e tbm não muda o ataque de fire holy death... so fica atacando physical como uma flecha normal !!!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.