DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • November 16, 2018, 09:44:23 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

Pages: [1]   Go Down
Author Topic: Enhanced list.php  (Read 2460 times)
0 Members and 1 Guest are viewing this topic.
« on: June 25, 2004, 11:39:54 AM »

This is something I've just put on my server, and I'm digging it.
It improves the player listings, specifically the locations (online, fields, etc)
What I did was replace the:

output($row[location]?"`3Boar's Head Inn`0"Sad$loggedin?"`#Online`0":"`3The Fields`0"));

switch ($row['location']) { //odds only happen when logging out in an Inn.
      case 0:
         output($loggedin?"`#Domarr's Keep`0":"`3Plains of Al'Khadar`0");
      case 1:
         output("`3Red Dragon Inn`0");
      case 2:
         output($loggedin?"`#Ultok Morndin`0":"`3Foothills at Ultok Morndin`0");
      case 3:
         output("`3Dwarf Inn of Ultok Morndin`0");
      case 4:
         output($loggedin?"`#Tauredae`0":"`3The Dark Woods (Tauredae)`0");
      case 5:
         output("`3Elvin Inn of Tauredae`0");
      case 6:
         output($loggedin?"`#Fengate`0":"`3Field outside Fengate`0");
      case 7:
         output("`3Inn of Fengate`0");
      case 8:
         output($loggedin?"`#Shadowholde`0":"`3Slums of Shadowholde`0");
      case 9:
         output("`3Inn of Shadowholde`0");
      case 10:
         output($loggedin?"`#Arrennias`0":"`3Camp outside Arrennias`0");
      case 11:
         output("`3Inn of Arrennias`0");

These list the six different cities I plan on implementing, and the placeholders for the inns at each city (of which there will probably be additional ones eventually).
If a player is online, they will be shown as being in whatever city there are at currently, with a different color (`#). If they are not online, they will be shown as being in the identified inn, or the "free section" for that city (where they also go when timed out).
When a player arrives at a new city, their location is set to the city location (currently the even numbers). Inns will be the odd numbers (until I start adding more specific locations).
I didn't like it just displaying as "online" if a person was online, and this way it denotes the online players with a specific color, and also shows what city they are in.

A simple change, but I like it lots. Smiley
« Last Edit: June 25, 2004, 11:41:31 AM by Voratus » Logged
Pages: [1]   Go Up
Jump to:  

DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
37 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search