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

Help when die

Naaano201

Member
Joined
Jun 5, 2011
Messages
241
Reaction score
8
Location
Barcelona
When a player dies by monster or by player, this loss level, aol, and bless and go to temple but doesn't appear a dead human...
Somebody can help me?
 
Last edited:
Error database in loss_skills , etc..... use this in - SQL /phpmyadmin
SQL:
UPDATE players SET loss_experience = 100;
UPDATE players SET loss_mana = 100;
UPDATE players SET loss_skills = 100;
UPDATE players SET loss_containers = 100;
UPDATE players SET loss_containers loss_items = 100;
 
Error database in loss_skills , etc..... use this in - SQL /phpmyadmin
SQL:
UPDATE players SET loss_experience = 100;
UPDATE players SET loss_mana = 100;
UPDATE players SET loss_skills = 100;
UPDATE players SET loss_containers = 100;
UPDATE players SET loss_containers loss_items = 100;

@spanish
Todo eso funciona.
El error que hay es que no aparece el dead human cuando mueres ...

@english
All this works.
The error is that doesn't appear a dead human when you die ...
 
Execute query in phpMyAdmin:
SQL:
ALTER TABLE `player_deaths` ADD `time` bigint(20) unsigned NOT NULL DEFAULT 0;

It doesn't work.

Maybe a problem with any creaturescripts?

demonOakDeath.lua
Lua:
function onDeath(cid, corpse)
        if getPlayerStorageValue(cid, 36901) > 0 and getPlayerStorageValue(cid, 35700) < 1 then
                doPlayerSetStorageValue(cid, 36901, 0)
        end
        return true
end


azerus.lua
Lua:
local config = {
    message = "Azerus ran into teleporter! It will disappear in 2 minutes. Enter It!",
    teleportId = 1387,
    bosses = { -- Monster Name, Teleport To Position, Teleport Position
        ["Azerus"] = {{x=120, y=771, z=8}, {x=120, y=769, z=9}},



            }
}

function onDeath(cid, corpse, killer)
    local position = getCreaturePosition(cid)
    for name, pos in pairs(config.bosses) do
        if name == getCreatureName(cid) then

        doCreateTeleport(config.teleportId, pos[1], pos[2])
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
        end
    end
    return TRUE
end
 
add playerdeath.lua creatureevent.

Code:
function onDeath(cid, corpse, deathList)

local strings = {""}
local t, position = 1, 1
local deathType = "killed"
local toSlain, toCrushed = 3, 9

if #deathList >= toSlain then
	deathType = "slain"
elseif #deathList >= toCrushed then
	deathType = "crushed"
end
for _, pid in ipairs(deathList) do
	strings[position] = t == 1 and "" or strings[position] .. ", "
	strings[position] = strings[position] .. getCreatureName(pid) .. ""
		t = t + 1
end
for i, str in ipairs(strings) do
	if(str:sub(str:len()) ~= ",") then
		str = str .. "."
end
	msg = getCreatureName(cid) .. " was " .. deathType .. " at level " .. getPlayerLevel(cid) .. " by " .. str
end
for _, oid in ipairs(getPlayersOnline()) do
	doPlayerSendChannelMessage(oid, "Death channel", msg, TALKTYPE_CHANNEL_O, CHANNEL_DEATH)
end

	return true
end

Don't forget to add it in creaturescripts xml and in login lua also.
Regards
 
add playerdeath.lua creatureevent.

Code:
function onDeath(cid, corpse, deathList)

local strings = {""}
local t, position = 1, 1
local deathType = "killed"
local toSlain, toCrushed = 3, 9

if #deathList >= toSlain then
	deathType = "slain"
elseif #deathList >= toCrushed then
	deathType = "crushed"
end
for _, pid in ipairs(deathList) do
	strings[position] = t == 1 and "" or strings[position] .. ", "
	strings[position] = strings[position] .. getCreatureName(pid) .. ""
		t = t + 1
end
for i, str in ipairs(strings) do
	if(str:sub(str:len()) ~= ",") then
		str = str .. "."
end
	msg = getCreatureName(cid) .. " was " .. deathType .. " at level " .. getPlayerLevel(cid) .. " by " .. str
end
for _, oid in ipairs(getPlayersOnline()) do
	doPlayerSendChannelMessage(oid, "Death channel", msg, TALKTYPE_CHANNEL_O, CHANNEL_DEATH)
end

	return true
end

Don't forget to add it in creaturescripts xml and in login lua also.
Regards

SQL:
ALTER TABLE `player_deaths` ADD `killed_by` VARCHAR(255) NOT NULL;

Doesn't appear dead human ...
 
Naaano201 don't use TFS, he use a stable version of OTX, posted by kaiser.
So... he must ask the help of kaiser (blacktibia.org), create an account in blacktibia and PM kaiser.
 
You have bad warsystem go to data/mods and Remove your MOD - Xampy War system..

I Don't Know Why You Say Somethings Stupid :D , i feel bad when you help peaple on theards :D no do that again plz?

- - - Updated - - -

When a player dies by monster or by player, this loss level, aol, and bless and go to temple but doesn't appear a dead human...
Somebody can help me?

any errors on cansole? , i think problem on playerdeath.lua , i solved it before ,just tell me any errors on cansole to make sure

- - - Updated - - -

You have bad warsystem go to data/mods and Remove your MOD - Xampy War system..

i think he said no dead humen =.= not die without score on guild wars or hp 0 and still alive..
 
@up
Its same in old version TFS, He have errors in creaturescripts..
desconfig your keyboard xd?

@Nano..
Add playerdeath.lua en creaturescripts.. and use sql querys.
 
@Naaano201 , Any errors? :S

- - - Updated - - -

@up
Its same in old version TFS, He have errors in creaturescripts..
desconfig your keyboard xd?

@Nano..
Add playerdeath.lua en creaturescripts.. and use sql querys.

i think he solved the problem :D , i hate peaple when solve problem and no report back it's solved ;D
 
@Naaano201 , Any errors? :S

- - - Updated - - -



i think he solved the problem :D , i hate peaple when solve problem and no report back it's solved ;D

No i don't solved the problem.

Tried with clean creaturescript folder and all work fine.

I think there's a problem with any custom script like demon oak, inquisition, or something ...
 
Back
Top