• 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!

CreatureEvent [MOD] Reset/Reborn system + highscore V2.0

TFS 0.4 :/

to reset player


[17/02/2011 23:30:45] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[17/02/2011 23:30:45] stack traceback:
[17/02/2011 23:30:45] [C]: in function 'error'
[17/02/2011 23:30:45] data/lib/004-database.lua:60: in function <data/lib/004-database.lua:58>
[17/02/2011 23:30:45] (tail call): ?
[17/02/2011 23:30:45] [string "local config =..."]:16: in function 'doPlayerReset'
[17/02/2011 23:30:45] [string "loadBuffer"]:8: in function <[string "loadBuffer"]:4>


look your resets in player

[17/02/2011 23:31:01] [Error - CreatureScript Interface]
[17/02/2011 23:31:01] buffer:eek:nLook
[17/02/2011 23:31:01] Description:
[17/02/2011 23:31:01] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[17/02/2011 23:31:01] stack traceback:
[17/02/2011 23:31:01] [C]: in function 'error'
[17/02/2011 23:31:01] data/lib/004-database.lua:60: in function <data/lib/004-database.lua:58>
[17/02/2011 23:31:01] (tail call): ?
[17/02/2011 23:31:01] [string "loadBuffer"]:5: in function <[string "loadBuffer"]:3>
 
Code:
[01/06/2011 22:09:28] [Error - TalkAction Interface] 
[01/06/2011 22:09:28] buffer
[01/06/2011 22:09:28] Description: 
[01/06/2011 22:09:28] data/lib/database.lua:60: [Result:getDataInt] Result not set!

Rep++ for help, fast! :)
 
ok i was looking for a script like this but with a suggestion of when a char is reborn they keep their skills with an additional bonus depending on vocation-mages +5 mlvl pally+10dis knights +10skills
 
@Cykotitan

You can edit your script, if is of certain vocation, for each reborn you will give more mana and hp?
example:
sorcerer and druid will give for each reborn = 150 of hp and 200 of mana
paladin will give for each reborn = 170 hp and 185 of mana
knight will give for each reborn = 200 hp and 150 of mana

and if you have five reborns you get a new vocation (9 isSorcerer, 10 isDruid, 11 isPaladin, 12 isKnight)

your script that i using is this.

PHP:
local config =  {
	tPos = {x = 1103, y = 1090, z = 5},
	storage = 64002,
	resetLevel = 230,
	startLevel = 8,
	experience = 4200,
	hpMax = 185,
	manaMax = 35
}
function onAdvance(cid, skill, oldlevel, newlevel)
   if(newlevel >= config.resetLevel) then 
		return
			doPlayerSetStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage) + 1),
			doTeleportThing(cid, config.tPos),
			doRemoveCreature(cid),
			db.executeQuery("UPDATE players SET level = " .. config.startLevel .. ", experience = " .. config.experience .. ", manamax = " .. config.manaMax .. ", mana = " .. config.manaMax .. ", healthmax = " .. config.hpMax .. ", health = " .. config.hpMax .. " WHERE name = '" .. escapeString(getCreatureName(cid)) .. "'")
	end
	return true
end

thanks in advance
 
I haven't tested it, but something like this should work:
Lua:
local config =  { 
   tPos = {x = 1103, y = 1090, z = 5},
    storage = 64002,
    resetLevel = 230,
    startLevel = 8,
    experience = 4200,
    hpVocs = {150, 150, 170, 200},
    manaVocs = {200, 200, 185, 150}
}
function onAdvance(cid, skill, oldlevel, newlevel)
   if(newlevel >= config.resetLevel) then
        local voc = getPlayerVocation(cid) % 4
        return
            doPlayerSetStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage) + 1),
            doTeleportThing(cid, config.tPos),
            doRemoveCreature(cid),
            db.executeQuery("UPDATE players SET level = " .. config.startLevel .. ", experience = " .. config.experience .. ", manamax = " .. config.manaVocs[voc] .. ", mana = " .. config.manaVocs[voc] .. ", healthmax = " .. config.hpVocs[voc] .. ", health = " .. config.hpVocs[voc] .. " WHERE name = '" .. escapeString(getCreatureName(cid)) .. "'")
    end
    return true
end
 
You see Ralph (Level 301). He is a royal paladin.
Health: [3115 / 3115], Mana: [4430 / 4430].

Level, hp and mana not updated.
i think that need countdown time.
 
Back
Top