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

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



Post: #21
RE: races bodies
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
09-07-2015 05:17 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: #22
RE: races bodies
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 Sad
(This post was last modified: 09-07-2015 11:13 PM by Osirirs.)
09-07-2015 09:40 PM
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: #23
RE: races bodies
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?
(This post was last modified: 09-08-2015 12:38 AM by pointhz.)
09-08-2015 12:19 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: #24
RE: races bodies
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]
0,0
NOCLOSE
NODISPOSE
page 0
gumppic 176 179 11010
text 239 194 643 0
htmlgump 397 197 128 146 1 0 1
gumppic 240 214 48
text 240 321 1187 2
text 240 355 1187 3
text 240 338 1187 4
text 321 356 148 5
text 321 322 162 6
text 321 339 148 7
button 439 352 2076 2075 1 0 1
button 509 357 2224 2224 1 0 2
button 397 357 2223 248 1 0 3

[DIALOG d_dwarfr text]
Dwarves
Dwarves...Short but strong, and well reknown for their lack of agility, live (and sleep) under the mountains, endlessly digging and discovering the most wonderful treasures. It is said they are the most incredible crafters. Having their way with ores and ingots, they find greater ores and make the best equipments. (Never as good as Elves though!)
Strength
Intelligence
Dexterity
30
60
25

[DIALOG d_dwarfr button]
ON=1
// Okay
//
f_gender1
SRC.EVENTS +e_statss
SRC.STR=15
SRC.DEX=5
SRC.INT=8
SRC.UPDATE

ON=0
// Next
//
//dialog d_hobbits

ON=0
// Back
//
dialog d_humanr

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]
On=@StatChange
IF <argn1>==0
    maxhits = <eval <argn3>*10>
ELIF <argn1>==1                  // 1 is value for intelligence
    maxmana = <eval <argn3>*10>
ELIF <argn1>==2                 // 2 for Dexterity
    maxstam = <eval <argn3>*10>
endif

And then, every levelup, I get stat points and add either str,int or dex.
See the attached picture Smile
   

Okay so I tried it like this but absolutely nothing happened :/

Code:
[Events e_statss]
On=@StatChange
IF <argn1>==0
    maxhits = <eval <argn3>*10>
    Serv.log <argn1> <argn2> <argn3>, <maxhits>, <eval <ARGN3>*10>
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
(This post was last modified: 09-08-2015 12:45 AM by Osirirs.)
09-08-2015 12:33 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: #25
RE: races bodies
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
09-08-2015 12: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: #26
RE: races bodies
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 Shock
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 Shock
Unless I have an older version of sphere but last time I checked it was fine. Yes I do have 56b haha xD
(This post was last modified: 09-08-2015 12:56 AM by Osirirs.)
09-08-2015 12:49 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: #27
RE: races bodies
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
(This post was last modified: 09-08-2015 01:13 AM by pointhz.)
09-08-2015 12:57 AM
Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #28
RE: races bodies
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
09-08-2015 01:14 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: #29
RE: races bodies
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!!
(This post was last modified: 09-08-2015 01:20 AM by Osirirs.)
09-08-2015 01:18 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: #30
RE: races bodies
@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.
(This post was last modified: 09-08-2015 01:58 AM by pointhz.)
09-08-2015 01:38 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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