OTS Fans

Witamy Na OTS Fans, Przeczytaj Regulamin lub Zarejestruj się.

  • Nie jesteś zalogowany.
  • Polecamy: Komputery

#1 2011-04-17 06:42:45

Xelemeleque

I User

Zarejestrowany: 2011-04-14
Posty: 17
Punktów :   

Przedmiot dający HP

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:

Kod:

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ę:

Kod:

<action itemid="ID PRZEDMIOTU" script="hp.lua"/>

Offline

 

Stopka forum

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

[ Generated in 0.009 seconds, 8 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.zrom.pun.pl www.k800icentrum.pun.pl www.h2osok.pun.pl www.agh1rokis.pun.pl www.ricoe.pun.pl