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-nmm6 (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-nmm6 (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-nmm6 (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
differencing races?
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #21
RE: differencing races?
i thought about that, couldnt question a XuN quickly writed script xD... ill try Smile


ok, works fine against different.....

but as a human i summon another human, like an actor for example... and if i set it to (<race>)==(<src.race>) it doesnt do anything
but if i set it to not equal it does it, like if we have different bodies...
i .info me and it says body c_man.... so i dont understand...


i might think those vendors actually doesnt have the same obody? Confused

EDIT: yep.. works fine except when races are the same... at less vs NPC it assumes that they have not the same obody than me Confused
(This post was last modified: 06-11-2014 02:42 PM by kn4tseb.)
06-11-2014 01:45 PM
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: #22
RE: differencing races?
...
(<race>)==(<src.race>)
...
(<race> == <src.race>)

IF (<OBODY> == C_MAN) || (<OBODY> == C_WOMAN)

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.
06-12-2014 12:41 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #23
RE: differencing races?
tryed both ways:
if (<RACE> != <SRC.RACE>)
and if (<RACE>) != (<SRC.RACE>)

nothing changes... still taking c_man or c_woman as a different body than mine.
dunno what im missing but its the only thing left to finish the script.

ON=@Hit
If (<WEAPON> && <WEAPON.TYPE> != T_WEAPON_BOW)
IF (!<ARGO.TWOHANDS>)
if (<RACE>) != (<SRC.RACE>)
SERV.B MY NAME IS <name>
endif
endif
endif

[FUNCTION RACE]
IF (<OBODY> == C_MAN) || (<OBODY> == C_WOMAN)
RETURN 1
ELIF (<OBODY> == C_ELF_MALE) || (<OBODY> == C_ELF_FEMALE)
RETURN 2
ELIF (<OBODY> == C_GARGOYLE_MALE) || (<OBODY> == C_GARGOYLE_FEMALE)
RETURN 3
ELSE
RETURN -1
ENDIF
(This post was last modified: 06-12-2014 05:25 AM by kn4tseb.)
06-12-2014 05:02 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #24
RE: differencing races?
(06-12-2014 05:02 AM)kn4tseb Wrote:  tryed both ways:
if (<RACE> != <SRC.RACE>)
and if (<RACE>) != (<SRC.RACE>)

nothing changes... still taking c_man or c_woman as a different body than mine.
dunno what im missing but its the only thing left to finish the script.

ON=@Hit
If (<WEAPON> && <WEAPON.TYPE> != T_WEAPON_BOW)
IF (!<ARGO.TWOHANDS>)
if (<RACE>) != (<SRC.RACE>)
SERV.B MY NAME IS <name>
endif
endif
endif

[FUNCTION RACE]
IF (<OBODY> == C_MAN) || (<OBODY> == C_WOMAN)
RETURN 1
ELIF (<OBODY> == C_ELF_MALE) || (<OBODY> == C_ELF_FEMALE)
RETURN 2
ELIF (<OBODY> == C_GARGOYLE_MALE) || (<OBODY> == C_GARGOYLE_FEMALE)
RETURN 3
ELSE
RETURN -1
ENDIF

Try this way
Code:
If (<WEAPON>) && (<WEAPON.TYPE> != T_WEAPON_BOW)
   IF (!<ARGO.TWOHANDS>)
       if (<RACE <uid>>) != (<RACE <src>>)
       SERV.B MY NAME IS  <name>
       endif
   endif
endif

[FUNCTION RACE]
ref1=<args> //
IF (<ref1.OBODY> == C_MAN) || (<ref1.OBODY> == C_WOMAN)
RETURN 1
ELIF (<ref1.OBODY> == C_ELF_MALE) || (<ref1.OBODY> == C_ELF_FEMALE)
RETURN 2
ELIF (<ref1.OBODY> == C_GARGOYLE_MALE) || (<ref1.OBODY> == C_GARGOYLE_FEMALE)
RETURN 3
ELSE
RETURN -1
ENDIF
06-12-2014 05:32 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: #25
RE: differencing races?
(06-11-2014 09:49 AM)Extreme Wrote:  
PHP Code:
If (<ARGO.WEAPON>) && (<ARGO.WEAPON.TYPE> != T_WEAPON_BOW)
 IF (!<
ARGO.TWOHANDS>)
  IF (<
RACE> != <SRC.RACE>)
   IF (<<
ARGO.SKILL>> >= 60.0)
    
SERV.B HELLO
   
ENDIF
  ENDIF
 ENDIF
ENDIF 

(06-11-2014 01:43 PM)Extreme Wrote:  Okay, one tip: when comparing things, if you have more than one condition, you should use () on each condition.

Here you go:
PHP Code:
[FUNCTION RACE]
IF (<
OBODY> == C_MAN) || (<OBODY> == C_WOMAN)
 RETURN 
1
ELIF 
(<OBODY> == C_ELF_MALE) || (<OBODY> == C_ELF_FEMALE)
 RETURN 
2
ELIF 
(<OBODY> == C_GARGOYLE_MALE) || (<OBODY> == C_GARGOYLE_FEMALE)
 RETURN 
3
ELSE
 RETURN -
1
ENDIF 

I'm done here.

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.
(This post was last modified: 06-12-2014 05:54 AM by Extreme.)
06-12-2014 05:53 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #26
RE: differencing races?
(06-12-2014 05:32 AM)darksun84 Wrote:  
(06-12-2014 05:02 AM)kn4tseb Wrote:  tryed both ways:
if (<RACE> != <SRC.RACE>)
and if (<RACE>) != (<SRC.RACE>)

nothing changes... still taking c_man or c_woman as a different body than mine.
dunno what im missing but its the only thing left to finish the script.

ON=@Hit
If (<WEAPON> && <WEAPON.TYPE> != T_WEAPON_BOW)
IF (!<ARGO.TWOHANDS>)
if (<RACE>) != (<SRC.RACE>)
SERV.B MY NAME IS <name>
endif
endif
endif

[FUNCTION RACE]
IF (<OBODY> == C_MAN) || (<OBODY> == C_WOMAN)
RETURN 1
ELIF (<OBODY> == C_ELF_MALE) || (<OBODY> == C_ELF_FEMALE)
RETURN 2
ELIF (<OBODY> == C_GARGOYLE_MALE) || (<OBODY> == C_GARGOYLE_FEMALE)
RETURN 3
ELSE
RETURN -1
ENDIF

Try this way
Code:
If (<WEAPON>) && (<WEAPON.TYPE> != T_WEAPON_BOW)
   IF (!<ARGO.TWOHANDS>)
       if (<RACE <uid>>) != (<RACE <src>>)
       SERV.B MY NAME IS  <name>
       endif
   endif
endif

[FUNCTION RACE]
ref1=<args> //
IF (<ref1.OBODY> == C_MAN) || (<ref1.OBODY> == C_WOMAN)
RETURN 1
ELIF (<ref1.OBODY> == C_ELF_MALE) || (<ref1.OBODY> == C_ELF_FEMALE)
RETURN 2
ELIF (<ref1.OBODY> == C_GARGOYLE_MALE) || (<ref1.OBODY> == C_GARGOYLE_FEMALE)
RETURN 3
ELSE
RETURN -1
ENDIF

exactly the same, work against different races, but when i try it against a c_man or c_woman playing as a human race char
it acts like they had different obodies... so there was no difference. Sad. could it be something wrong with my server? xdd
06-12-2014 07:51 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: #27
RE: differencing races?
<SEX 0/1>
0 is male, 1 is female

If this don't work, use this function:
PHP Code:
[FUNCTION GENDER]
IF (<
OBODY> == C_MAN) || (<OBODY> == C_ELF_MALE) || (<OBODY> == C_GARGOYLE_MALE)
 RETURN 
0
ELIF 
(<OBODY> == C_WOMAN) || (<OBODY> == C_ELF_FEMALE) || (<OBODY> == C_GARGOYLE_FEMALE)
 RETURN 
1
ENDIF 

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.
06-12-2014 08:20 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #28
RE: differencing races?
i ll try but i dont understand, you want me to check if this work with genders?

got this error: ERROR:(sphere_item_events_misc.scp,22)Undefined symbol ''

line 22 is: if (<gender>) != (<SRC.gender>)


EDIT: HOLD ON, ill try it again
(This post was last modified: 06-12-2014 08:36 AM by kn4tseb.)
06-12-2014 08:26 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: #29
RE: differencing races?
exactly the same, work against different races, but when i try it against a c_man or c_woman playing as a human race char

C_MAN and C_WOMAN are HUMAN.
If you want to differ them, you have to check their gender.

I really don't understand a fuck you want.

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.
(This post was last modified: 06-12-2014 08:35 AM by Extreme.)
06-12-2014 08:33 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #30
RE: differencing races?
easy man....

this is what i want, when chars with same RACE (i dont mind about sex) fight each other, SAY HELLO
when chars with different races (i dont mind about the sex) fight each other, then SAY BYE!
thats it.


I have tried with all functions, no matter what race (obody) i am, it always takes the other character as a different obody.

so IF (<RACE> == <SRC.RACE>) is NEVER TRUE because they are always NON EQUAL OBODIES even if they are.... thats the problem.
(This post was last modified: 06-12-2014 08:48 AM by kn4tseb.)
06-12-2014 08:42 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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