82558223 Posted April 8, 2018 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 3 Reputation: 0 Joined: 09/01/15 Last Seen: December 12, 2023 Share Posted April 8, 2018 (edited) hello every body,I have an idea that make an emotion trigger. the npc like this: OnInit: defpattern 1, "([^:]+):.*\\s123.*", "talk"; activatepset 1; end; talk: npcskill "AB_HIGHNESSHEAL",100,130,175; percentheal 0,100; I want to use emotion "help" instead of text "123". So,how to make it..please.. Edited April 8, 2018 by 82558223 Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted April 8, 2018 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: April 15 Share Posted April 8, 2018 Replace the regex with a pattern that will check for the word help. There are hundreds of guides on the Internet that can give you regex patterns. Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 8, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 8, 2018 (edited) wrong answer @Akkarin he wants the npc script to trigger with emotion -> not by typing "help" this particular topic makes me interested ... its been a while since I do source modifications BUILDIN_FUNC(emote_event) { int type = script_getnum(st,2); const char* event = NULL; TBL_PC *sd; if ( !script_rid2sd(sd) ) return SCRIPT_CMD_SUCCESS; if ( type < ET_SURPRISE || type >= ET_MAX ) { ShowWarning( "buildin_emotion: Unknown emotion %d (min=%d, max=%d).\n", type, ET_SURPRISE, (ET_MAX-1) ); return SCRIPT_CMD_FAILURE; } if ( script_hasdata(st,3) ) { event = script_getstr(st,3); check_event(st, event); } ShowDebug( "%s using emotion %d wanting to trigger '%s'", sd->status.name, type, event ); return SCRIPT_CMD_SUCCESS; } // next step ... need to hook clif_parse_Emotion function ... erm ... this is not hercules LOL !!! hahaha ... totally forgotten this is rathena forum !! (damn stayed at hercules too long) ok I give up, if this member interested in switching to hercules than I might be interested to write a plugin EDIT: I just leave the steps here, just anyone interested in doing so ... after this, need to edit clif.cpp file, find clif_parse_Emotion, if the emoticon == ET_HELP, check if the player is in range with npc (see npc.cpp file ... didn't go in-depth yet) ... if so then trigger the said event label (hardcoded-event label -> not using the script command version yet) then ... hmm need to make the server remember all the emote_event script commands event labels... save them in an array or something ... then change the hardcoded event label to trigger with the saved loop ... well, quite a big modification if you ask me ... or maybe I'm just still noob in source coding, maybe there are better ways to do this edit to below -> yup that's why I said I leave the steps here, I'm with the hercules anyways surely some member here can finish this modification ................ if they are bored ... like me ~ Edited April 8, 2018 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted April 8, 2018 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: April 15 Share Posted April 8, 2018 35 minutes ago, AnnieRuru said: wrong answer @Akkarin he wants the npc script to trigger with emotion -> not by typing "help" I miss-read, that'll teach me to read the forums as soon as i wake up! 35 minutes ago, AnnieRuru said: if this member interested in switching to hercules than I might be interested to write a plugin There's no sense in switching to an emulator with less official content just to have a plugin written On a side note: You won't get tagged for Annie Ruru anymore, that account was banned a long time ago so I've removed it. Now you can have all of the @AnnieRuru tags 1 Quote Link to comment Share on other sites More sharing options...
Question
82558223
hello every body,I have an idea that make an emotion trigger.
the npc like this:
OnInit:
defpattern 1, "([^:]+):.*\\s123.*", "talk";
activatepset 1;
end;
talk:
npcskill "AB_HIGHNESSHEAL",100,130,175;
percentheal 0,100;
I want to use emotion "help" instead of text "123".
So,how to make it..please..
Edited by 82558223Link to comment
Share on other sites
3 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.