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;
Execute query in phpMyAdmin:
SQL:ALTER TABLE `player_deaths` ADD `time` bigint(20) unsigned NOT NULL DEFAULT 0;
function onDeath(cid, corpse)
if getPlayerStorageValue(cid, 36901) > 0 and getPlayerStorageValue(cid, 35700) < 1 then
doPlayerSetStorageValue(cid, 36901, 0)
end
return true
end
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
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
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;
You have bad warsystem go to data/mods and Remove your MOD - Xampy War system..
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?
You have bad warsystem go to data/mods and Remove your MOD - Xampy War system..
@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 - - -
i think he solved the problem, i hate peaple when solve problem and no report back it's solved ;D