Witam, przedstawiam wam skrypt na reborn system który pisałem sam od 0.
Po wpisaniu komendy !reborn dostajemy lvl 20 (Musimy miec minimum 400lvl), skille sie resetuja (zalezy kto jak wpisze). Skrypt nie jest w pełni skończony więc jak będę miał czas to dodam +dmg, licznik rebornow oraz blokady na czas
eng
if you say !reborn, get a level 20, (We need to have minimum 400 level)
hp and mp not reset.
I added a lock that block the maximum number reborns.
In the future, i will add here Dmg, lock on time ,and counter reborns.
[My english is bad xDD]
talkactions.xml :
Po wpisaniu komendy !reborn dostajemy lvl 20 (Musimy miec minimum 400lvl), skille sie resetuja (zalezy kto jak wpisze). Skrypt nie jest w pełni skończony więc jak będę miał czas to dodam +dmg, licznik rebornow oraz blokady na czas
eng
if you say !reborn, get a level 20, (We need to have minimum 400 level)
hp and mp not reset.
I added a lock that block the maximum number reborns.
In the future, i will add here Dmg, lock on time ,and counter reborns.
[My english is bad xDD]
Code:
config = {
storage = 1234,
minLv = 400, -- minimum lvl to use reborn,
newLv = 20, -- new level,
resetmphp = false, --[[ reset hp/mp true or false ]]--,
effect = 5, -- Effect to done reborn,
maxreb = 5 -- maximum reborn
}
function onSay(cid, words, param, channel)
if(getPlayerStorageValue(cid, config.storage) < 0) then
doPlayerSetStorageValue(cid, config.storage, 0)
end
if(getPlayerStorageValue(cid, config.storage) == 5) then
doPlayerSendCancel(cid, "You have max reborn: "..config.maxreb.."")
return true
end
if(config.resetmphp) == false then
setCreatureMaxHealth(cid, getCreatureHealth(cid))
doCreatureAddHealth(cid, 1)
setCreatureMaxMana(cid, getCreatureMana(cid))
doCreatureAddMana(cid, 1)
elseif(config.resetmphp) == true then
doCreatureAddMana(cid, 40-getCreatureMana(cid))
setCreatureMaxMana(cid, 40)
doCreatureAddHealth(cid, 185-getCreatureHealth(cid))
setCreatureMaxHealth(cid, 185)
end
if(getPlayerLevel(cid) >= config.minLv) then
doPlayerAddLevel(cid, -getPlayerLevel(cid)+config.newLv)
doPlayerSetStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage)+1)
doPlayerSendTextMessage(cid, 21, "You advanced to reborn: "..getPlayerStorageValue(cid, config.storage).."")
doSendMagicEffect(cid, getCreaturePosition(cid),config.effect)
else
doPlayerSendCancel(cid, "You not have level:".. config.minLv.."")
doSendMagicEffect(cid, getCreaturePosition(cid), CONST_ME_POFF)
return true
end
end
talkactions.xml :
Code:
<talkaction words="!reborn" event="script" value="reborn.lua"/>
Last edited: