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) |
differencing races? - kn4tseb - 06-09-2014 07:27 AM Is there a way to check if players race are equal or different between each other? second question... might sound really noob but i ll ask it either way. how can i get the type of an item under a FOR loop? example: typedefs t_weapon_mace_smith 11 // t_weapon_mace_sharp 12 // t_weapon_sword 13 t_weapon_fence 14 ON=@Hit for x 11 14 local.weapon = <argo.<dlocal.x>???????????????? ty RE: differencing races? - XuN - 06-09-2014 05:28 PM How are you defining the 'races'? Code: if (<race>==<src.race>) RE: differencing races? - Alaric - 06-09-2014 09:21 PM What about 'obody' to avoid functionality while morf. RE: differencing races? - kn4tseb - 06-10-2014 02:56 AM thank you both, think obody is what ill use, might be not a bad feature to check if obody of a player is != to otherones, so there would be no need of all those conditions.. Btw, what's the best way to get the type of weapons excluding t_bow, using a @hit trigger? i would reallty like to know how to get types, maybe with findlayer(1).x or STRMATCH(*WEAPON*,<ARGO.TYPE>)..... something like that, would you help me plz? ----------- something like and better than: IF ((<findlayer.layer_hand1.type> && STRMATCH(*WEAPON*,<ARGO.TYPE>) || (<findlayer.layer_hand2.type> && STRMATCH(*WEAPON*,<ARGO.TYPE>) && <argo.type>!=t_weapon_bow)) t_weapon_bow uses layer(2), right? RE: differencing races? - darksun84 - 06-10-2014 03:14 AM <weapon.type> RE: differencing races? - kn4tseb - 06-10-2014 05:26 AM (06-09-2014 05:28 PM)XuN Wrote: How are you defining the 'races'? The fact that a function returns (return 1) a value, would it alter the original behavior of a @trigger? which on this case would be @hit ??? @hit "Return 1 Cancels the combat swing." RE: differencing races? - Extreme - 06-10-2014 05:42 AM Tell us what you want to do, whats the objective. You want to cancel the hit if the player is using bow? RE: differencing races? - XuN - 06-10-2014 06:55 AM Using a function returning a value inside a trigger will not stop the trigger, imagine the hardcoded function <NAME> as this Code: [FUNCTION NAME] Every function returns a value, but this value will represente the called function and will not alter the trigger/function's behaviour. Code: ON=@Any_Trigger RE: differencing races? - kn4tseb - 06-10-2014 10:21 AM Perfectly understoood and my last question for today, it is not a MAJOR need but will help me to understand better a lot of things: having in mind that types have a number which reference them like the fallowing. t_weapon_mace_smith 11 t_weapon_mace_sharp 12 t_weapon_sword 13 t_weapon_fence 14 if i want to make an intance that checks only those types, would you give me a 2 lines example for this? in the case i want to check weapon types with the exception of bows so. ON=@Hit for x 11 14 local.anyname = <HOWdo.<dlocal.x>.iGetTheType>??? thanks! PD: XuN, would you share with me fhe formula for anatomy+tactics+lumberjaking (in case of using axe) bonus hits? thank you. RE: differencing races? - Extreme - 06-10-2014 02:46 PM If <WEAPON> && <WEAPON.TYPE> != T_WEAPON_BOW |