SphereCommunity
Party Functions - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Party Functions (/Thread-Party-Functions)



Party Functions - Extreme - 10-02-2012 05:47 AM

Here is a thread to everyone post your party functions to work with the sphere default functions.

PHP Code:
[FUNCTION F_ISSAMEPARTY// <I>.F_ISSAMEPARTY <REF2>
IF !<ARGS> || !<SERV.UID.<ARGS>>
 RETURN 
0
ENDIF
REF2 <ARGS>
IF !<
ISINPARTY> || !<REF2.ISINPARTY>
 RETURN 
0
ENDIF
FOR 
M 0 <EVAL <PARTY.MEMBERS>-1>
 IF <
PARTY.MEMBER.<dLOCAL.M>.UID> == <REF2>
  RETURN 
1
 
ENDIF
ENDFOR
RETURN 
0

////////////////////////////////////////////////////////////////////////////////

[FUNCTION F_PARTY_SYSMESSAGE// <I>.F_PARTY_SYSMESSAGE <ARGS>
IF !<ARGS> || !<ISINPARTY>
 RETURN 
1
ENDIF
REF1 <UID>
FOR 
M 0 <EVAL <PARTY.MEMBERS>-1>
 
REF2 <PARTY.MEMBER.<dLOCAL.M>.UID>
 
REF2.SYSMESSAGE @044,,[PARTY][<REF1.NAME>]: <ARGS>
ENDFOR
RETURN 




RE: Party Functions - Lazarus - 10-03-2012 04:03 AM

You can do something with that, when you are in party, if you kill your friend you become PK?

Sometimes happends too when you click PARTY CAN LOOT ME...

Shock


RE: Party Functions - Mordaunt - 10-03-2012 05:06 AM

ISSAMEPARTYAS does actually work you just have to use it right, which was my issue when trying to work it out.

Code:
IF (<PARTY.ISSAMEPARTYOF.<src.uid>>)

works fine.
And now I know how to find if people are in the same party, my evil plan will be hatched!


RE: Party Functions - Extreme - 10-03-2012 06:49 AM

<PARTY.ISSAMEPARTYOF <ARGS>>
Returns if <I> is in same party of <ARGS>
BUT, is <I> isn't in party, the function don't work, returning Invalid Set.