ScarrFace Posted December 11, 2019 Posted December 11, 2019 any char face forward script or src working on latest version? - script kdjhfksdjf -1,{ OnPCLoginEvent: setdir DIR_SOUTH; end; } this is not working and if i use this i got error. Quote parse_line: expect command, missing function name or calling undeclared function * 4 : 's'etdir DIR_SOUTH; how to fix that ? or anyone can recommend new script or src side? thank you Quote
0 Mael Posted December 11, 2019 Posted December 11, 2019 2 hours ago, ScarrFace said: any char face forward script or src working on latest version? - script kdjhfksdjf -1,{ OnPCLoginEvent: setdir DIR_SOUTH; end; } this is not working and if i use this i got error. how to fix that ? or anyone can recommend new script or src side? thank you https://github.com/rathena/rathena/blob/master/conf/battle/client.conf#L135-L137 Quote
0 BeWan Posted December 12, 2019 Posted December 12, 2019 On 12/11/2019 at 8:15 AM, ScarrFace said: any char face forward script or src working on latest version? - script kdjhfksdjf -1,{ OnPCLoginEvent: setdir DIR_SOUTH; end; } this is not working and if i use this i got error. how to fix that ? or anyone can recommend new script or src side? thank you to solve your error you need to declare setdir first in src/script. BUILDIN_FUNC(setdir) { TBL_PC *sd; if ( script_hasdata(st,4) ) { if ( data_isstring( script_getdata(st,4) ) ) sd = map_nick2sd( script_getstr(st,4),false ); else sd = map_id2sd( script_getnum(st,4) ); } else sd = map_id2sd(st->rid); if ( sd ) { int value = 0; if ( script_hasdata(st,3) ) { value = script_getnum(st,3); if ( value < 0 || value > 2 ) value = 0; } pc_setdir( sd, script_getnum(st,2), value ); clif_changed_dir( &sd->bl, AREA ); } return SCRIPT_CMD_SUCCESS; } BUILDIN_FUNC(checkdir) { TBL_PC *sd; if ( script_hasdata(st,3) ) { if ( data_isstring( script_getdata(st,3) ) ) sd = map_nick2sd( script_getstr(st,3),false ); else sd = map_id2sd( script_getnum(st,3) ); } else sd = map_id2sd(st->rid); if ( sd ) { int value = 0; if ( script_hasdata(st,2) ) value = script_getnum(st,2); script_pushint( st, value > 0 ? sd->head_dir : sd->ud.dir ); } return SCRIPT_CMD_SUCCESS; } 1 Quote
0 ScarrFace Posted December 13, 2019 Author Posted December 13, 2019 20 hours ago, BeWan said: to solve your error you need to declare setdir first in src/script. BUILDIN_FUNC(setdir) { TBL_PC *sd; if ( script_hasdata(st,4) ) { if ( data_isstring( script_getdata(st,4) ) ) sd = map_nick2sd( script_getstr(st,4),false ); else sd = map_id2sd( script_getnum(st,4) ); } else sd = map_id2sd(st->rid); if ( sd ) { int value = 0; if ( script_hasdata(st,3) ) { value = script_getnum(st,3); if ( value < 0 || value > 2 ) value = 0; } pc_setdir( sd, script_getnum(st,2), value ); clif_changed_dir( &sd->bl, AREA ); } return SCRIPT_CMD_SUCCESS; } BUILDIN_FUNC(checkdir) { TBL_PC *sd; if ( script_hasdata(st,3) ) { if ( data_isstring( script_getdata(st,3) ) ) sd = map_nick2sd( script_getstr(st,3),false ); else sd = map_id2sd( script_getnum(st,3) ); } else sd = map_id2sd(st->rid); if ( sd ) { int value = 0; if ( script_hasdata(st,2) ) value = script_getnum(st,2); script_pushint( st, value > 0 ? sd->head_dir : sd->ud.dir ); } return SCRIPT_CMD_SUCCESS; } thank you so much! Quote
0 Mabuhay Posted December 14, 2019 Posted December 14, 2019 @Mael's thing is correct. No need for src mod and stuff because it is already implemented in rAthena since 2014. // When a player teleports, changes maps, or logs in, will they face the direction they were facing before warped? // Official: Disabled, players always face North. spawn_direction: 0 just set spawn_direction to 1. Quote
0 BeWan Posted December 14, 2019 Posted December 14, 2019 1 hour ago, Mabuhay said: @Mael's thing is correct. No need for src mod and stuff because it is already implemented in rAthena since 2014. // When a player teleports, changes maps, or logs in, will they face the direction they were facing before warped? // Official: Disabled, players always face North. spawn_direction: 0 just set spawn_direction to 1. try to char select and log in Quote
0 Mabuhay Posted December 14, 2019 Posted December 14, 2019 Oh i see, well, doesnt matter, its not like it adds +100 damage when your character face south upon login. Quote
0 BeWan Posted December 14, 2019 Posted December 14, 2019 2 hours ago, Mabuhay said: Oh i see, well, doesnt matter, its not like it adds +100 damage when your character face south upon login. Quote
Question
ScarrFace
any char face forward script or src working on latest version?
- script kdjhfksdjf -1,{ OnPCLoginEvent: setdir DIR_SOUTH; end; }
this is not working and if i use this i got error.
how to fix that ? or anyone can recommend new script or src side? thank you
7 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.