Lurk
Active Member
- Joined
- Dec 4, 2017
- Messages
- 336
- Reaction score
- 49
Hi, I have a bow in my server that deals damage via script, the thing is I don't know how to make this bow do extra damage with skills AND up the player distance skill (since it's a wand). This is the script I'm using (this is the wand one but the bow is exactly the same)
the way it is right now it does extra damage with resets and level, but it would be nice to also have a skill scalling and for it to also increase the users skill with every attack, just like a normal bow/sword
the way it is right now it does extra damage with resets and level, but it would be nice to also have a skill scalling and for it to also increase the users skill with every attack, just like a normal bow/sword
LUA:
w3333 = {
[1] = {ef = 51, sh = 41, dmg = COMBAT_HOLYDAMAGE},
[2] = {ef = 51, sh = 41, dmg = COMBAT_HOLYDAMAGE} -- antes era 41 (bolo)
}
function onUseWeapon(cid, var)
local extra = 0
local extra2 = 0
local haha = 0
local target = getCreatureTarget(cid)
if getPlayerStorageValue(cid, 378378) > 0 then -- dano extra com reset
extra = (getPlayerStorageValue(cid, 378378)*23000)
else
extra = 0
end
if getPlayerLevel(cid) > 50000 then
extra2 = getPlayerLevel(cid)*2
else
extra2 = 1100
end
haha = extra+extra2
min, max = 229000+haha, 299000+haha
target = getCreatureTarget(cid)
if target ~= 0 then
wx3333 = w3333[math.random(1, #w3333)]
doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx3333.sh)
addEvent(doAreaCombatHealth, 100, cid, wx3333.dmg, getThingPos(target), 0, -min, -max, wx3333.ef)
end
return true
end