Jump to content
  • 0

Question: How can I edit the skill scripts?


Orgasmator

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   0
  • Joined:  06/17/12
  • Last Seen:  

I want to add bonus effects to Soul Linker's Spirit Skills.

+%150 Double Strafe for Rouge Spirit for example.

Can anyone help me about that? It's blowing my mind. I've searched around in skill.c at src files but src files' scripts are a lot harder to understand/edit.

I've tried making a bard spirit talisman such as:

20509,·Î¶Ç08,Spirit Of Artist,2,2,,10,,,,,0x00080000,7,2,,,,,1223,{ bonus bDex,10; bonus bLongAtkRate,150; skilleffect "SL_BARDDANCER",0; sc_start4 SC_SPIRIT,350000,5,455,0,0; },{},{}

but it's not working like that. It uses the Link but additional Dex+ 10 and Long Range Attack %150 is not used.

Thanks in advance.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  137
  • Reputation:   23
  • Joined:  06/08/12
  • Last Seen:  

I think there is an if(skilleffect(SL_BARDDANCER)==1) or something like that x_X

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

It's best to just do it in source.

Add to src\map\battle.c (line 2546):

 case AC_DOUBLE:
   if(sc && sc->data[sC_SPIRIT] &&
     sc->data[sC_SPIRIT]->val2 == SL_ROGUE)
   ATK_ADDRATE(150);
   break;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   0
  • Joined:  06/17/12
  • Last Seen:  

It's best to just do it in source.

Add to src\map\battle.c (line 2546):

 case AC_DOUBLE:
if(sc && sc->data[sC_SPIRIT] &&
  sc->data[sC_SPIRIT]->val2 == SL_ROGUE)
ATK_ADDRATE(150);
break;

I'll try that but I need a few more spirits to be edited. I'm afraid I don't know most of the c++ syntax. I'll try to edit tho. Is there anyway that I can use it simplier? Like with talismans?

Tried it as

if(skilleffect(SL_BARDDANCER)==1) {bonus bDex,10; bonus bLongAtkRate,150; }

at the end of the script. Got error, saying:

parse_callfunc: not enough arguments, expected ','
*  176 : { skilleffect "SL_BARDDANCER",0; sc_start4 SC_SPIRIT,350000,5,455,0,0;
if(skilleffect(SL_BARDDANCER')'==1) {bonus bDex,10; bonus bLongAtkRate,150; }} 

Edited by Orgasmator
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   10
  • Joined:  05/14/12
  • Last Seen:  

I think there is an if(skilleffect(SL_BARDDANCER)==1) or something like that x_X

'skilleffect' Casts a skill on the player without adding the effects of it. I'm pretty sure using it to detect skill effects won't work, but you can try.

Edited by _Dynosawr_
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  137
  • Reputation:   23
  • Joined:  06/08/12
  • Last Seen:  

I think there is an if(skilleffect(SL_BARDDANCER)==1) or something like that x_X

'skilleffect' Casts a skill on the player without adding the effects of it. It can't be used to detect them. (Which sucks.)

Oh thanks for this information^^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   0
  • Joined:  06/17/12
  • Last Seen:  

Ok I guess I solved it with the item_db2.txt script. I made it a usable healing item instead of usable/other. As Dynosawr stated;

'skilleffect' Casts a skill on the player without adding the effects of it. I'm pretty sure using it to detect skill effects won't work

So I removed the "use skill (Soul Link)" part and added my bonus effects normally. It works like a charm now. I just realized I need the actual Spirit skill also because it gives extra stuff like "Able to walk while casting a song skill". Here's the script without using the actual skill.

20509,·Î¶Ç08,Spirit Of Artist,0,2,,10,,,,,0x00080000,7,2,,,,,1223,{ skilleffect "SL_BARDDANCER",0; bonus bDex,10; bonus bLongAtkRate,150;},{},{}

My only problem now, is that actual skill of Soul Linkers won't work as talismans do. Soul Linkers are now kind of useless when Linking, which is pretty funny.

I'm still open to suggestions about src/map/battle.c editing. Or else, I can request the link scripts so anyone can write it for me?

Thank you guys anyways!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

I've never tried it myself, but you can try reading statuses with getstatus:

*getstatus <effect type>{,<type>};
Retrieve information about a specific status effect when called. Depending on <type>
specified the function will return different information.
Possible <type> values:
- 0 or undefined: whether the status is active
- 1: the val1 of the status
- 2: the val2 of the status
- 3: the val3 of the status
- 4: the val4 of the status
- 5: the amount of time in milliseconds that the status has remaining
If <type> is not defined or is set to 0, then the script function will either
return 1 if the status is active, or 0 if the status is not active. If the status
is not active when any of the <type> fields are provided, this script function
will always return 0.

As for linking, you could have your item call a function that casts a link based on class.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   0
  • Joined:  06/17/12
  • Last Seen:  

Well, I guess I'm going to stick with the talismans for a while. Thank you Luphy, I appreciate your help.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  07/09/12
  • Last Seen:  

I'd like to know the answer also! Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...