- Dołączył
- Luty 2, 2015
- Posty
- 132
- Liczba reakcji
- 2
Pomocy!! potrzebuje skypt na bonus hp ktory daje 15% hp,a po uzyciu zmienia sie na pusta butelke
Follow along with the video below to see how to install our site as a web app on your home screen.
Notka: This feature may not be available in some browsers.

\
a jeszcze jedno pytanko mozna tak zrobic zeby znikalo hp co dodalismy tym itemem za 10 min i zeby ext byl uzycia 15 minlocal config = {
removeOnUse = "no",
vial = 7636,
splash = "no",
hppercent = 15
}
config.removeOnUse = getBooleanFromString(config.removeOnUse)
function onUse(cid, item, fromPosition, itemEx, toPosition)
local health = getCreatureMaxHealth(cid)
if(not isPlayer(itemEx.uid) or (cid ~= itemEx.uid)) then
if(config.splash) then
return true
end
if(toPosition.x == CONTAINER_POSITION) then
toPosition = getThingPosition(item.uid)
end
doDecayItem(doCreateItem(POOL, config.splash, toPosition))
doRemoveItem(item.uid, 1)
if(not config.vial or config.removeOnUse) then
return true
end
if(fromPosition.x ~= CONTAINER_POSITION) then
doCreateItem(config.vial, fromPosition)
else
doPlayerAddItem(cid, config.vial, 1)
end
return true
end
if(not setCreatureMaxHealth(cid, health-((health*(config.hppercent/100))))) then
return false
end
for i, tid in ipairs(getSpectators(getThingPosition(itemEx.uid), 1, 1)) do
if(isPlayer(tid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Odje?o 15% hp!")
end
end
doRemoveItem(item.uid, 1)
if(not config.vial or config.removeOnUse) then
return true
end
if(fromPosition.x ~= CONTAINER_POSITION) then
doCreateItem(config.vial, fromPosition)
else
doPlayerAddItem(cid, config.vial, 1)
end
return true
end
Masz tutaj kod na to, ?e gdy klikniesz na przedmiot odejmie Ci 15 % hp.

[LUA]local config = {Dzieki\
---------- Tre?? dodana o 15:12 ----------
Dziekia jeszcze jedno pytanko mozna tak zrobic zeby znikalo hp co dodalismy tym itemem za 10 min i zeby ext byl uzycia 15 min
tylko zeby jeszcze napisal gorny post ^
nCreatureAppear(cid) end
nCreatureDisappear(cid) end
nCreatureSay(cid, type, msg) end
nThink() end