The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3 flags question
Author Message
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #1
Question 3 flags question
Need to know what the statf of these three

If pk
if criminal (statf_iscriminal?) or whats?
if order/chaos

Thanks
08-31-2012 04:15 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
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
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #3
RE: 3 flags question
PK= Assasin 3 kills or more but i think that i can check the status with kills.

Ahh i understand, thanks RanXerox!.

Thanks.
(This post was last modified: 08-31-2012 05:00 AM by daedelus.)
08-31-2012 05:00 AM
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #4
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
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #5
RE: 3 flags question
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.
09-01-2012 01:50 PM
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #6
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
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #7
RE: 3 flags question
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.
09-04-2012 03:18 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #8
RE: 3 flags question
His 'condition' is wrong.
((<UID.<SRC.GUILD>.ALIGN> == 1) && (<UID.<SRC.GUILD>.ALIGN> == 2))
This never come true.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-04-2012 04:53 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #9
RE: 3 flags question
Indeed

How can the same person be alignment 1 & 2?

Also... it would be far shorter to run the check to ask if the target was of the same alignment as the source

[Image: 2nis46r.jpg]
09-05-2012 01:32 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #10
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
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 4 Guest(s)