• 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 Magic Attack

Yakushi

New Member
Joined
Dec 30, 2008
Messages
110
Reaction score
0
Location
Germany
Hello..
I have a question:

Can somebody make me a script, that when I attack with a normal weapon.. for example a bow and an arrow. That then comes CRITICAL and a Magic Attack attacks him with my normal Attack?
Well.. It's difficult to describe. Just look on the Server :

unreallegend.no-ip.org..
There it names: Soulpower.

And you become other Soulpowers by making quests or you can buy them.

Can somebody make me that or something similar??
Please!!

Thanks in advanced and gives rep+++++++++!! :D

Thx!

Yakushi
 
Hello..
I have a question:

Can somebody make me a script, that when I attack with a normal weapon.. for example a bow and an arrow. That then comes CRITICAL and a Magic Attack attacks him with my normal Attack?
Well.. It's difficult to describe. Just look on the Server :

unreallegend.no-ip.org..
There it names: Soulpower.

And you become other Soulpowers by making quests or you can buy them.

Can somebody make me that or something similar??
Please!!

Thanks in advanced and gives rep+++++++++!! :D

Thx!

Yakushi
~RefresH~
 
data/weapons/scripts/scriptname.lua

LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) 
setCombatFormula(combat2, COMBAT_FORMULA_SKILL , 0, -0, 0, -115)

local arr = {
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 1, 3, 1, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
}

local area = createCombatArea(arr)
setCombatArea(combat2, area)

function onUseWeapon(cid, var)
    doCombat(cid, combat2, var)
    return doCombat(cid, combat, var)
end

data/weapons/weapons.xml
PHP:
<melee id="ID_OF_WEAPON" level="50" unproperly="1" enabled="1" function="internalLoadWeapon" script="scriptname.lua"/>
 
Back
Top