![]() |
This is an easy one :D i think - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: This is an easy one :D i think (/Thread-This-is-an-easy-one-D-i-think) Pages: 1 2 |
This is an easy one :D i think - kn4tseb - 06-13-2014 02:30 AM Guys hi again, i know you might have seen a lot of post from me in the last month xDD... im really really interested about solving some issues and learning about sphere.... this is what i want to do and this is the first time i try something like this: there are some trees in the game with T_NORMAL Type set, so i want to use one of them really similar to t_tree using lumberjacking. first at all i got the ID of the item (tree) and i modified the type from t_normal to t_tree_x then i went to typedefs and added the new t_tree_x type then i went to sphere_region and into the lumberjacking section i added this: [REGIONRESOURCE mr_tree_x] AMOUNT=2,5 REAP=i_log_x REAPAMOUNT=20 SKILL=65.0,90.0 REGEN=60*60*10 [REGIONTYPE r_tree_x t_tree_x] RESOURCES=80.0 mr_nothing RESOURCES=20.0 mr_tree_x later on i went to terrains at sphere_types.scp and added [TYPEDEF t_tree_x] TERRAIN = IDofTerrain after that, opened the sphere_mapx.scp and in the corresponding AREA i added r_tree_x to the events so i suppose every needs are taken so i can start with the script but i got surprised when i found two similar triggers i could use. ItemTargon_Item and Targon_Item, couldnt understand the difference betweeen each other but lets say i use the second one. so i need a little help with the beggining of the script could it be something like this? [Typedef T_EVENT_TREE_X] ON=@TargON_Item IF (<type> == t_weapon_axe) && (<argo.type> == t_tree_x) // SERV.B <type> <argo> say lalalallalalal return 1 endif is everything correct? i know its not because when i tried it nothing happend ![]() but i know it will be easily fixed with you help. Thank you very much!!! RE: This is an easy one :D i think - kn4tseb - 06-13-2014 01:22 PM Ok, im almost done but i need help to figure this: how do i get the baseid of a <src.targp>? i didnt know forest type was ground so i need something like this. most trees are multis so i figure it was a good idea to identify them with their baseid but i dont know how to get if i only have <src.targp> IF (<type> == t_weapon_axe && STRMATCH(i_tree_x*,<SRC.TARGP.(need something to get the baseid here)>) Thank you Argument In/Out Description ARGN1 I If a static item was targeted, the ID of the item. i think i needed some more read xD OK so i have <hval to get the hexnumber of the item but im still thinking about how to join it to the <src.targp> reference given by this trigger ![]() RE: This is an easy one :D i think - Coruja - 06-13-2014 02:44 PM I dont know if you will get the tree info or really the terrain (probably grass) but you can try SRC.TARGP.TYPE or SRC.TARGP.TERRAIN RE: This is an easy one :D i think - XuN - 06-13-2014 08:07 PM I don't really get what do you want, but did you try @ResourceGather ? RE: This is an easy one :D i think - kn4tseb - 06-13-2014 11:58 PM yew tree has a t_normal type set by default, i want to gather a new resource from it, thats all the resource would be i_log_yew and would be using an axe just exactly as a normal t_tree's taking lumberjacking skill, same anim, same sound, thats pretty much it RE: This is an easy one :D i think - kn4tseb - 06-14-2014 03:08 AM EDIT! PHP Code: ON=@TargON_ground OKEY OKEY, it's done ![]() RE: This is an easy one :D i think - XuN - 06-14-2014 04:02 AM Is that code really working? You are missing one ENDIF inside the FOR loop, the for loop is not needed anyways: Code: ON=@TargOn_Ground RE: This is an easy one :D i think - kn4tseb - 06-14-2014 04:58 AM PHP Code: ON=@TargON_ground my bad at copy paste xD ohhh you are right, not really needed but both should work right? i like For 's loops xDD im trying to learn how to use them :> RE: This is an easy one :D i think - Mordaunt - 06-14-2014 05:33 AM The search button is your friend.... http://forum.spherecommunity.net/Thread-Lumberjacking-log-types-based-on-the-type-of-tree RE: This is an easy one :D i think - kn4tseb - 06-14-2014 05:48 AM WOW xddd believe me i use the search button like 100 times every day xd |