//****************************************************************************
//SPHERE by : Menasoft ©1997-2007
//www.sphereserver.net
// All SPHERE script files and formats are copyright Menasoft & Partners.
// This file may be freely edited for personal use, but may not be distributed
// in whole or in part, in any format without express written permission from
// Menasoft & Partners.  All donations and contributions
// become the property of Menasoft & Partners.
//****************************************************************************
// FILE LAST UPDATED: 14-March-2007
VERSION=0.56b

[TYPEDEF T_STONE_GUILD]
ON=@Click
  message "a guildstone"
  message <name> <qval (<eval strlen(<abbrev>)>) ? [<abbrev>]:>
return 1

ON=@Dclick
  If (<distance> > 2)
    src.sysmessage @038A That is too far away.
  elif (<member.count>==0)&&(!<masteruid>)	//(<masteruid>!=<src.uid>)
    f_guildsys_addchartoguild <uid>,<src.uid>,1	//auto makes the master
  elif (!<masteruid>)
    f_guildsys_addchartoguild <uid>,<member.0.uid>,1	//first candidate since any member would auto be a master
  elif (<memberfromuid.<src.uid>.uid>!=<src.uid>)&&(!<src.isgm>)// Not a member
    src.message @03B2 You are not a member of this guild! To join, ask a current member to invite you into the guild.
  elif (<memberfromuid.<src.uid>.priv> == <def0.STONEPRIV_ACCEPTED>)
    f_guildsys_addchartoguild <uid>,<src.uid>,1
  elif (<memberfromuid.<src.uid>.priv>==<def0.STONEPRIV_CANDIDATE>)&&(!<src.isgm>)
    src.message @03B2 You are awaiting acceptance by the guildmaster.
  elif (<memberfromuid.<src.uid>.priv>==<def0.STONEPRIV_MEMBER>)||(<masteruid>==<src.uid>)||(<src.isgm>)
    sdialog d_Guild_Main,0
  endif
return 1

[EOF]