This code here almost totaly works but when I invite someone, sometimes it knocks someone else in the group out of the party. Any idea why?
mob/verb/Invite(var/mob/M in oview(6))
set category = "Commands"
if(usr.Party == "")
usr.verbs -= /mob/verb/Check_Group_Status
usr.verbs -= /mob/verb/Invite
usr.verbs -= /mob/verb/Disband
usr.verbs -= /mob/verb/Leave_Group
else
if(istype(M,/mob/usr))
if(M.Party == "")
var/pcin = input(M,"[usr.name] has invited you to join his group, do you accept?")in list("Yes","No")
if(pcin == "Yes")
for(var/mob/T in world)
if(T.Party == usr.Party)
T<<"[M.name] has joined your group!"
T.Party += M.key
T.groupnum += 1
M.Party = usr.Party
M.verbs -= /mob/verb/Create_Group
M.verbs += /mob/verb/Check_Group_Status
M.verbs += /mob/verb/Leave_Group
else
usr<<"[M.name] decided not to join your group!"
else
usr<<"[M.name] is already in a group!"
ID:148145
![]() Jun 24 2003, 1:21 pm
|
|