/guilds=new
mob/var/guild=""
mob/var/invitable=0
mob/verb
List_Guilds()
set category="Guild"
if("GM" in guilds)
sleep(1)
else
var/savefile/C = new ("Guilds.sav")
C["guilds"] >> guilds
if("GM" in guilds)
sleep(1)
else
guilds=new/list()
guilds+="GM"
usr<<"Guilds:"
var/online=0
for(var/T in guilds)
for(var/mob/M in world)
if(M.guild==T)
online+=1
usr<<"[T] - Members Online:[online]"
online=0
var/savefile/X = new ("Guilds.sav")
X["guilds"] << guilds
mob/verb
Create_Guild()
set category="Guild"
if(usr.guild=="")
if(usr.zenni>=500)
if("GM" in guilds)
sleep(1)
else
var/savefile/C = new ("Guilds.sav")
C["guilds"] >> guilds
if("GM" in guilds)
sleep(1)
else
guilds=new/list()
guilds+="GM"
var/newguild=input("What is the name of your new guild","Create Guild","[usr.name]'s Guild")as text
switch(alert(usr,"Create [newguild]?","Guild Notice","Yes","No"))
if("Yes")
for(var/T in guilds)
if(newguild==T)
alert(usr,"Sorry that name is already taken","Guild Notice","Darn")
return
usr.guild=newguild
usr.oocname=usr.guild
usr.invitable=1
guilds+=newguild
var/savefile/X = new ("Guilds.sav")
X["guilds"] << guilds
usr.client.SaveMob()
usr.zenni-=500
alert(usr,"Successful Guild Creation!","Guild Notice","Done")
return
else
usr<<"It costs 500 zenni to create a guild!"
else
usr<<"Youre already in a guild"
Leave_Guild()
set category="Guild"
if(usr.guild=="")
alert(usr,"You arent in a guild","Guild Notice","Oh")
else
switch(alert(usr,"Leave [usr.guild]?","Leave Guild","Yes","No"))
if("Yes")
if(usr.invitable==1)
if(usr.guild=="GM")
usr<<"The GM guild must stay on the Guild List!!"
else
guilds-=usr.guild
alert(usr,"Guild Removed From List","Remove Guild","OK")
usr.guild=""
usr.invitable=0
alert(usr,"Guild Left!","Leave Guild","OK")
usr.client.SaveMob()
var/savefile/X = new ("Guilds.sav")
X["guilds"] << guilds
Invite(var/mob/M in world)
set category="Guild"
if(M.key)
if(usr.invitable==1)
if(M.guild=="")
usr<<"invite sent to [M]"
switch(alert(M,"[usr] has invited you to join [usr.guild]","Guild Invite","Join","Decline"))
if("Join")
M.guild=usr.guild
alert(usr,"[M] has joined your guild","Guild Notice","OK")
if("Decline")
alert(usr,"[M] declined your invite","Guild Notice","Darn")
else
usr<<"[M] is already in [M.guild]"
M<<"[usr] tried to invite you to join [usr.guild] but you are already in [M.guild]"
else
usr<<"You dont have authorization to use this command"
usr<<"This command is reserved for Guild Leaders"
else
usr<<"You cant invite NPCs to join your guild!"
Guild_Chat(t as text)
set category="Guild"
var/sentto=0
if(usr.guild=="")
usr<<"You arent in a guild!"
else
for(var/mob/M in world)
if(M.guild==usr.guild)
sentto+=1
t=copytext(t,1,500)
M<<"Guild Message From [usr]: [html_encode(t)]"
usr<<"Message sent to [sentto] guild members"
Can u tell me what is wrong with this?
It comes up with a few errors.</<></<></<>
ID:168270
Nov 12 2005, 7:03 pm
|
|
In response to CaptFalcon33035
|
|
No, use <dm> and </dm>. :P
|
In response to Jp
|
|
Damn, I placed a space between DM and the side carrot-top things, I thought it wouldn't display. Then it displays for you and gives me a code window.
wdf homy boi wrong witdat?!!?!one?! |
In response to CaptFalcon33035
|
|
Just use the '& lt;' thingy (Without quotes or the space between the ampersand and the semicolon)
|
In response to CaptFalcon33035
|
|
CaptFalcon33035 wrote:
Damn, I placed a space between DM and the side carrot-top things, I thought it wouldn't display. Then it displays for you and gives me a code window. When in doubt, use the preview button. Lummox JR |
By the way, this goes in Code Problems, not developer how-to.