javierlog08
New member
- Messages
- 86
- Points
- 0
- Github
- javierlog08
- Emulator
I had a problem like in this old Post From Rathena...
OLD rathena POST
I got the solution to solve that problem, that is usually generated after a menu choice.
Then in most of cases is imposible delete the Text after choice an item from the menu.
Seems that just append to existing npc's dialog.
So.....
I create this new function called next2, Wich cleans the old text before choice a new menu item.
trun/src/map/script.c
BUILDIN(next2){ TBL_PC* sd; int fd; sd = script->rid2sd(st); fd = sd->fd; if( sd == NULL ) return true; clif->scriptclear(sd,sd->npc_id); return true;}AND APPENDvoid script_parse_builtin(void) { struct script_function BUILDIN[] = { // NPC interaction BUILDIN_DEF(mes,"s*"), BUILDIN_DEF(next,""), BUILDIN_DEF(close,""), BUILDIN_DEF(close2,""), BUILDIN_DEF(menu,"sl*"), BUILDIN_DEF(select,"s*"), //for future jA script compatibility BUILDIN_DEF(prompt,"s*"), BUILDIN_DEF(next2,""), //Javierlog08 NEXT comand simulation without CLICK next button from client .....................................
i just append to my script next2 after choice an menu item
mes "Que nivel de jugador tienes?";if(select("Usuario Experto
rincipiante")==1) { next2; cutin "jpn_anni02",2; mes "^9933ff[Rates]^000000"; mes "^A0A0A0~Usa el comando @rates^000000"; mes "^9933ff[Cartas MVPs]^000000";
END RESULT:
OLD rathena POST
I got the solution to solve that problem, that is usually generated after a menu choice.
Then in most of cases is imposible delete the Text after choice an item from the menu.
Seems that just append to existing npc's dialog.
So.....
I create this new function called next2, Wich cleans the old text before choice a new menu item.
trun/src/map/script.c
BUILDIN(next2){ TBL_PC* sd; int fd; sd = script->rid2sd(st); fd = sd->fd; if( sd == NULL ) return true; clif->scriptclear(sd,sd->npc_id); return true;}AND APPENDvoid script_parse_builtin(void) { struct script_function BUILDIN[] = { // NPC interaction BUILDIN_DEF(mes,"s*"), BUILDIN_DEF(next,""), BUILDIN_DEF(close,""), BUILDIN_DEF(close2,""), BUILDIN_DEF(menu,"sl*"), BUILDIN_DEF(select,"s*"), //for future jA script compatibility BUILDIN_DEF(prompt,"s*"), BUILDIN_DEF(next2,""), //Javierlog08 NEXT comand simulation without CLICK next button from client .....................................
i just append to my script next2 after choice an menu item
mes "Que nivel de jugador tienes?";if(select("Usuario Experto
END RESULT:
Last edited by a moderator: