anacondaq Posted July 22, 2014 Posted July 22, 2014 @Cydh I have idea for look & feel perfect when create shop // Make him look perfect unit_setdir(&sd->bl,battle_config.feature_autotrade_direction); if( battle_config.feature_autotrade_sit ) pc_setsit(sd); i think allter table "action" store value for this (&dir, &head_dir, &sit) if (dir || head_dir) { pc_setdir(sd, dir, head_dir); clif_changed_dir(&sd->bl, AREA); } if( battle_config.feature_autotrade_sit ) pc_setsit(sd); use function input value sprintf(value, "%d,%d,%d", sd->ud.dir, sd->head_dir, pc_issit(sd)); sscanf(sd->autotrade.action, "%d,%d,%d", &dir, &head_dir, &sit); I Suggest it thank you sir @Cydh I Suggest for gm command when very need remove player with autotrade or click right gm menu void clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd) { int fd = tsd->fd; if( fd > 0 ) clif_authfail_fd(fd, 15); else { if( tsd->state.vending && tsd->state.autotrade ){ if( Sql_Query( mmysql_handle, "UPDATE `%s` SET `autotrade` = 0 WHERE `id` = %d;", vendings_db, tsd->vender_id ) != SQL_SUCCESS ){ Sql_ShowDebug( mmysql_handle ); } }else if( tsd->state.buyingstore && tsd->state.autotrade ){ if( Sql_Query( mmysql_handle, "UPDATE `%s` SET `autotrade` = 0 WHERE `id` = %d;", buyingstore_db, tsd->buyer_id ) != SQL_SUCCESS ){ Sql_ShowDebug( mmysql_handle ); } } map_quit(tsd); } if( sd ) clif_GM_kickack(sd,tsd->status.account_id); } thank you You are awesome! Quote
Cydh Posted July 23, 2014 Posted July 23, 2014 @Stingor, Napster, there 7fd6776 also import this sql-files/upgrades/upgrade_20140723.sql Quote
Napster Posted July 23, 2014 Posted July 23, 2014 thank you for update @Cydhi report this some problem1. when restart server and use autotrade config around 15 sec, and player with autotrade state & sitting #define pc_setsit(sd) ( (sd)->state.dead_sit = (sd)->vd.dead_sit = 2 ) but set state only, i think add to this , bcz real player login before player with autotrade not update display sitting if( autotraders[i]->sit ) { skill_sit(sd, 1); pc_setsit(sd); clif_sitting(&sd->bl); } 2. issues autotrade delay , i think can't protect over load from SQL maybe add delay login to server for player with autotrade config ex. if autotrader data upto 100 user when restart ,100 user come together thank you again Quote
Stingor Posted July 23, 2014 Posted July 23, 2014 (edited) Thanks @Cydh Edited July 23, 2014 by Stingor Quote
Cydh Posted August 2, 2014 Posted August 2, 2014 thank you for update @Cydh i report this some problem 1. when restart server and use autotrade config around 15 sec, and player with autotrade state & sitting #define pc_setsit(sd) ( (sd)->state.dead_sit = (sd)->vd.dead_sit = 2 ) but set state only, i think add to this , bcz real player login before player with autotrade not update display sitting if( autotraders[i]->sit ) { skill_sit(sd, 1); pc_setsit(sd); clif_sitting(&sd->bl); } Thank you, here 8a81940 but only the sit issue. For the delay, if u want to make like a queue, you can make something like, add in pc.h:map_session_data, unsigned int autotrade_delay. and when init the autotrader, before the pc_setnew() line there, you can put the at->sd->autotrade_delay = i*500; (the delay will be 0.5 sec for each autotrader) and change the tick add add_timer in the pc_reg_received() to gettick()+sd->autotrade_delay. yes, u can make something like that first. Quote
Atreides Posted August 2, 2014 Posted August 2, 2014 [SQL]: DB error - Unknown column 'body_direction' in 'field list' [Debug]: at buyingstore.c:667 - SELECT `id`, `account_id`, `char_id`, `sex`, `ti tle`, `limit`, `body_direction`, `head_direction`, `sit` FROM `buyingstores` WHE RE `autotrade` = 1 AND `limit` > 0 AND (SELECT COUNT(`buyingstore_id`) FROM `buy ingstore_items` WHERE `buyingstore_id` = `id`) > 0 ORDER BY `id`; [SQL]: DB error - Unknown column 'body_direction' in 'field list' [Debug]: at vending.c:581 - SELECT `id`, `account_id`, `char_id`, `sex`, `title` , `body_direction`, `head_direction`, `sit` FROM `vendings` WHERE `autotrade` = 1 AND (SELECT COUNT(`vending_id`) FROM `vending_items` WHERE `vending_id` = `id` ) > 0 ORDER BY `id`; it is appearing here :/ Quote
Stingor Posted August 2, 2014 Posted August 2, 2014 https://github.com/rathena/rathena/blob/master/sql-files/upgrades/upgrade_20140723.sql 1 Quote
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.