snowflake1963
New member
- Messages
- 97
- Points
- 0
Hello All ^^
I have a script for @sleep that I used with rAthena and tried it here and failed
I really like this command and would like to use it still.
Here is my script:
/*
*===================================
* Sleep (@sleep)
*-----------------------------------
*/
ACMD_FUNC(sleep){
if (agit_flag) // skill not useable in WOE [A17kaliva]
{
clif_displaymessage(fd, "Cannot use this command during WOE.");
return -1;
}
if(!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > 10) {
if(sd->sc.opt1 != 0 && sd->sc.opt1 != OPT1_SLEEP){
clif_displaymessage(fd, msg_txt(sd,807));
return -1;
}
if(sd->sc.opt1 != OPT1_SLEEP){
sc_start(NULL,&sd->bl, SC_TRICKDEAD, 100, 1, 1000);
sd->sc.opt1 = OPT1_SLEEP;
//sc_start(NULL,&sd->bl, SC_COMA,100,1,skill_get_time2(185,1));
clif_displaymessage(fd, msg_txt(sd,805)); // sleeping
} else {
sd->sc.opt1 = 0;
clif_emotion(&sd->bl,45);
status_change_end(&sd->bl, SC_TRICKDEAD, -1);
//sc_start(NULL,&sd->bl, SC_COMA,100,1,skill_get_time2(185,1));
clif_displaymessage(fd, msg_txt(sd,806)); // awake
}
clif_changeoption(&sd->bl);
return 0;
}
clif_displaymessage(fd, msg_txt(sd,807));
return -1;
}
Can anyone PLEASE help me to make this work?
I have a script for @sleep that I used with rAthena and tried it here and failed
I really like this command and would like to use it still.
Here is my script:
/*
*===================================
* Sleep (@sleep)
*-----------------------------------
*/
ACMD_FUNC(sleep){
if (agit_flag) // skill not useable in WOE [A17kaliva]
{
clif_displaymessage(fd, "Cannot use this command during WOE.");
return -1;
}
if(!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > 10) {
if(sd->sc.opt1 != 0 && sd->sc.opt1 != OPT1_SLEEP){
clif_displaymessage(fd, msg_txt(sd,807));
return -1;
}
if(sd->sc.opt1 != OPT1_SLEEP){
sc_start(NULL,&sd->bl, SC_TRICKDEAD, 100, 1, 1000);
sd->sc.opt1 = OPT1_SLEEP;
//sc_start(NULL,&sd->bl, SC_COMA,100,1,skill_get_time2(185,1));
clif_displaymessage(fd, msg_txt(sd,805)); // sleeping
} else {
sd->sc.opt1 = 0;
clif_emotion(&sd->bl,45);
status_change_end(&sd->bl, SC_TRICKDEAD, -1);
//sc_start(NULL,&sd->bl, SC_COMA,100,1,skill_get_time2(185,1));
clif_displaymessage(fd, msg_txt(sd,806)); // awake
}
clif_changeoption(&sd->bl);
return 0;
}
clif_displaymessage(fd, msg_txt(sd,807));
return -1;
}
Can anyone PLEASE help me to make this work?