• 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 Thorns from Diablo2, can somebody check the code?

alk cod

New Member
Joined
Jul 19, 2016
Messages
29
Reaction score
2
Code:
local x = getCreatureHealth(cid)
local y = getPlayerStorageValue(uid, 8514)
local z = -(1/100)x

function onCastSpell(cid, var)
setPlayerStorageValue(uid, y, x)
if doCreatureAddHealth(cid, z)
setPlayerStorageValue(uid, y, x)
doAreaCombatHealth(cid, type, pos, AREA_CIRCLE2X2 , (1/2)x+z, x+z, CONST_ME_ENERGYAREA)
end
setPlayerStorageValue(uid, y, 0)
end

I know that i cant do luas and xmls but I try

Its script to return injury to somebody who attacks player.

1. The first is to set storage that saves how many player have health
2. Next checks if somebody attacks player.
3. Next - new storage saves health
4. Last - if somebody attacked player - id does damage to area.
 
Back
Top