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

Solved Two little problems

Dagh

New Member
Joined
Nov 3, 2008
Messages
80
Reaction score
1
Well, as the title says I got 2 problems

SOLVED 1.- In my 8.54 when creating a knight with the Account Manager, it debugs at the FIRST login moment, it does only happen the first time you log, then you can open tibia again and there is nothing wrong...


In the console I have this error when choosing the vocation, I mean when saying "Knight>Yes":

[19/05/2011 00:04:49] Account Manager has logged in.
[19/05/2011 00:04:49] [Warning - Vocations::getVocation] Vocation 4294967295 not found.
[19/05/2011 00:04:49] [Warning - Vocations::getVocation] Vocation 4294967295 not found.
[19/05/2011 00:05:15] Account Manager has logged out.
[19/05/2011 00:05:20] Knight Testt has logged in.

I've already checked the login.lua, even the account manager in the DB and things but still the same problem.

SOLVED 2.- Ok, as it is a War Server, I want to have the red/black skull but then the problem comes: when dying with one of them, by the common effect of the skulls you loose all your items bla bla, what I need to solve is:

-When dying with those skulls they have their normal effect BUT the next time you respawn, you have all your initial set, I mean, the predeterminated of my OT

That's all, thanks for reading and I hope someone knows how to help me solve those problems, greets!
 
Last edited:
1a post the debug assertion log as screenshot or text
1b check vocations.xml

2. either make the characters not save, if use this script if that is unacceptable
LUA:
function onDeath(cid, corpse, deathList)
	if getCreatureSkullType(cid) >= SKULL_RED then
		doCreatureSetStorage(cid, 99, 1)
	end
	return true
end

function onLogin(cid)
	if getCreatureStorage(cid, 99) == 1 then
		doCreatureSetStorage(cid, 99)
		-- first items code here, you may even merge this
		-- with your other login script if want
	end
	return true
end
 
Ok, I've a SC of the Debug Assertion Log, here it is:
Imageshack - debugd.png

And also, I've already done the red skull thing and don't have any errors on console but still not working. Here it is:

Code:
function onDeath(cid, corpse, deathList)
	if getCreatureSkullType(cid) >= SKULL_RED then
		doCreatureSetStorage(cid, 99, 1)
	end
	return true
end
 
function onLogin(cid)
	if getCreatureStorage(cid, 99) == 1 then
		doCreatureSetStorage(cid, 99)
  local commonItems = {
  -- ITEMS ALL VOCS RECEIVE
        {itemid=2000, count=1}, -- red bp
  	{itemid=7591, count=1}, -- great health potion
  	{itemid=7589, count=1}, -- strong mana potion
	{itemid=8472, count=1}, -- great spirit potion
	{itemid=2268, count=1}, -- sudden death rune
	{itemid=2120, count=1}, -- rope
	{itemid=2420, count=1}, -- machete
  	{itemid=2789, count=50}, -- brown mushrooms
 	{itemid=2195, count=1}, -- boots of haste
   	{itemid=8922, count=1}, -- wand of voodoo
   	{itemid=8910, count=1}, -- underworld rod
   	{itemid=7368, count=100}, -- assassin stars
        {itemid=2400, count=1}, -- magic sword
        {itemid=2421, count=1}, -- thunder hammer
        {itemid=2431, count=1}, -- Stonecutter Axe
        {itemid=2522, count=1}, -- great shield
}
    
	end
	return true
end

I know it has an error cause it just don't looks fine, hope you know where it is :s
Thanks a lot for helping!
 
Amazing bro, it was the skills, I will have to remove some of them haha. Thanks a lot dude!
Do you know something more about the other problem?
 
Instead of adding them on login, you could edit sources (if using acc manager) or sample character's skill rows (if using an AAC) to make the characters have correct skills on creation

and
LUA:
function onDeath(cid, corpse, deathList)
	if getCreatureSkullType(cid) >= SKULL_RED then
		doCreatureSetStorage(cid, 99, 1)
	end
	return true
end

local t = {
	{2000}, -- red bp
	{7591}, -- great health potion
	{7589}, -- strong mana potion
	{8472}, -- great spirit potion
	{2268}, -- sudden death rune
	{2120}, -- rope
	{2420}, -- machete
	{2789, 50}, -- brown mushrooms
	{2195}, -- boots of haste
	{8922}, -- wand of voodoo
	{8910}, -- underworld rod
	{7368, 100}, -- assassin stars
	{2400}, -- magic sword
	{2421}, -- thunder hammer
	{2431}, -- Stonecutter Axe
	{2522}, -- great shield
}

function onLogin(cid)
	if getCreatureStorage(cid, 99) == 1 then
		doCreatureSetStorage(cid, 99)
		for _, f in ipairs(t) do
			doPlayerAddItem(cid, f[1], f[2] or 1)
		end
	end
	return true
end
(make sure both events are registered in creaturescripts.xml, and death event in login.lua (you could register it in this file too))
 

Similar threads

Back
Top