Witamy Na OTS Fans, Przeczytaj Regulamin lub Zarejestruj się.
I User
Autorem Jest Łabik
Oryginalny Temat
Autor: By Łabik
Opis: Przedmiot po osiągnięciu danego mlvl i użyciu go dodaje nam punkty HP, posiada on również exhausted i się nie kończy. Ilość dodawanego HP jest zmienna wraz z wzrostem lvl.
Testowane na: YurOTS 0.9.4f
W xxx\data\actions\scripts tworzymy nowy plik hp.lua i wklejamy do niego:
function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) lvl = getPlayerLevel(cid) local exhausted_seconds = 2 local exhausted_storagevalue = 1259 if mag >= 0 then if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then doPlayerSay(cid,"Ahhh.. HP.",16) doPlayerAddHealth(cid, (lvl * 2)* 0.98) setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) else doPlayerSendCancel(cid, "You are exhausted.") end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"Masz zbyt maly mlvl aby uzyc tego potiona .") end return 1 end
W xxx\data\actions\actions.xml dodajemy linijkę:
<action itemid="ID PRZEDMIOTU" script="hp.lua"/>
Offline