Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
3 flags question
|
Author |
Message |
RanXerox
Master
Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19
|
RE: 3 flags question
What is your definition of "pk"?
You can see if someone is a permanent criminal (i.e. a criminal to everyone) by checking flags for "statf_criminal"... but it is also possible to be a criminal only to your victim (or a witness) and not everyone. That kind of criminal information is stored in a memory item on the victim (or the witness) and can be identified by a memory flag of type "memory_sawcrime".
I think you can determine a character alignment (order, neutral, or chaos) using the ALIGN function... for example:
Code:
if <SRC.ALIGN>==1
SRC.SAY "I am aligned with Chaos!"
endif
...although that might be a property of the guildstone, not the character... I can't recall.
If it is a property of the guild or town stone... you can find the stone and check it by looking for a "memory_guild" and/or "memory_town" item on the character and following the LINK.
(This post was last modified: 08-31-2012 04:59 AM by RanXerox.)
|
|
08-31-2012 04:54 AM |
|
|
daedelus
Journeyman
Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0
|
RE: 3 flags question
Code:
//CHEQUEO SI SOS CRIMI, PK O TENES KARMA NEGATIVA, TE HACES CRIMI.
IF (<SRC.TARG> == (<SRC>) //if cure myself don't applied de condition
ELSE
IF (<SRC.TARG.FLAGS>&statf_criminal) || (<SRC.TARG.KILLS> >= 3 ) || (<SRC.TARG.KARMA> <= -2000 )
SRC.CRIMINAL = 1
SRC.UPDATE
SRC.SYSMESSAGE Criminal!
SRC.SYSMESSAGE @07d1 Has curado a un bandido!, ahora eres un criminal!
RETURN 1
ENDIF
ENDIF
//Check allign, if you are order and cure a chaos, you criminal
IF (<SRC.TARG> == (<SRC>)
ELSE
IF ((<SRC.ALIGN == 2>) && (<SRC.TARG.ALIGN> == 1)) || ((<SRC.ALIGN> == 1) && (<SRC.TARG.ALIGN> == 2))
SRC.CRIMINAL = 1
SRC.UPDATE
SRC.SYSMESSAGE Criminal!
SRC.SYSMESSAGE @07d1 Has curado a un enemigo!, ahora eres un criminal!
RETURN 1
ENDIF
ENDIF
Code:
IF (<SRC.TARG> == (<SRC>) // if cure myself don't applied de condition, i think necesary.
I not check the second code, but the script is ok? or Do you suggest me to do another something?
The first one code works.
Thanks
(This post was last modified: 09-01-2012 03:55 AM by daedelus.)
|
|
09-01-2012 03:50 AM |
|
|
daedelus
Journeyman
Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0
|
RE: 3 flags question
(09-01-2012 01:50 PM)RanXerox Wrote: Difficult to say whether it is right or wrong... but I would caution against directly setting SRC.CRIMINAL because it is permanent and very negative to the individual because they will be unable to enter any guarded town without running the risk of guards killing them.
Code:
//CHEQUEO SI SOS ORDER O CHAOS Y LO CURAS AL ENEMIGO TE HACES CRIMI
IF ((<UID.<SRC.GUILD>.ALIGN> == 1) && (<UID.<SRC.GUILD>.ALIGN> == 2)) || ((<UID.<SRC.GUILD>.ALIGN> == 2) && (<UID.<SRC.GUILD>.ALIGN> == 1))
SRC.CRIMINAL = 1
SRC.UPDATE
SRC.SYSMESSAGE Criminal!
SRC.SYSMESSAGE @07d1 Has curado a un enemigo!, ahora eres un criminal!
RETURN 1
ENDIF
This works. Exactly, if you cure with bandages an enemy you are a criminal.
|
|
09-03-2012 09:50 PM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
|
09-04-2012 04:53 AM |
|
|
daedelus
Journeyman
Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0
|
RE: 3 flags question
I saw the errors, i think.:
Code:
//CHEQUEO SI SOS ORDER O CHAOS Y LO CURAS AL ENEMIGO TE HACES CRIMI
IF ((<UID.<SRC.GUILD>.ALIGN> == 1) && (<UID.<SRC.TARG.GUILD>.ALIGN> == 2)) || ((<UID.<SRC.GUILD>.ALIGN> == 2) && (<UID.<SRC.TARG.GUILD>.ALIGN> == 1))
SRC.CRIMINAL = 1
SRC.UPDATE
SRC.SYSMESSAGE Criminal!
SRC.SYSMESSAGE @07d1 Has curado a un enemigo!, ahora eres un criminal!
RETURN 1
ENDIF
RanXeroX Wrote:My point is that using that solution, you are a criminal forever... Heal an opposing guild member, now you are a criminal, quit your guild and join theirs... still criminal. When you are a criminal, you can not enter any guarded town without risking death.
The criminal timer is 5 by sphere.ini , after that time, criminal flaggs disappear.
I like this.
(This post was last modified: 09-05-2012 10:15 PM by daedelus.)
|
|
09-05-2012 10:08 PM |
|
|
User(s) browsing this thread: 5 Guest(s)