tyros13 - 2010-02-19 14:19:51

Niektóre OTS Jak ściągniemy nie mają wiele skryptów tu daję 1 z nich na Soft BoOts

W ots/data/actions/scripts tworzymy plik Soft.lua
Kod:

Spoiler:

function onUse(cid, item, frompos, item2, topos)
local exhausted_seconds = Ile ma trwać exatushed? Piszemy to np. 0,7 -- How many seconds manarune will be unavailible to use. --
local exhausted_storagevalue = 1259 -- Storage Value to store exhaust. It MUST be unused! --
mag = getPlayerMagLevel(cid)
if mag >= 0 then
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(topos,1)
doPlayerSay(cid,"Co ma pisać po kliknięciu na soft?,16)
doPlayerAddMana(cid,"Wpisujemy tu ile many ma dać?")
doPlayerAddHealth(cid,Ile health ma dać?)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
if item.type > 1 then
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"Wpisujemy tekst exatusheda.")
end
end
return 1
end

W Actions.xml wpisujemy to :
Kod:

Spoiler:

<action itemid="2640" script="Soft.lua" />