Well, I'm trying to put some voiceovers when using a skill, but do not quite understand the source, then come to you asking for help.
Let me give an example:
When a player uses the skill StormGust, while a sound to play the data folder on the client.
I thought of four ways:
1st - When the player the ability to use a script (NPC) was executed with the command to run the SOM. In the source there is a command that calls a script. Something like this:
struct npc_data* nd;
nullpo_retr(-1, sd);
switch(atoi(message)){
case 1: nd = npc_name2id("CodeBuff"); break;
case 2: nd = npc_name2id("CodeAnun"); break;
case 3: nd = npc_name2id("CodeQuest"); break;
case 4: nd = npc_name2id("CodeSom"); break;
}
if (nd == NULL){
clif_displaymessage(fd,"...");
return -1;
}
run_script(nd->u.scr.script, 0, sd->bl.id, nd->bl.id);
return 0;
}
(I took this from a custom command, which when used, runs one of the scripts)
I do not know if you can use it in the structure of ability.
2nd - If, in any command that runs directly from a source media file.
3rd - A command similar to "OnPCKillEvent" but instead of running the code to kill, execute a code where when someone used a skill, perform the function. Something like: "OnSkillUsed."
4th - Create a new effect with the sound, but how?
Well I'm sorry my English. I used Google translate.
Question
Arkwright
Well, I'm trying to put some voiceovers when using a skill, but do not quite understand the source, then come to you asking for help.
Let me give an example:
When a player uses the skill StormGust, while a sound to play the data folder on the client.
I thought of four ways:
1st - When the player the ability to use a script (NPC) was executed with the command to run the SOM. In the source there is a command that calls a script. Something like this:
(I took this from a custom command, which when used, runs one of the scripts)
I do not know if you can use it in the structure of ability.
2nd - If, in any command that runs directly from a source media file.
3rd - A command similar to "OnPCKillEvent" but instead of running the code to kill, execute a code where when someone used a skill, perform the function. Something like: "OnSkillUsed."
4th - Create a new effect with the sound, but how?
Well I'm sorry my English. I used Google translate.
I'll be super grateful if someone help me. hugs.
Edited by Evanio0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.