ralke
(҂ ͠❛ ෴ ͡❛)ᕤ
Using OTX 2 (0.3.7)
Old threads with the same topic:
Death list | OTLand
AAC - Znote death list | OTLand
Hi! I wanted to ask something about Znote AAC this time. When a character gets killed by multiple targets, the deathlist of characterprofile.php is only showing one of the killers. For example, if you were killed by a minotaur, player (a) and player (b) , the deathlist will only show:
- Killed at level 30 by a minotaur ...... or ...... Killed at level 30 by Player (a)
But I want to show the whole list.
- Killed at level 30 by Player (a), Player (b) and a minotaur
Here is how the deathlist is written for 0.3.7
And here are all versions together (TFS_03, TFS_10, TFS_02):
As I see the TFS_10 has this feature, expressed by new tables such as
I wonder if using the TFS_10 code as TFS_03 and adding those new tables will make the deathlist work as intended?. Before testing this I would like to ask... You guys know better than me if those tables are going to work on OTX 2 (0.3.7) or if there's another way to change the deathlist method.
Also got the config.lua configured this way:
This is telling me that a deathAssist function and the maxDeathRecords are part of the sources of OTX 2 and theres a way to fit it with the deathlist.
Hope I explained well, i'm looking for help to make this work
Regards,
ralke
Old threads with the same topic:
Death list | OTLand
AAC - Znote death list | OTLand
Hi! I wanted to ask something about Znote AAC this time. When a character gets killed by multiple targets, the deathlist of characterprofile.php is only showing one of the killers. For example, if you were killed by a minotaur, player (a) and player (b) , the deathlist will only show:
- Killed at level 30 by a minotaur ...... or ...... Killed at level 30 by Player (a)
But I want to show the whole list.
- Killed at level 30 by Player (a), Player (b) and a minotaur
Here is how the deathlist is written for 0.3.7
PHP:
} elseif (in_array($config['ServerEngine'], array('TFS_03', 'OTHIRE'))) {
//mysql_select_single("SELECT * FROM players WHERE name='TEST DEBUG';");
$array = user_fetch_deathlist03($user_id);
if ($array) {
// Design and present the list
foreach ($array as $value):
$value[3] = user_get_killer_id(user_get_kid($value['id']));
if ($value[3] !== false && $value[3] >= 1) {
$namedata = user_character_data((int)$value[3], 'name');
if ($namedata !== false) {
$value[3] = $namedata['name'];
$value[3] = 'player: <a href="characterprofile.php?name='. $value[3] .'">'. $value[3] .'</a>';
} else {
$value[3] = 'deleted player.';
}
} else {
$value[3] = user_get_killer_m_name(user_get_kid($value['id']));
if ($value[3] === false) {
$value[3] = 'deleted player.';
}
}
?>
<tr>
<td><?php echo getClock($value['date'], true, true); ?></td>
<td><?php echo 'Killed at level '. $value['level'] .' by '. $value[3]; ?></td>
</tr>
<?php endforeach;
} else {
?>
<tr>
<td colspan="2">This player has never died.</td>
</tr>
<?php
}
}
?>
And here are all versions together (TFS_03, TFS_10, TFS_02):
PHP:
<!-- DEATH LIST -->
<table class="deathlist">
<thead>
<tr class="yellow">
<th colspan="2">Death List</th>
</tr>
</thead>
<tbody>
<?php
if ($config['ServerEngine'] == 'TFS_10') {
$deaths = mysql_select_multi("
SELECT
`player_id`,
`time`,
`level`,
`killed_by`,
`is_player`,
`mostdamage_by`,
`mostdamage_is_player`,
`unjustified`,
`mostdamage_unjustified`
FROM `player_deaths`
WHERE `player_id`=$user_id
ORDER BY `time` DESC
LIMIT 10;
");
if ($deaths) {
foreach ($deaths as $d) {
$lasthit = ($d['is_player'])
? "<a href='characterprofile.php?name=".$d['killed_by']."'>".$d['killed_by']."</a>"
: $d['killed_by'];
?>
<tr>
<td><?php echo getClock($d['time'], true, true); ?></td>
<td>
<?php
echo "Killed at level ".$d['level']." by {$lasthit}";
if ($d['unjustified']) {
echo " <font color='red' style='font-style: italic;'>(unjustified)</font>";
}
$mostdmg = ($d['mostdamage_by'] !== $d['killed_by']) ? true : false;
if ($mostdmg) {
$mostdmg = ($d['mostdamage_is_player'])
? "<a href='characterprofile.php?name=".$d['mostdamage_by']."'>".$d['mostdamage_by']."</a>"
: $d['mostdamage_by'];
echo "<br>and by $mostdmg.";
if ($d['mostdamage_unjustified']) {
echo " <font color='red' style='font-style: italic;'>(unjustified)</font>";
}
} else {
echo " <b>(soloed)</b>";
}
?>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="2">This player has never died.</td>
</tr>
<?php
}
} elseif ($config['ServerEngine'] == 'TFS_02') {
$array = user_fetch_deathlist($user_id);
if ($array) {
foreach ($array as $value):
if ($value['is_player'] == 1) {
$value['killed_by'] = 'player: <a href="characterprofile.php?name='. $value['killed_by'] .'">'. $value['killed_by'] .'</a>';
} else {
$value['killed_by'] = 'monster: '. $value['killed_by'] .'.';
}
?>
<tr>
<td><?php echo getClock($value['time'], true, true); ?></td>
<td><?php echo 'Killed at level '. $value['level'] .' by '. $value['killed_by']; ?></td>
</tr>
<?php endforeach;
} else {
?>
<tr>
<td colspan="2">This player has never died.</td>
</tr>
<?php
}
} elseif (in_array($config['ServerEngine'], array('TFS_03', 'OTHIRE'))) {
//mysql_select_single("SELECT * FROM players WHERE name='TEST DEBUG';");
$array = user_fetch_deathlist03($user_id);
if ($array) {
// Design and present the list
foreach ($array as $value):
$value[3] = user_get_killer_id(user_get_kid($value['id']));
if ($value[3] !== false && $value[3] >= 1) {
$namedata = user_character_data((int)$value[3], 'name');
if ($namedata !== false) {
$value[3] = $namedata['name'];
$value[3] = 'player: <a href="characterprofile.php?name='. $value[3] .'">'. $value[3] .'</a>';
} else {
$value[3] = 'deleted player.';
}
} else {
$value[3] = user_get_killer_m_name(user_get_kid($value['id']));
if ($value[3] === false) {
$value[3] = 'deleted player.';
}
}
?>
<tr>
<td><?php echo getClock($value['date'], true, true); ?></td>
<td><?php echo 'Killed at level '. $value['level'] .' by '. $value[3]; ?></td>
</tr>
<?php endforeach;
} else {
?>
<tr>
<td colspan="2">This player has never died.</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
As I see the TFS_10 has this feature, expressed by new tables such as
mostdamage_by
, mostdamage_is_player
... among others.
PHP:
$deaths = mysql_select_multi("
SELECT
`player_id`,
`time`,
`level`,
`killed_by`,
`is_player`,
`mostdamage_by`,
`mostdamage_is_player`,
`unjustified`,
`mostdamage_unjustified`
FROM `player_deaths`
WHERE `player_id`=$user_id
ORDER BY `time` DESC
LIMIT 10;
");
I wonder if using the TFS_10 code as TFS_03 and adding those new tables will make the deathlist work as intended?. Before testing this I would like to ask... You guys know better than me if those tables are going to work on OTX 2 (0.3.7) or if there's another way to change the deathlist method.
Also got the config.lua configured this way:
Lua:
-- deathAssistCount to 1
-- useFairfightReduction to false
-- fairFightTimeRange = 30
deathListEnabled = true
deathListRequiredTime = 1 * 60 * 1000
maxDeathRecords = 5
This is telling me that a deathAssist function and the maxDeathRecords are part of the sources of OTX 2 and theres a way to fit it with the deathlist.
Hope I explained well, i'm looking for help to make this work
Regards,
ralke
Last edited: