Oskar
Forum friend
- Dołączył
- Styczeń 24, 2009
- Posty
- 2256
- Liczba reakcji
- 331
Post?pujemy wed?ug tego tematu:
Wklepujemy w data/spells/scripts nowy plik o nazwie nazwa.lua i wklejamy:
Do spells.xml wklejamy:
Nie chcia?o mi si? optymalizowa? skryptu xd
Nie masz wystarczających uprawnień, aby zobaczyć link.
Zaloguj or Rejestracja
Wklepujemy w data/spells/scripts nowy plik o nazwie nazwa.lua i wklejamy:
PHP:
local config = {
storage = 1234, --storage zapisujace
dlugosc = 4, --w sekundach
--nie ruszac
k = {'?MIER?',COLOR_BLACK,'OGIE?',COLOR_ORANGE,'L?D',COLOR_TEAL,'ZIEMIA',COLOR_LIGHTGREEN,'?WIAT?O',COLOR_DARKYELLOW,'ENERGIA',COLOR_DARKPURPLE,'FIZYCZNE',COLOR_GREY,'LIFEDRAIN',COLOR_DARKRED},
odpornosci = {ABSORB_DEATH,50,ABSORB_FIRE,25,ABSORB_ICE,20,ABSORB_EARTH,65,ABSORB_HOLY,90,ABSORB_ENERGY,10,ABSORB_PHYSICAL,25,ABSORB_LIFEDRAIN,90},
shoots = {CONST_ANI_SUDDENDEATH,CONST_ANI_FIRE,CONST_ANI_ICE,CONST_ANI_EARTH,CONST_ANI_HOLY,CONST_ANI_ENERGYBALL,CONST_ANI_LARGEROCK,CONST_ANI_EXPLOSION},
eff = {CONST_ME_MORTAREA,COMBAT_DEATHDAMAGE,CONST_ME_FIREAREA,COMBAT_FIREDAMAGE,CONST_ME_ICEATTACK,COMBAT_ICEDAMAGE,CONST_ME_CARNIPHILA,COMBAT_EARTHDAMAGE,CONST_ME_HOLYDAMAGE,COMBAT_HOLYDAMAGE,CONST_ME_ENERGYAREA,COMBAT_ENERGYDAMAGE,CONST_ME_GROUNDSHAKER,COMBAT_PHYSICALDAMAGE,CONST_ME_RED_SHIMMER,COMBAT_LIFEDRAIN}
}
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, config.storage) >= os.time() then
return false
end
local v = math.random(#config.shoots)
doSendAnimatedText(getThingPos(cid), config.k[v*2-1], config.k[v*2])
absorbObject(cid, config.odpornosci[v*2-1], config.dlugosc, config.odpornosci[v*2])
doPlayerSetStorageValue(cid, config.storage, os.time() + config.dlugosc)
return shoot(cid, v) and false
end
function shoot(cid, v)
if getPlayerStorageValue(cid, config.storage) >= os.time() then
local pos = getThingPos(cid)
local h = getSpectators(pos, 1, 1)
if h ~= nil then
for _, t in ipairs(h) do
if isCreature(t) then
doTargetCombatHealth(cid, t, config.eff[v*2], 0, -config.odpornosci[v*2] * math.random(4), config.eff[v*2-1])
end
end
end
doSendDistanceShoot({x=pos.x-1,y=pos.y,z=pos.z}, {x=pos.x-1,y=pos.y+1,z=pos.z}, config.shoots[v])
doSendDistanceShoot({x=pos.x-1,y=pos.y+1,z=pos.z}, {x=pos.x,y=pos.y+1,z=pos.z}, config.shoots[v])
doSendDistanceShoot({x=pos.x,y=pos.y+1,z=pos.z}, {x=pos.x+1,y=pos.y+1,z=pos.z}, config.shoots[v])
doSendDistanceShoot({x=pos.x+1,y=pos.y+1,z=pos.z}, {x=pos.x+1,y=pos.y,z=pos.z}, config.shoots[v])
doSendDistanceShoot({x=pos.x+1,y=pos.y,z=pos.z}, {x=pos.x+1,y=pos.y-1,z=pos.z}, config.shoots[v])
doSendDistanceShoot({x=pos.x+1,y=pos.y-1,z=pos.z}, {x=pos.x,y=pos.y-1,z=pos.z}, config.shoots[v])
doSendDistanceShoot({x=pos.x,y=pos.y-1,z=pos.z}, {x=pos.x-1,y=pos.y-1,z=pos.z}, config.shoots[v])
doSendDistanceShoot({x=pos.x-1,y=pos.y-1,z=pos.z}, {x=pos.x-1,y=pos.y,z=pos.z}, config.shoots[v])
return addEvent(shoot, 150, cid, v)
end
return true
end
PHP:
<instant name="Magic Barrer" words="magic barrer" lvl="20" mana="100" selftarget="1" event="script" value="test.lua"/>
Nie masz wystarczających uprawnień, aby zobaczyć link.
Zaloguj or Rejestracja
Nie chcia?o mi si? optymalizowa? skryptu xd