#1 2008-11-25 21:27:55

Xovadis

http://i37.tinypic.com/zmmamp.gif

Zarejestrowany: 2008-04-13
Posty: 34
Nick: GoD BlooD
Profesja: 81.15.214.65
Server: GoD Wienc Boss xD

Star Wand atakujacy pare celi naraz

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)


Jesli PoMogleM Daj Mi +
Jesli Nie Pomoglem Lub Obrazilem daj mi -

Offline

 

#2 2008-11-25 22:58:04

Snazol

http://i37.tinypic.com/okc0lk.gif

4862382
Skąd: Gdzies w Polsce ;)
Zarejestrowany: 2008-11-25
Posty: 4
Nick: Zdzislaw Pogromca Prostytutek
Profesja: Xenida (bedzie za 8 lat)
Server: 220 i 2/10
WWW

Re: Star Wand atakujacy pare celi naraz

No niby zrobiles ladnie wszystko, ale nie wyszczegulniles KODu, screena "niby" dales, a go nie ma Szalu ni ma ;(

Offline

 

#3 2008-11-25 22:58:15

Dynasty

http://i38.tinypic.com/f386kw.gif

1799624
Zarejestrowany: 2008-06-24
Posty: 211

Re: Star Wand atakujacy pare celi naraz

witac ze nowy , skrypty opisujemy,lub dajemy screena , piszemy skrypt w spoiler

Offline

 

#4 2008-11-26 12:05:35

Kapi1233

http://i37.tinypic.com/330fo7t.gif

2660937
Skąd: Ten pomysł??
Zarejestrowany: 2008-02-15
Posty: 685

Re: Star Wand atakujacy pare celi naraz

to tak
1. Używaj

Kod:

code

2. Skopiowane??
3. Fajny skrypt


Więcej wrogów niż przyjaciół znaczy ze odniosłem sukces
Chociaż w życiu dopinguje mnie nadal nie jeden kumpel

http://www.img.pl/LxR.png

Offline

 

#5 2008-11-26 13:05:20

Sphinxar

http://i37.tinypic.com/okc0lk.gif

Skąd: Piotrków Tryb.
Zarejestrowany: 2008-11-16
Posty: 8
Nick: Sphinxar
Profesja: Candia
Server: 9

Re: Star Wand atakujacy pare celi naraz

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)


http://ots.dlagraczy.pl/signature/Sphinxar.jpg

Offline

 

#6 2008-11-26 21:41:05

Xovadis

http://i37.tinypic.com/zmmamp.gif

Zarejestrowany: 2008-04-13
Posty: 34
Nick: GoD BlooD
Profesja: 81.15.214.65
Server: GoD Wienc Boss xD

Re: Star Wand atakujacy pare celi naraz

no ok xD bende robił kod i spoiler xD


Jesli PoMogleM Daj Mi +
Jesli Nie Pomoglem Lub Obrazilem daj mi -

Offline

 

#7 2008-11-28 11:31:13

Bamboleo

http://i46.tinypic.com/fwixqw.jpg

status 485915
11183814
Call me!
Skąd: Wroclove
Zarejestrowany: 2008-07-13
Posty: 1494
Nick: Dom Spokojnej
Profesja: Starosci
Server: W Kurwidołku
WWW

Re: Star Wand atakujacy pare celi naraz

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

 

#8 2008-12-06 20:49:04

Matt

Zbanowany

Za Duży Spam
Call me!
Skąd: Sie Wziełeś
Zarejestrowany: 2008-12-06
Posty: 27
WWW

Re: Star Wand atakujacy pare celi naraz

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)


wbijac gratz.pun.pl forum nowe ale jak sie zarejestrujcie sie to sie powiekszy ;]

Offline

 

#9 2008-12-06 21:04:58

Dane323

http://i36.tinypic.com/qs3v5t.gif

Zarejestrowany: 2008-10-09
Posty: 868

Re: Star Wand atakujacy pare celi naraz

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

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi

[ Generated in 0.024 seconds, 7 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
Direkt zum Angebot