Pneuma Posted March 22, 2014 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 846 Reputation: 138 Joined: 02/26/14 Last Seen: March 7, 2018 Share Posted March 22, 2014 Hello I'm wondering how do I display or give a player a status effect permanently until it is removed by an NPC; Mainly in the db/const.txt the SI_ section Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 22, 2014 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted March 22, 2014 Use a large number on the time value Quote Link to comment Share on other sites More sharing options...
Cydh Posted March 22, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted March 22, 2014 if for client-effect only, maybe make a script command for like displayeffect <SI>,<duration>; and it has clif_status_change(&sd->bl,script_getnum(st,2),0,script_getnum(st,3),0,0,0); permanent duration is -1, or maybe u can put the script OnPCStatCalcEvent Quote Link to comment Share on other sites More sharing options...
Pneuma Posted March 22, 2014 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 846 Reputation: 138 Joined: 02/26/14 Last Seen: March 7, 2018 Author Share Posted March 22, 2014 (edited) Use a large number on the time value if for client-effect only, maybe make a script command for like displayeffect <SI>,<duration>;and it has clif_status_change(&sd->bl,script_getnum(st,2),0,script_getnum(st,3),0,0,0);permanent duration is -1, or maybe u can put the script OnPCStatCalcEvent bonus_script "{bonus bStr,1; bonus bVit,1; bonus bMaxHP,30; bonus bMaxSP,10;}",-1,8,0,SI_swordclan; ^Thats what I need it for but sadly -1 wont make it permanent and I need it so there is no timer :/ Edited March 22, 2014 by Pneuma Quote Link to comment Share on other sites More sharing options...
Cydh Posted March 22, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted March 22, 2014 currently, check that bonus_script on script.c not available for that permanent/-1 duration. Quote Link to comment Share on other sites More sharing options...
Pneuma Posted March 22, 2014 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 846 Reputation: 138 Joined: 02/26/14 Last Seen: March 7, 2018 Author Share Posted March 22, 2014 currently, check that bonus_script on script.c not available for that permanent/-1 duration. BUILDIN_FUNC(bonus_script) { uint8 i, flag = 0; int16 icon = SI_BLANK; uint32 dur; char type = 0; TBL_PC* sd; const char *script_str = NULL; struct script_code *script = NULL; if (script_hasdata(st,7)) sd = map_charid2sd(script_getnum(st,7)); else sd = script_rid2sd(st); if (sd == NULL) return SCRIPT_CMD_FAILURE; script_str = script_getstr(st,2); dur = 1000 * abs(script_getnum(st,3)); FETCH(4,flag); FETCH(5,type); FETCH(6,icon); if (script_str[0] == '\0' || !dur) { //ShowWarning("buildin_bonus_script: Invalid script. Skipping...\n"); return SCRIPT_CMD_FAILURE; } //Skip duplicate entry ARR_FIND(0,MAX_PC_BONUS_SCRIPT,i,&sd->bonus_script[i] && sd->bonus_script[i].script_str && strcmp(sd->bonus_script[i].script_str,script_str) == 0); if (i < MAX_PC_BONUS_SCRIPT) { //ShowWarning("buildin_bonus_script: Duplicate entry with bonus '%d'. Skipping...\n",i); return SCRIPT_CMD_SUCCESS; } if (!(script = parse_script(script_str,"bonus_script",0,1))) { ShowWarning("buildin_bonus_script: Failed to parse script '%s' (cid:%d). Skipping...\n",script_str,sd->status.char_id); return SCRIPT_CMD_FAILURE; } //Find the empty slot ARR_FIND(0,MAX_PC_BONUS_SCRIPT,i,!sd->bonus_script[i].script); if (i >= MAX_PC_BONUS_SCRIPT) { ShowWarning("buildin_itemscript: Maximum script_bonus is reached (cid:%d max: %d). Skipping...\n",sd->status.char_id,MAX_PC_BONUS_SCRIPT); return SCRIPT_CMD_SUCCESS; } //Add the script data memcpy(sd->bonus_script[i].script_str,script_str,strlen(script_str)+1); sd->bonus_script[i].script = script; sd->bonus_script[i].tick = gettick() + dur; sd->bonus_script[i].flag = flag; sd->bonus_script[i].type = type; sd->bonus_script[i].icon = icon; if (sd->bonus_script[i].icon != SI_BLANK) //Gives status icon if exist clif_status_change(&sd->bl,sd->bonus_script[i].icon,1,dur,1,0,0); status_calc_pc(sd,false); return SCRIPT_CMD_SUCCESS; } ^The bonus_script section; But I dont know what you mean xD Quote Link to comment Share on other sites More sharing options...
Question
Pneuma
Hello
I'm wondering how do I display or give a player a status effect permanently until it is removed by an NPC; Mainly in the db/const.txt the SI_ section
Link to comment
Share on other sites
5 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.