SphereCommunity
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)

Pages: 1 2 3 4


RE: races bodies - pointhz - 09-04-2015 01:33 AM

You only need 1 ENDIF Osirirs.


RE: races bodies - Osirirs - 09-04-2015 10:46 AM

Okay seriously I dont see what Im doing wrong, everything I do seems to not be working. O.o
So I used what youve shown me, made an event with it, which I put in sphere. Ini under the events for all players. didnt work. I tried with a function, didnt work either.. And yet no console error. Just like my body change, so.. is it me or??

thanks Pointz Im gunna try that Now! Smile


RE: races bodies - Osirirs - 09-05-2015 05:12 AM

Hmm it doesnt work. The body just doesnt change... I tried with a function but it didnt work either Sad

EDIT: Hmmmm okay I tested it and it seems I need to relog to see the body change. Weird Shock


RE: races bodies - XuN - 09-05-2015 09:16 AM

Type .update or add it to the script, this will solve it.


RE: races bodies - Osirirs - 09-06-2015 02:26 AM

Nice !! Thanks Xun !! Its all that was missing Smile if you have any idea for the stats part it'd be great, it doesnt seem to be working :/


RE: races bodies - Artyk - 09-06-2015 04:11 AM

If what you want to do with bodies is set it to human male/female regardless from the race, but keeping the sex you can simply do:
Code:
BODY = <SEX c_man:c_woman>
OBODY = <BODY>
So you skip conditions..

For the stat thing as azmanomer already wrote you can place that formula under @StatChange
Since the trigger fires everytime a stat is changed, what he suggested is to modify the hits/mana/stam depending on what stat is currently changing.

Personally on my script i simply do this (i use other formulas, so i've adjusted them for your purposes):
Code:
I.MAXHITS = <eval <I.STR> * 10>
I.MAXMANA = <eval <I.INT> * 10>
I.MAXSTAM = <eval <I.DEX> * 10>



RE: races bodies - Osirirs - 09-06-2015 04:43 AM

Thanks Smile its just that I tried it and it didnt change anything :/ unless what I did was wrong, I created an event :
[EVENT e_statss]
ON=@STATCHANGE
//with the line amnazoner shown me.

I tested it in-game but the stats remained the same. I tried adding the event in sphere.ini, and then to my race script, didnt work either way, also tried with a f_onchar_create function but eh..
Im gunna try your way


RE: races bodies - pointhz - 09-06-2015 05:15 AM

Type ".show events" to see if you have the event on the char you are testing it with,


RE: races bodies - XuN - 09-06-2015 08:01 PM

Try the following one, but remove that return 1 because that is blocking the STR change.

(09-03-2015 11:43 AM)azmanomer Wrote:  http://wiki.sphere.torfo.org/index.php/@StatChange use this trigger for example for str;
on @statchange
if <argn1>==0
maxhits = <eval <argn3>*10>
return 1
endif



RE: races bodies - Osirirs - 09-07-2015 08:35 AM

Hey guys, first, thank you for your help Smile it's very appreciated.

Now everything seems to be working fine! excepting the stat change. :/
on the race selection the value comes right, hits 10x str, but then the stat change trigger doesnt seem to be working, when I add a stat point to str, the maxhits remains the same. here's what I got so far, a function, an event and my race selection.
Code:
[DIALOG d_dwarfr button]
ON=1
// Okay
//
f_gender1
SRC.STR=15 // so here I get 150 hp
SRC.DEX=5  //50 stam
SRC.INT=8  // 80 mana
f_statss
SRC.UPDATE
SRC.EVENTS +e_statss

[FUNCTION f_statss]
SRC.MAXHITS = <eval <SRC.STR>*10>
SRC.MAXMANA = <eval <SRC.INT>*10>
SRC.MAXSTAM = <eval <SRC.DEX>*10>

[Events e_statss]
ON=@STATCHANGE
IF <argn1>==0
    maxhits = <eval <argn3>*10>

ELIF <argn1>==1
    maxmana = <eval <argn3>*10>

ELIF <argn1>==2
    maxstam = <eval <argn3>*10>
endif

Any thought? I'm not sure why it doesnt change, everything seems to be in order.
Thanks again! Smile