Zwik - 2008-07-11 21:47:34

Odrazu mówie że skrypt nie mój


W data/actions/scripts tworzymy plik "manarune.lua" i wklejamy to:


Kod:

Kod:

-- Mana rune by GM Gregor --

function onUse(cid, item, frompos, item2, topos)
addmanapos = topos
addmanapos.stackpos = 253
playeraddmana = getThingfromPos(addmanapos)


if getPlayerMagLevel(cid) >= 4 then
if playeraddmana.itemid > 0 then
random_number = math.random(100000)
doSendMagicEffect(topos,12)
doPlayerAddMana(playeraddmana.uid,random_number)
doPlayerSay(cid,"Nowa porcja many!",16)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doSendMagicEffect(frompos,2)
return 0
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"Masz za maly mlvl... ")
end
return 1
end

Potem w data/actions w plika "actions.xml" wklejamy taki skrypt:

Kod:

 
Kod:

<action itemid="2270" script="manarune.lua" />

www.grascooby.pun.pl www.gwardiasqd.pun.pl www.importtuning.pun.pl www.kibicebukowna.pun.pl www.forumgrajacychinaczej.pun.pl