![]() |
races bodies - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: races bodies (/Thread-races-bodies) |
RE: races bodies - XuN - 09-07-2015 05:17 PM If you change your stats before applying the event, the event will not fire because stats were already changed before. So move that SRC.EVENTS +e_statss before SRC.STR=15 RE: races bodies - Osirirs - 09-07-2015 09:40 PM Now that I removed the function and put the event on top of str, its just not working at all o.O hmmmm I did add src to the event, I dont think I have to, right ? [EVENTS e_statss] IF <argn1>==0 src.Maxhits=<eval <argn3>*10> Should it just be maxhits without the src cause the event already affects the player, and the src can change ? IF <argn1>==0 maxhits=<eval <argn3>*10> EDIT: Oh well I just tried and it aint changing the stats :/ I add stats with my level up menu, but the maxhits never follows ![]() RE: races bodies - pointhz - 09-08-2015 12:19 AM Add this to your event, between each ELIF: Serv.log <argn1> <argn2> <argn3>, <maxhits>, <eval <ARGN3>*10> // or maxstam or maxmana Then check the sphere console to see whats going on. Which function isnt what it was supposed to be. How do you add the stats? Where is your level up menu called from? An item or a function? RE: races bodies - Osirirs - 09-08-2015 12:33 AM Okay so yes I use a stone I've been testing everything with the dwarf race, so here's the dwarf selection menu: Code: [DIALOG d_dwarfr] This is the event I'm trying to make happen, so the hp,mana,stam values go ten times the base stats: Code: [Events e_statss] And then, every levelup, I get stat points and add either str,int or dex. See the attached picture ![]() [attachment=306] Okay so I tried it like this but absolutely nothing happened :/ Code: [Events e_statss] RE: races bodies - pointhz - 09-08-2015 12:46 AM Nothing on console? But your stats change right? Type .show events on your character and see if you have the e_statss. If yes, then maybe the problem is the trigger RE: races bodies - Osirirs - 09-08-2015 12:49 AM Yes I do have the event, I've been checking it over and over again to see if I had made a mistake somewhere but it always shows the e_statss event in the .show events ![]() My stats change according to the one written on the dwarf race selection, I could put the stats the way I want to too with src.maxhits=<eval <src.str>*10> But then when I upgrade my stats they don't follow. Everything I did with @StatChange hasn't worked yet ![]() Unless I have an older version of sphere but last time I checked it was fine. Yes I do have 56b haha xD RE: races bodies - pointhz - 09-08-2015 12:57 AM Add a return 1 at the end of the @statchange, after the endif. Then change your stats with the dward menu and see if they change. Or do something else just to see if the trigger works, like src.sysmessage stat changed Anyway, if players raise their stats through a dialog, why dont you add the maxhits line there too? For example: ON=1 Src.str += 1 Src.maxhits +=10 If players dont earn stats "normally" then you dont need an event for statchange at all RE: races bodies - azmanomer - 09-08-2015 01:14 AM then just do something like that [DIALOG d_dwarfr button] ON=1 // Okay // f_gender1 SRC.EVENTS +e_statss SRC.STR=15 src.maxhits += 150 SRC.DEX=5 src.maxstam += 50 SRC.INT=8 src.maxmana +=80 SRC.UPDATE RE: races bodies - Osirirs - 09-08-2015 01:18 AM Okay I think their might be something with the trigger, I tried with an On=@Click trigger saying Event and when I click myself it works fine. [Events e_statss] On=@Click SAY Event! On=@StatChange IF <argn1>==0 maxhits = <eval <argn3>*10> Serv.log <argn1> <argn2> <argn3>, <maxhits>, <eval <ARGN3>*10> SYSMESSAGE Stat Changed ELIF <argn1>==1 // 1 is value for intelligence maxmana = <eval <argn3>*10> Serv.log <argn1> <argn2> <argn3>, <maxmana>, <eval <ARGN3>*10> ELIF <argn1>==2 // 2 for Dexterity maxstam = <eval <argn3>*10> Serv.log <argn1> <argn2> <argn3>, <maxstam>, <eval <ARGN3>*10> endif Return 1 Yeah of course I thought about doinng that instead, I just wanted to have it so it affects everything just in case, but yeah I'll just do it manually. Thanks Pointhz!! RE: races bodies - pointhz - 09-08-2015 01:38 AM @statchange only fires when a stat is changed through skill gain. That's why it wasnt working. Keep the event e_statss with only: On=@statchange Return 1 That way you can be sure that players wont gain stats with skills, only through your race menu. |