
Nie tylko o Tibii i OTS...

Daje Wam Star Wanda Daje on Wiele ciosów na raz .... xD Jeżeli Taki post był to sry...
W pliku nizej masz linijki:
local manaNeededPerTarget = 20 - tyle many bierze jak trafia w jeden cel (trafi w 3 cele to wezmie 60 many)
local hitExtraTargets = 3 - ile celi maksymalnie moze trafic
local hitExtraTargetsInRange = 2 - w jakim zasiegu od celu 'glownego' ma szukac innych celi
Kiedy gracz wali w potwora to tylko inne potwory sa atakowane (skull nie zlapie).
Kiedy gracz wali w czlowieka to inni gracze i potwory sa atakowane (jak wali w kogos z skullem to moze walnac w kogos bez skull i zalapac skulla, raczej nie dla low level bron do ataku ludzi).
Sila ataku zalezy od mlvl i level.
Screen:
Ten obrazek został pomniejszony. Kliknij, aby zobaczyć go w pełnych rozmiarach. Oryginalne zdjęcie ma wymiary 1129x477.
kod:
W data/weapons/weapons.xml dodaj:
Kod PHP:
<distance id="7735" script="starshoter.lua">
<vocation name="Druid"/><vocation name="Elder Druid"/>
<vocation name="Sorcerer"/><vocation name="Master Sorcerer"/>
</distance>
W data/items/items.xml znajdz item 7735 i ustaw:
Kod PHP:
<item id="7735" article="the" name="star wand">
<attribute key="description" value="This holy wand radiates huge ammount of light."/>
<attribute key="weight" value="20"/>
<attribute key="attack" value="1"/>
<attribute key="hitChance" value="100"/>
<attribute key="weaponType" value="distance"/>
<attribute key="range" value="7"/>
</item>
W data/weapons/scripts/ stworz plik starshoter.lua i wklej:
Kod PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 0)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 0)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.2, -25, -0.2, -3)
local manaNeededPerTarget = 20
local hitExtraTargets = 3
local hitExtraTargetsInRange = 2
function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers)
local creaturesList = {}
for x = -radiusx, radiusx do
for y = -radiusy, radiusy do
if not (x == 0 and y == 0) then
if getTilePzInfo({x = position.x+x, y = position.y+y, z = position.z}) ~= TRUE then
creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = STACKPOS_TOP_CREATURE})
if (creature.type == 1 and showPlayers == 1) or (creature.type == 2 and showMonsters == 1) then
table.insert(creaturesList, creature.uid)
end
end
end
end
end
return creaturesList
end
function onUseWeapon(cid, var)
local ret = doCombat(cid, combat, var)
if(ret == LUA_ERROR) then
return LUA_ERROR
end
doCreatureAddMana(cid, -manaNeededPerTarget)
local target = variantToNumber(var)
local hitplayers = 0
if(target ~= 0) then
if(isPlayer(target) == TRUE) then
hitplayers = 1
end
local nowHit = 0
local randomId = 0
local otherTargets = getCreaturesInRange(getCreaturePosition(target), hitExtraTargetsInRange, hitExtraTargetsInRange, 1, hitplayers)
if(#otherTargets > 0) then
for i = 1, hitExtraTargets do
if(getCreatureMana(cid) > manaNeededPerTarget) then
randomId = math.random(1, #otherTargets)
nowHit = otherTargets[randomId]
if(isCreature(nowHit) == TRUE) then
table.remove(otherTargets, randomId)
ret = doCombat(cid, combat, numberToVariant(nowHit))
if(ret ~= LUA_ERROR) then
doCreatureAddMana(cid, -manaNeededPerTarget)
end
end
if(#otherTargets == 0) then
break
end
else
break
end
end
end
end
return TRUE
end
Ostatnio edytowany przez Xovadis (2008-11-26 21:42:18)
Offline
No niby zrobiles ladnie wszystko, ale nie wyszczegulniles KODu, screena "niby" dales, a go nie ma Szalu ni ma ;(
Offline

fajny skrypt na pewno się przyda i jak już koledzy up napisali używaj spoilera
Ostatnio edytowany przez Sphinxar (2008-11-26 13:06:01)
Offline

no ok xD bende robił kod i spoiler xD
Offline
Plagiat ;]
http://otland.net/f82/weapon-multitarge … ter-13967/
Heh przyznam fantazje masz ;] - za pisanie że skrypt jest twój ; )
Nie bende tylko będę,
Offline
Zbanowany
Slyszales o czymś takim jak spoiler
po 2 taki post byl i go skopiowales
a po trzecie
Jesli PoMogleM Daj Mi +
Jesli Nie Pomoglem Lub Obrazilem daj mi -
polecial - bo nie pomogles
sry za refresh nie popatrzylem na date
P.S jak ktos mi powie ze refresh to niech mi powie po co sa tematy
Ostatnio edytowany przez Matt (2008-12-06 20:50:53)
Offline

No skrypt mi sie podoba i nie bede juz pisal ze nie twoje/spojler itd. bo "ale juz bylo.."
9/10
Offline