The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
races bodies
Author Message
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #11
RE: races bodies
You only need 1 ENDIF Osirirs.
09-04-2015 01:33 AM
Find all posts by this user Like Post Quote this message in a reply
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #12
RE: races bodies
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
09-04-2015 10:46 AM
Find all posts by this user Like Post Quote this message in a reply
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #13
RE: races bodies
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
(This post was last modified: 09-05-2015 05:39 AM by Osirirs.)
09-05-2015 05:12 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #14
RE: races bodies
Type .update or add it to the script, this will solve it.
09-05-2015 09:16 AM
Find all posts by this user Like Post Quote this message in a reply
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #15
RE: races bodies
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 :/
09-06-2015 02:26 AM
Find all posts by this user Like Post Quote this message in a reply
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #16
RE: races bodies
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>
09-06-2015 04:11 AM
Find all posts by this user Like Post Quote this message in a reply
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #17
RE: races bodies
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
09-06-2015 04:43 AM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #18
RE: races bodies
Type ".show events" to see if you have the event on the char you are testing it with,
09-06-2015 05:15 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #19
RE: races bodies
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
09-06-2015 08:01 PM
Find all posts by this user Like Post Quote this message in a reply
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #20
RE: races bodies
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
(This post was last modified: 09-07-2015 08:44 AM by Osirirs.)
09-07-2015 08:35 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)