differencing races? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: differencing races? (/Thread-differencing-races) |
RE: differencing races? - kn4tseb - 06-11-2014 01:45 PM i thought about that, couldnt question a XuN quickly writed script xD... ill try 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? 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 RE: differencing races? - Extreme - 06-12-2014 12:41 AM ... (<race>)==(<src.race>) ... (<race> == <src.race>) IF (<OBODY> == C_MAN) || (<OBODY> == C_WOMAN) RE: differencing races? - kn4tseb - 06-12-2014 05:02 AM 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 RE: differencing races? - darksun84 - 06-12-2014 05:32 AM (06-12-2014 05:02 AM)kn4tseb Wrote: tryed both ways: Try this way Code: If (<WEAPON>) && (<WEAPON.TYPE> != T_WEAPON_BOW) RE: differencing races? - Extreme - 06-12-2014 05:53 AM (06-11-2014 09:49 AM)Extreme Wrote: (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. I'm done here. RE: differencing races? - kn4tseb - 06-12-2014 07:51 AM (06-12-2014 05:32 AM)darksun84 Wrote:(06-12-2014 05:02 AM)kn4tseb Wrote: tryed both ways: 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. . could it be something wrong with my server? xdd RE: differencing races? - Extreme - 06-12-2014 08:20 AM <SEX 0/1> 0 is male, 1 is female If this don't work, use this function: PHP Code: [FUNCTION GENDER] RE: differencing races? - kn4tseb - 06-12-2014 08:26 AM 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 RE: differencing races? - Extreme - 06-12-2014 08:33 AM 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. RE: differencing races? - kn4tseb - 06-12-2014 08:42 AM 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. |