kubxx - 2008-06-09 20:53:51

skrypt na stopniową manarunke

Zrób w data/actions/scripts plik o nazwie: level manarune.lua i wklej w nim taki skrypt:

Spoiler:

-- Level Manarune by kubxx
function onUse(cid, item, frompos, item2, topos)
local level = getPlayerLevel(cid)
local playerpos = getPlayerPosition(cid)

    if (level >= 1) and (level <= 49) then
        doPlayerAddMana(cid, 100)
        doPlayerSay(cid,"Mniam ...",1)
        doSendMagicEffect(playerpos, 12)
        doRemoveItem(item.uid,1)
    end

    if (level >= 50) and (level <= 79) then
        doPlayerAddMana(cid, 150)
        doPlayerSay(cid,"Mniam ...",1)
        doSendMagicEffect(playerpos, 12)
        doRemoveItem(item.uid,1)
i    end

    if (level >= 80) and (level <= 129) then
        doPlayerAddMana(cid, 200)
        doPlayerSay(cid,"Mniam ...",1)
        doSendMagicEffect(playerpos, 12)
        doRemoveItem(item.uid,1)
    end

    if level >= 130 then
        doPlayerAddMana(cid, 250
        doPlayerSay(cid,"Mniam ...",1)
        doSendMagicEffect(playerpos, 12)
        doRemoveItem(item.uid,1)
    end
end

na czerwono to wartości jakie bedzie dodawać manarunka

Następnie w data/actions/actions.xml wklej:

Spoiler:

<action itemid="2281" script="level manarune.lua" />

Oczywiście id itemu można zmienić w polu zaznaczonym na żółto.

skrypt na manarunke tylko dla knighta

1. Robimy w data/actions/scripts plik knight manarune.lua i wklejamy w nim:

Spoiler:

-- Knight Manarune by kubxx
function onUse(cid, item, frompos, item2, topos)

local playerpos = getPlayerPosition(cid)
local vocation = getPlayerVocation(cid)
local manaadd = math.random(100,250)


    if (vocation == 4) or (vocation == 8) then
        doPlayerAddMana(cid, manaadd)
        doPlayerSay(cid,"Mniam...",1)
        doRemoveItem(item.uid, 1)
        doSendMagicEffect(playerpos, 12)
    else
        doPlayerSendTextMessage(cid,19,"You are not knight or elite knight.")
    end
end

na czerwono wartosci jakie dodaje manarunka można se zmienić

. Wchodzimy w plik data/actions/actions.xml i wklejamy w nim:

Spoiler:

<action itemid="2281" script="knight manarune.lua" />

id itemka mozna se zmienić

-

Ziele - 2008-06-10 08:52:36

hmm...moim zdaniem takie troche przydatne chociaz mi sie napewno nie przyda :D

Ocena:
Jak twoja to: 8/10
Jak nie twoja to: 7/10 :D

pOdzr

kubxx - 2008-06-10 11:00:24

UP@
moje

Ziele - 2008-06-10 13:25:57

W takim razie to 8/10 dla Ciebie ;]
i licze na wiecej takich rzeczy od Ciebie :P

Pozdrawiam !!

maltnor - 2008-06-10 17:07:21

Czy mógłbyś zrobić manarune od lvl , ale taką żeby tylko master sorcerer i elder druid mogli jej używac ? Będę bardzo wdzięczny!

Seeker - 2008-06-10 22:23:02

ta manarunka na kazdym evo jest ale ale sie nie bede czepial bo nikt jej nie dodal na forum wiec jest good 5/10

kubxx - 2008-06-10 22:40:24

UP2
dodam jeszcze dziś jak zdążę

-- sorc and druid Manarune by kubxx
function onUse(cid, item, frompos, item2, topos)

local playerpos = getPlayerPosition(cid)
f (vocation == 5) or (vocation == 6) then
        doPlayerAddMana(cid, manaadd)
        doPlayerSay(cid,"Mniam...",1)
        doRemoveItem(item.uid, 1)
        doSendMagicEffect(playerpos, 12)
    else

if (level >= 1) and (level <= 49) then
        doPlayerAddMana(cid, 1500)
        doPlayerSay(cid,"Mniam ...",1)
        doSendMagicEffect(playerpos, 12)
        doRemoveItem(item.uid,1)
    end

    if (level >= 50) and (level <= 79) then
        doPlayerAddMana(cid, 5000)
        doPlayerSay(cid,"Mniam ...",1)
        doSendMagicEffect(playerpos, 12)
        doRemoveItem(item.uid,1)
i    end

    if (level >= 80) and (level <= 129) then
        doPlayerAddMana(cid, 10000)
        doPlayerSay(cid,"Mniam ...",1)
        doSendMagicEffect(playerpos, 12)
        doRemoveItem(item.uid,1)
    end

    if level >= 130 then
        doPlayerAddMana(cid, 15000
        doPlayerSay(cid,"Mniam ...",1)
        doSendMagicEffect(playerpos, 12)
        doRemoveItem(item.uid,1)
    end
end


nie daje pewności ze działa

Ziele - 2008-06-11 14:36:46

@up
uzywaj opcji "code" :P albo "spoiler"

ee...kubxx dam ci rade. jak robisz jakas rzecz to sprawdz czy dziala potem daj na forum. bo potem pisza posty typu "help nie dziala mi..co mam zrobic" wiec nastepnym razem postaraj sie bardziej ;P

~Per4x' - 2008-06-11 16:14:16

kubxx z tego co pamietam to taka runka juz byla tutaj :)

maltnor - 2008-06-12 15:32:38

Właśnie tu jest problem , manarune dla MS i ED od lvl nie działa. w konsoli serwa wyskakuje zawsze jeden błąd " unexpected "xx" near "xx" . Mógłbyś przerobić ją tak aby działała ? Jak coś mam silnik b-fox 6.8

www.mago1w.pun.pl www.narutototalgame.pun.pl www.hajtownia.pun.pl www.dirt-bike.pun.pl www.kingdragons.pun.pl