ID:273317
 
_> Me and My Ideas xD.

mob/verb/View_Clans()
set name = "View Clans"
set category = "Commands"
var/html = {"
<table border=2 cellspacing=0 cellpadding=2 bordercolor="blue">
<head><title>Credits</title></head>
<body bgcolor=darkblue><center><table bgcolor=black border>
<tr><td colspan=100%><font color = white><center><b>Clan List<br>Clan Count: </td></tr>
<tr><td><font color = white><b>Clan Name<th><font color = white>Members<th><font color = white>Leader</th></td></tr>"}


for(var/V in ClanList)
html+={"<tr><td><b><font color = white>[V]<th><font color = white>>_><th><font color = white>>_></th></td></tr>"}

src << browse(html,"size=400x360,window=Updates)



var/list/ClanList=list()


Well i want this to Show Clan List. Well they appear, but how do i make it shows the Clan Leader and How alot of members Joined in it?

-Gohan :D
I believe 100% of the BYOND Game devs use Clans/Guilds as Datums. So they have variables,they provide them self as a type, they come up in the tree(no use).

like for instance
verb/View_Guild()
for(var/Guild/Guild)
//usr<<"Guild Name = [Guild.name]"
// you give the Clan info via the variables however you want.

Guild
var/name
var/mob/Leader
var/list/members=list()
... //blah what ever you define

Guild.name="Losers" // name of the Guild/Clan
//same manner access all variables.


In response to Getenks
Ok, Thanks. Now another problem how do i add a Guild/Clan?
You should read the guide and some articles at Dream Makers. I know you won't and it's pointless to tell you to. So, I'll give you a freebie. =P
var/list/clans[] //Add new clans to this, be sure to check that it exists before hand.
clan
var/name //The name of the clan.
var/leader //The leader of the clan.
var/list/members //A list of members in the clan.

mob/verb/View_Clan()
if(clans) //If the list exist
for(var/clan/c in clans) //Loop through all clans in the list.
src<<"[c] - [c.leader] - [c.members.len]" //The ouput.


In response to Ulterior Motives
nvm, Thanks both of you i figured it out.
In response to Gohan Games
mob/verb/View_Clans()
set name = "View Clans"
set category = "Commands"
var/html = {"
<table border=2 cellspacing=0 cellpadding=2 bordercolor="blue">
<head><title>Credits</title></head>
<body bgcolor=darkblue><center><table bgcolor=black border>
<tr><td colspan=100%><font color = white><center><b>Clan List (The Clans Going to Show By Creation Date)<br>Clan Count:
[ClanCount]</td></tr>
<tr><td><font color = white><b>Clan Name<th><font color = white>Members<th><font color = white>Leader</th></td></tr>"}


for(var/clan/c in clans)
html+={"<tr><td><b><font color = white><a href=?Action=ClanInformation&src=\ref[src]>[c.name]</A><th><font color = white>[c.members.len]<th><font color = white>[c.leader]</th></td></tr>"}

src << browse(html,"size=400x360,window=Updates")



client/Topic(href,list[])
switch(list["Action"])
if("ClanInformation")
var/html = {"
<table border=2 cellspacing=0 cellpadding=2 bordercolor="blue">
<head><title>Credits</title></head>"}


for(var/clan/c)
html+={"<body bgcolor=darkblue><center><table bgcolor=black border>
<tr><td colspan=100%><font color = white><center><b>Descrption:
[c.desc]<br>Members: [c.members]</td></tr>"}


src << browse(html,"size=400x360,window=Updates")


I want this code to show the Clicked Clan Description. but when i click a Clan Name and there is more than 2 clans it show two clans desc. and i want this to show only the description of clicked clan name. Any idea?
In response to Gohan Games