- Dołączył
- Luty 2, 2015
- Posty
- 132
- Liczba reakcji
- 2
Witam mam taki skrypt i czy by mogl ktos przerobic skrypt zeby bylo mozna uzywac od lvl np,500
local config = {
removeOnUse = false,
vial = 7635,
yourself = true,
mppercent = 15,
storageExh = 62,
exhaustion = 15 * 60 --15*60s
}
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 616) --jakies fajne subid
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANAPERCENT, 100+config.mppercent)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 60 * 1000) --10*60s*1000ms = 10min
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(exhaustion.get(cid, config.storageExh)) then
doPlayerSendCancel(cid, "You are exhausted.")
return true
end
if(itemEx.itemid == 1 and itemEx.type == 1) then
if((config.yourself and itemEx.uid == cid) or not config.yourself) then
doCreatureSay(itemEx.uid, "Uzyles bonus mp.", TALKTYPE_ORANGE_1)
doAddCondition(itemEx.uid, condition)
if(config.removeOnUse) then
doRemoveItem(item.uid)
exhaustion.set(cid, config.storageExh, config.exhaustion)
return true
end
doTransformItem(item.uid, config.vial)
else
doPlayerSendCancel(cid, "You can only use it on yourself.")
return true
end
else
doPlayerSendCancel(cid, "You can only use it on players.")
return true
end
exhaustion.set(cid, config.storageExh, config.exhaustion)
return true
end
local config = {
removeOnUse = false,
vial = 7635,
yourself = true,
mppercent = 15,
storageExh = 62,
exhaustion = 15 * 60 --15*60s
}
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 616) --jakies fajne subid
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANAPERCENT, 100+config.mppercent)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 60 * 1000) --10*60s*1000ms = 10min
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(exhaustion.get(cid, config.storageExh)) then
doPlayerSendCancel(cid, "You are exhausted.")
return true
end
if(itemEx.itemid == 1 and itemEx.type == 1) then
if((config.yourself and itemEx.uid == cid) or not config.yourself) then
doCreatureSay(itemEx.uid, "Uzyles bonus mp.", TALKTYPE_ORANGE_1)
doAddCondition(itemEx.uid, condition)
if(config.removeOnUse) then
doRemoveItem(item.uid)
exhaustion.set(cid, config.storageExh, config.exhaustion)
return true
end
doTransformItem(item.uid, config.vial)
else
doPlayerSendCancel(cid, "You can only use it on yourself.")
return true
end
else
doPlayerSendCancel(cid, "You can only use it on players.")
return true
end
exhaustion.set(cid, config.storageExh, config.exhaustion)
return true
end
