Code:
mob
verb
Guild_Create()
set category = "Guild"
var/list/L
L = list("font size")
if(src.in_guild)
src << "You are in a Guild!"
return
switch(alert("Are you sure you wish to create a Guild?","Guild Creation","Yes","No"))
if("Yes")
goto Create
if("No")
return
if(client.IsByondMember())
Create
var/savefile/F = new("World Save Files/Guilds.sav")
var/new_guild_name = input("What do you wish to Call your Guild?","Guild Name") as text
if(!new_guild_name)
alert("Guild Name may not be blank.")
return
for(var/X in L)
if(findtext(new_guild_name,X))
alert("You may not change your font size.")
return
if(lentext(new_guild_name) > 1000000)
alert("Cannot be more than 1000000 Characters!")
goto Create
switch(alert("Do you wish to call your Guild [new_guild_name]?","Guild Name","Yes","No"))
if("Yes")
goto Finalise
if("No")
goto Create
Finalise
src.guild_name = new_guild_name
src.guild_leader = 1
src.guild_rank = "Leader"
src.in_guild = 1
Guilds.Add(new_guild_name)
F["Guilds"] << Guilds
src.Give_Guild_Verbs()
src.verbs -= new/mob/verb/Guild_Create()
else
src << "Sorry Byond Members Only"
return ..()
mob/Guild_Leader
verb
Guild_Invite()
set category = "Guild"
var/list/Menu = list()
for(var/mob/M in world)
if(!M.client) continue
if(M.name != usr.name)
if(!M.in_guild)
Menu.Add(M)
var/mob/M = input("Invite Who?","Guild Invite") as null | anything in Menu
if(!M)return
if(istype(M,/mob))
switch(alert(M,"Would you like to join [usr]'s Guild?","Guild Join","Yes","No"))
if("Yes")
M.guild_name = usr.guild_name
M.guild_member = 1
M.guild_rank = "Member"
M.in_guild = 1
M.Give_Guild_Verbs()
M.verbs -= new/mob/verb/Guild_Create()
for(var/mob/X in world)
if(X.guild_name == usr.guild_name)
X << "<font color = #BB0EDA>Guild Information:</font> [M] has joined the Guild!"
if("No")
usr << "[M] has declined your Guild Invite"
return
Guild_Boot()
set category = "Guild"
var/list/Menu = list()
for(var/mob/M in world)
if(!M.client) continue
if(M.name != usr.name)
if(M.in_guild)
if(M.guild_name == usr.guild_name)
Menu.Add(M)
var/mob/M = input("Boot Who?","Guild Boot") as null | anything in Menu
if(!M)return
if(istype(M,/mob))
if(M.guild_leader)
alert("You cannot boot the Leader!")
return
if(M.guild_co_leader)
alert("You cannot boot the Co-Leader!")
return
switch(alert("Would you like to Boot [M] from the Guild?","Guild Boot","Yes","No"))
if("Yes")
M.Remove_Guild_Verbs()
for(var/mob/X in world)
if(X.guild_name == M.guild_name)
X << "<font color = #BB0EDA>Guild Information:</font> [M] has been Booted from the Guild!"
M.guild_name = "None"
M.guild_leader = 0
M.guild_co_leader = 0
M.guild_member = 0
M.guild_invite = 0
M.guild_announce = 0
M.guild_boot = 0
M.guild_change_rank = 0
M.guild_rank = ""
M.in_guild = 0
M.verbs += new/mob/verb/Guild_Create()
if("No")
usr << "You decided not to Boot [M]"
return
Guild_Change_Rank()
set category = "Guild"
var/list/Menu = list()
for(var/mob/M in world)
if(!M.client) continue
if(M.name != usr.name)
if(M.in_guild)
if(M.guild_name == usr.guild_name)
Menu.Add(M)
var/mob/M = input("Change Who's Rank?","Guild Change Rank") as null | anything in Menu
if(!M)return
if(istype(M,/mob))
switch(input("What rank do you wish to give [M]?")in list("Co-Leader","Member","Custom","Cancel"))
if("Co-Leader")
M.guild_co_leader = 1
M.Give_Guild_Verbs()
if("Member")
M.guild_member = 1
M.Remove_Guild_Verbs()
M.Give_Guild_Verbs()
if("Custom")
switch(alert("Do you wish to Alter their Custom Rank?","Change Rank","Yes","No"))
if("Yes")
var/new_rank = input("What do you wish their Rank to be called?","Custom Rank") as text | null
if(lentext(new_rank) > 25)
usr << "New Rank cannot be more than 25 Characters"
if(!M)return
M.guild_rank = new_rank
for(var/mob/X in world)
if(X.guild_name == src.guild_name)
X << "<font color = #BB0EDA>Guild Information:</font> [M] has been granted the rank of [new_rank]!"
switch(input("What Permissions do you wish to give them?")in list("Boot","Invite","Announce","Change Rank","Cancel"))
if("Boot")
M.guild_boot = 1
M.Give_Guild_Verbs()
if("Invite")
M.guild_invite = 1
M.Give_Guild_Verbs()
if("Announce")
M.guild_announce = 1
M.Give_Guild_Verbs()
if("Guild Change Rank")
M.guild_change_rank = 1
M.Give_Guild_Verbs()
if("None")
return
if("No")
switch(input("What Permissions do you wish to give them?")in list("Boot","Invite","Announce","Change Rank","Cancel"))
if("Boot")
M.guild_boot = 1
M.Give_Guild_Verbs()
if("Invite")
M.guild_invite = 1
M.Give_Guild_Verbs()
if("Announce")
M.guild_announce = 1
M.Give_Guild_Verbs()
if("Guild Change Rank")
M.guild_change_rank = 1
M.Give_Guild_Verbs()
if("None")
return
if("Cancel")
return
Guild_Announce(T as text)
set category = "Guild"
set desc = "Announce to the Guild"
var/list/L
L = list("font size")
if(lentext(T) > 350)
alert("Message must be less than 350 Characters!")
return
if(!T)
alert("Your message may not be blank.")
return
for(var/X in L)
if(findtext(T,X))
alert("You may not change your font size.")
return
for(var/mob/X in world)
if(X.guild_name == usr.guild_name)
X << "<BR>----- Guild Announce -----<BR><font color=#000066>{<font color=#FFFFFF><font face = Arial>[src.guild_rank]<font color=#000066>}</font> [usr]: [T]<BR>"
mob/Guild_Verbs
verb
Guild_Chat(T as text)
set category = "Guild"
set desc = "Chat to the Guild"
var/list/L
L = list("font size")
if(lentext(T) > 300)
alert("Message must be less than 300 Characters!")
return
if(!T)
alert("Your message may not be blank.")
return
for(var/X in L)
if(findtext(T,X))
alert("You may not change your font size.")
return
for(var/mob/X in world)
if(X.guild_name == usr.guild_name)
X << {"<pre><strong><font color="#000066">{<font color="#FFFFFF"><font face = Arial>Guild<font color="#000066">}<font color="#000066">{<font color="#FFFFFF"><font face = Arial>[src.guild_rank]<font color="#000066">}</font></font></font></strong></pre> [src.name] Says:<font color = #CCCCCC> [T]"}
Guild_Who()
set category = "Guild"
var/count = 0
usr << "-------------------------------"
for(var/mob/X in world)
if(X.in_guild)
if(X.guild_name == usr.guild_name)
count += 1
usr << "<font color=#000066>{<font color=#FFFFFF><font face = Arial>[X.guild_rank]<font color=#000066>}</font> [X]"
usr << "Guild Members Online: [count]"
usr << "-------------------------------"
Guild_Leave()
set category = "Guild"
if(!src.guild_leader)
switch(alert("Are you sure you wish to leave the Guild [src.guild_name]?","Guild Leave","Yes","No"))
if("Yes")
src.Remove_Guild_Verbs()
for(var/mob/X in world)
if(X.guild_name == src.guild_name)
X << "<font color = #BB0EDA>Guild Information:</font> [src] has left the Guild!"
src.guild_name = ""
src.guild_leader = 0
src.guild_co_leader = 0
src.guild_member = 0
src.guild_invite = 0
src.guild_announce = 0
src.guild_boot = 0
src.guild_change_rank = 0
src.guild_rank = ""
src.in_guild = 0
src.verbs += new/mob/verb/Guild_Create()
if("No")
return
else
switch(alert("Are you sure you wish to leave the Guild [src.guild_name]?","Guild Leave","Yes","No"))
if("Yes")
var/savefile/F = new("World Save Files/Guilds.sav")
src.Remove_Guild_Verbs()
world << "<font color = #BB0EDA>Guild Information:</font> [src] has Disbanded [src.guild_name]!"
Guilds.Remove(src.guild_name)
F["Guilds"] << Guilds
src.guild_name = ""
src.guild_leader = 0
src.guild_co_leader = 0
src.guild_member = 0
src.guild_invite = 0
src.guild_announce = 0
src.guild_boot = 0
src.guild_change_rank = 0
src.guild_rank = ""
src.in_guild = 0
src.verbs += new/mob/verb/Guild_Create()
if("No")
return
mob
proc
Give_Guild_Verbs()
if(src.guild_leader)
src.verbs += typesof(/mob/Guild_Leader/verb)
src.verbs += typesof(/mob/Guild_Verbs/verb)
if(src.guild_co_leader)
src.verbs += typesof(/mob/Guild_Leader/verb)
src.verbs += typesof(/mob/Guild_Verbs/verb)
if(src.guild_member)
src.verbs += typesof(/mob/Guild_Verbs/verb)
if(src.guild_invite)
src.verbs += new/mob/Guild_Leader/verb/Guild_Invite()
if(src.guild_boot)
src.verbs += new/mob/Guild_Leader/verb/Guild_Boot()
if(src.guild_announce)
src.verbs += new/mob/Guild_Leader/verb/Guild_Announce()
if(src.guild_change_rank)
src.verbs += new/mob/Guild_Leader/verb/Guild_Change_Rank()
Remove_Guild_Verbs()
if(src.guild_leader)
src.verbs -= typesof(/mob/Guild_Leader/verb)
src.verbs -= typesof(/mob/Guild_Verbs/verb)
if(src.guild_co_leader)
src.verbs -= typesof(/mob/Guild_Leader/verb)
src.verbs -= typesof(/mob/Guild_Verbs/verb)
if(src.guild_member)
src.verbs -= typesof(/mob/Guild_Verbs/verb)
if(src.guild_invite)
src.verbs -= new/mob/Guild_Leader/verb/Guild_Invite()
if(src.guild_boot)
src.verbs -= new/mob/Guild_Leader/verb/Guild_Boot()
if(src.guild_announce)
src.verbs -= new/mob/Guild_Leader/verb/Guild_Announce()
if(src.guild_change_rank)
src.verbs -= new/mob/Guild_Leader/verb/Guild_Change_Rank()
Problem description:Code\Guild Attributes.dm:21:error: inconsistent indentation
You are likely mixing tab and space characters. Press control-T to show tabs in Dream Maker.