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

Znote showing skulls on whoisonline page

celohere

Advanced OT User
Joined
Nov 27, 2007
Messages
270
Solutions
21
Reaction score
153
There is some way to make it on znote ?Show if a online player is red or white skull
 
Solution
I think character saves only happens on logout, server save and GM save command, so while you gain white skull in-game it does not usually notify/update the database. Which makes it tricky to get updated skull info in online list.
You may need to add a creatureevent that will save your character if you get and loose white skull. Not sure if there is an onSkullChange listener or if you need to use onHealthChange or onThink.
In ZnoteAAC/onlinelist.php at master · Znote/ZnoteAAC · GitHub
Replace (2 occurences)
PHP:
`p`.`vocation` AS `vocation`
With:
PHP:
`p`.`vocation` AS `vocation`, `p`.`skull` AS `skull`

Replace:
PHP:
<td><?php echo $value['level']; ?></td>
With:
PHP:
<td><?php echo $value['level'] . " [" . $value['skull'] . "]"; ?></td>

Wait 30 seconds for potential onlinelist cache to refresh.

You should now see skull type in brackets like [1] to the right of character level. We can then run a switch statement to change the bracket and number into a transparent image file representing correct skull type, once we know what that is.
 
ok ,worked as you said . And now, how a change the images? ( i have the .gifs on image folder).
Thank you in advance for your time and your help. =)
 
editing the php statement
ok with this I mean that you already got the number value of the skull so with that
0 = none,
1 = white (?),
2 = idk,
3 = redskull (?)

with that you can edit the php statement and do something like
PHP:
<td><?php echo $value['level'];?> <img src="images/skull/"<?php echo $value['skull']; ?>".gif"></td>

where images/skull/0.gif is white skull and blabla.
 
Last edited:
thanx for the help bro , i got it =) , just toke the " after the skull/" , and worked .
PHP:
<td><?php echo $value['level'];?> <img src="images/skull/<?php echo $value['skull'];?>.gif"></td>


but i have one problem ,now the website shows everyone as white skulls.

Seems that both, pks and nonpks have the same value in the database column "skull"
 
Last edited:
I think character saves only happens on logout, server save and GM save command, so while you gain white skull in-game it does not usually notify/update the database. Which makes it tricky to get updated skull info in online list.
You may need to add a creatureevent that will save your character if you get and loose white skull. Not sure if there is an onSkullChange listener or if you need to use onHealthChange or onThink.
 
Solution
Back
Top