• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Dodatkowe hp

zabka229

New Member
Joined
Dec 30, 2009
Messages
147
Reaction score
0
Witam, mam teoretyczne pytanie.
Po użyciu danej mikstury postać dostaje 110% swojego życia, czyli dodatkowe 10%.
Chcę aby po upływie 10 minut efekt się usuwał. Wszystko mam zrobione, tylko problem jest w tym że nie wiem jak po tych 10 minutach powrócić do poprzedniego stanu hp.

Dajmy na to postać ma 10k hp. Po użyciu mikstury ma 11k hp, jak ma powrócić do stanu 10k hp(jakie tutaj zastosować działanie)?
 
Ja wszystko jadę na storage daj np ze jak koles nadusi na skrzynkę dostanie storage xxx i globalevent on co 10 min sprawdza sorage if sorage = xxx - 300hp ( tyle hp ile dostał) thxx :)
 
Właśnie o takie coś mi chodziło.
Kondycje odpadły bo po wylogowaniu się to usuwało, storage odpadło bo nie uwzględniało wbicia lvla.
 
A to też nie zadziała do końca jak lvl się wbije, jak ms dostanie po wbiciu następne 5hp to mu odejmie cośtam więcej później
musisz to jakoś jeszcze obejść
 
Po co to łączyć z bazą ? Sprawdź:
local storage1 = 112233
local t = 10
function onUse(cid, item, fromPosition, itemEx, toPosition)
local c = {
plus_mana = 200,
plus_health = 350
}
if getPlayerStorageValue(cid, storage1) == -1 then
pos = getPlayerPosition(cid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a 200MP, 350HP.")
setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid) + c.plus_health))
setCreatureMaxMana(cid, (getCreatureMaxMana(cid) + c.plus_mana))
doPlayerSetStorageValue(cid, storage1, 1)
doSendMagicEffect(pos,27)
addEvent(usun, t*60*1000)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The is empty.")
end

local function usun()
setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid) - c.plus_health))
setCreatureMaxMana(cid, (getCreatureMaxMana(cid) - c.plus_mana))
end
return true
end
 
Back
Top