What's new

Skrypty & Kody Przerobic skrypt

Zapalniczka

Active User
Joined
Feb 2, 2015
Messages
132
Reaction score
2
Siemanko mam maly problem :( Ktos przerobi ten skrypt jak daje revert to zeby zostawalo nam hp i mane ktora dostalismy
local config = {storage = 3234, hp = 70000, mana= 70000, level = 800}

function onUse(cid, item, fromPosition, itemEx, toPosition)
local health = getCreatureMaxHealth(cid)
local mana = getCreatureMaxMana(cid)
if (getPlayerLevel(cid) >= config.level) then
if getPlayerStorageValue(cid, config.storage) == -1 then
setCreatureMaxHealth(cid, health+(config.hp))
setCreatureMaxMana(cid, mana+(config.mana))
doPlayerSetStorageValue(cid, config.storage, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wykonales juz ten quest.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Nie posiadasz wymaganego poziomu (" .. config.level .. ").")
end
return true
end

---------- Tre?? dodana o 23:02 ----------

ref!

---------- Tre?? dodana o 14:35 ----------

Ref
 
Joined
Nov 12, 2017
Messages
11
Reaction score
0
Odp: Przerobic skrypt

local config = {storage = 3234, hp = 70000, mana= 70000, level = 800}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local health = getCreatureMaxHealth(cid)
local mana = getCreatureMaxMana(cid)
if (getPlayerLevel(cid) >= config.level) then
if getPlayerStorageValue(cid, config.storage) == -1 then
setCreatureMaxHealth(cid, maxhealth+(config.hp))
setCreatureMaxMana(cid, maxmana+(config.mana))
doPlayerSetStorageValue(cid, config.storage, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wykonales juz ten quest.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Nie posiadasz wymaganego poziomu (" .. config.level .. ").")
end
return true
end

powinno dzialac, czekam na rep+
 
Top