hmwater001
-
Posts
9 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by hmwater001
-
-
Hi @AinsLord.
How to make its 1 char per account.
-
Quote
PC.CPP
struct map_session_data {
struct block_list bl;
struct unit_data ud;
struct view_data vd;
struct status_data base_status, battle_status;
struct status_change sc;
struct regen_data regen;
struct regen_data_sub sregen, ssregen;
++struct autoattack_delay; // autoattack timer
//NOTE: When deciding to add a flag to state or special_state, take into consideration that state is preserved in
//status_calc_pc, while special_state is recalculated in each call. [Skotlex]
struct s_state {
unsigned int active : 1; //Marks active player (not active is logging in/out, or changing map servers)
unsigned int menu_or_input : 1;// if a script is waiting for feedback from the player
unsigned int dead_sit : 2;
unsigned int lr_flag : 3;//1: left h. weapon; 2: arrow
-------------------------------------------------------------------------------------------------
pc.hppunsigned int lesseffect : 1;
unsigned int vending : 1;
unsigned int noks : 3; // [Zeph Kill Steal Protection]
++unsigned autoattack : 1; // Keitenai
unsigned int changemap : 1;
unsigned int callshop : 1; // flag to indicate that a script used callshop; on a shop
-------------------------------------------------------------------------------------------------
int invincible_timer;
t_tick canlog_tick;
t_tick canuseitem_tick; // [Skotlex]
t_tick canusecashfood_tick;
t_tick canequip_tick; // [Inkfish]
t_tick cantalk_tick;
t_tick canskill_tick; // used to prevent abuse from no-delay ACT files
t_tick cansendmail_tick; // [Mail System Flood Protection]
t_tick ks_floodprotect_tick; // [Kill Steal Protection]
++t_tick autoattack_delay; // Keitenai
t_tick equipswitch_tick; // Equip switch
----------------------------------// Auto Attack --- put before all command
static int buildin_autoattack_sub(struct block_list *bl,va_list ap)
{
int *target_id=va_arg(ap,int *);
*target_id = bl->id;
return 1;
}
void autoattack_motion(struct map_session_data* sd)
{
int i, target_id;
if( pc_isdead(sd) || !sd->state.autoattack ) return;for(i=0;i<=9;i++)
{
target_id=0;
map_foreachinarea(buildin_autoattack_sub, sd->bl.m, sd->bl.x-i, sd->bl.y-i, sd->bl.x+i, sd->bl.y+i, BL_MOB, &target_id);
if(target_id){
unit_attack(&sd->bl,target_id,1);
break;
}
target_id=0;
}
if(!target_id && !pc_isdead(sd) && sd->state.autoattack){
unit_walktoxy(&sd->bl,sd->bl.x+(rand()%2==0?-1:1)*(rand()%25),sd->bl.y+(rand()%2==0?-1:1)*(rand()%25),0);
}
return;
}static TIMER_FUNC(autoattack_timer)
{
struct map_session_data *sd=NULL;sd=map_id2sd(id);
if(sd==NULL || pc_isdead(sd) || !sd->state.autoattack )
return 0;if(sd->state.autoattack)
{
unit_stop_attack(&sd->bl);
autoattack_motion(sd);
if(DIFF_TICK(sd->autoattack_delay,gettick())> 0){
clif_authfail_fd(sd->fd, 15);
return 0;
}
else{
add_timer(gettick()+1000,autoattack_timer,sd->bl.id,0); // 1000 is delay
sd->autoattack_delay = gettick() + 1000; // 1000 is delay
}
}
return 0;
}ACMD_FUNC(autoattack)
{
nullpo_retr(-1, sd);
if (sd->state.autoattack)
{
sd->state.autoattack = 0;
unit_stop_attack(&sd->bl);
clif_displaymessage(fd, "Auto Attack has been deactivated.");
}
else
{
sd->state.autoattack = 1;
add_timer(gettick()+1000,autoattack_timer,sd->bl.id,0);
clif_displaymessage(fd, "Auto Attack activated.");
}
return 0;
}I already to the src modification and recompile the server.
But the result same as mention. unknown commands. maybe there are some step i missing?
-
why when i type @autoattack its said unknown command?
-
Did after adding the value the issue solved? i tried by the result still the same. only max to 50. maybe are this related to client version?
-
hello i sir. I have the plist error. below are the clientinfo details.
<?xml version="1.0" encoding="euc-kr" ?> <clientinfo> <servicetype>america</servicetype> <servertype>primary</servertype> <connection> <display>wewe Ragnarok Online</display> <address>xxx.xx.xx.xx</address> <port>6900</port> <version>55</version> <langtype>1</langtype> <packetver>20180620</packetver> <increase_max_hairstyles>500</increase_max_hairstyles> <increase_max_haircolors>600</increase_max_haircolors> <read_data_directory_first>true</read_data_directory_first> <iteminfo>itemInfo.lua</iteminfo> <hide_quickcashshop_button>true</hide_quickcashshop_button> <max_guildpositions>76</max_guildpositions> <registrationweb>http://mhragnarok.com/</registrationweb> <aid> <admin>2000000</admin> </aid> <loading> <image>loading00.jpg</image> <image>loading01.jpg</image> </loading> </connection> </clientinfo>
Multiple Custom Files Generator
in Third Party Releases
Posted
terbaik boss!!