Skrypty & Kody Przerobic skrypt + od lvl

Zapalniczka

Active User
Zarejestrowany
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
 
Odp: Przerobic skrypt + od lvl

Do config dodajesz: level = X
I sprawdzeniu dodajesz if getPlayerLevel(cid) > config.level
Potem walisz else i wiadomo??, ?e ma za niski level do u?ycia tego.
Je?li ju? robisz ots to polecam si? pouczy? co nieco lua :P

[LUA]local config = {
removeOnUse = false,
vial = 7635,
yourself = true,
mppercent = 15,
storageExh = 62,
level = X,
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 getPlayerLevel(cid) > config.level then
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
else
doPlayerSendCancel(cid, "Masz za niski level by to uzyc. Wymagany level to .. config.level .. !")
return true
end
exhaustion.set(cid, config.storageExh, config.exhaustion)
return true
end[/LUA]
 
Ostatnia edycja:
Odp: Przerobic skrypt + od lvl

Dzi?ki ;D

---------- Tre?? dodana o 23:01 ----------

nie moge dac rep+ ale pozniej dam
 
Back
Do góry