• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Bug Wand e Rod

kleitonalan

New Member
Joined
Mar 21, 2013
Messages
289
Reaction score
3
it does not attack the player keep running

wand.lua
Code:
w = {
[12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
[12033] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE},
[12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[12035] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
[12036] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
}

function onUseWeapon(cid, var)
min, max = 650, 850 -- dano minimo e maximo
target = getCreatureTarget(cid)
for stor, info in pairs(w) do
if getPlayerStorageValue(cid, stor) == 1 then
if target ~= 0 then
doSendDistanceShoot(getThingPos(cid), getThingPos(target), info.sh)
addEvent(doAreaCombatHealth, 100, cid, info.dmg, getThingPos(target), 0, -min, -max, info.ef)
end
end
end
return true
end
 
Last edited:
<!-- Donate Staff -->
<wand id="12811" level="20" mana="15" min="650" max="850" type="holy" event="script" value="wand.lua">
<vocation name="Druid"/>
<vocation id="6" showInDescription="0"/>
<vocation name="Sorcerer"/>
<vocation id="5" showInDescription="0"/>
</wand>

help
 
Last edited by a moderator:
Can you give more info? What exactly is the problem and what should be different?
Also post which server you use.
 
what about range in items.xml ?
Code:
    <item id="12811" article="a" name="donate staff">
        <attribute key="description" value="donate staff."/>
        <attribute key="weight" value="1900"/>
        <attribute key="weaponType" value="wand"/>
        <attribute key="shootType" value="holy"/>
        <attribute key="range" value="6"/>
    </item>
 
<item id="12811" article="an" name="Donate Staff">
<attribute key="weight" value="2300" />
<attribute key="magiclevelpoints" value="10" />
<attribute key="weaponType" value="wand" />
<attribute key="shootType" value="holy" />
<attribute key="range" value="7"/>
 
Back
Top