• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction TFS 0.3.6+ Reborn System

Adix910

New Member
Joined
Aug 14, 2015
Messages
37
Reaction score
1
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]

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:
Looks good I'll try to test it out but where do you need to add it? and does this also show that someone is reborned if you shift click them?
 
Last edited by a moderator:
Thx for the edit I understand ur english :p

I get this Error:

[06/09/2015 00:07:55] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/rebornsystem.lua:11: ')' expected near 'then'
[06/09/2015 00:07:55] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/rebornsystem.lua)
[06/09/2015 00:07:55] data/talkactions/scripts/rebornsystem.lua:11: ')' expected near 'then'

I get lots of errors.

Using 0.3.6
 
Last edited by a moderator:
If you are starting an ot can i test it? :D i love rebirth servers
 
I tested it it works not good,

20:10 You lose 100265 mana.
20:10 You lose 150120 hitpoints.
20:10 You were downgraded from Level 7085 to Level 418.
20:10 You advanced to reborn: 2

It only downgrades to level 418 and I can't see if the player is rebirth if I shift-click him.
And you'll get 1 hp and 0 mana. If you die you'll die everytime login cuz you have 0 hp.
 
Back
Top