Jump to content
  • 0

Is it possible to have a custom skill that uses an @command?


michaelsoftman

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

For example, if I wanted to give SG's a skill to reset their own hatred / feelings, would it be possible to do? I have the actual reset commands coded as actual @commands. But if I wanted to have this command activated by using a skill, would it be possible?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

If you are adding a custom skill for hatred reset, you can just uses this as skill effect:

pc_resethate(sd);
sd->hate_mob[i] = -1;
pc_setglobalreg(sd,sg_info[i].hate_var,0);

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

Oh sweet. Thanks a lot.

But as for my original question, if I were to add a different @command, any of them, to a skill, would it be possible to do so? Or would I end up just copying the code, making it kinda redundant?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

possible but bad pratice, better do it like darristan said.

If you thinking of atcommand like an interface it would be strange to use skill then go at_command then end skill.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

possible but bad practice, better do like darristan said.
omg your engrish @_@

though you can try something like OnPCUseSkillEvent

and just like lighta said, using atcommand or script commands for activating skills is bad practice

( I also mentioned it in that post )

but this is 1 of the easier method to get the job done

( which I also mentioned it ... mainly use for event purposes )

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

xd oups that was the keyboard escaping from me hand, and switching over 20+ time a day to qwerty azerty ><.

@Annie the event may be usefull for easier change and reloading purpose, but this will restrain the skill usage for player. (at least with current implementation).

But I think he was thinking of a player skill anyway since he tough about atcommand, all depend on requirements. (Simple reminder)

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...