Jump to content

rootKid

Members
  • Posts

    83
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by rootKid

  1. Plagiarize a Skill [Script Command]

    View File
    {
    	plagiarize <skill>,<lv>;
    	Sets the invoking player's plagiarised skill and the desired lv.
    }	by rootKid

     

    INSTALLATION

    [in src/map/script.c]

    Find: 

    	// declarations that were supposed to be exported from npc_chat.c
    	#ifdef PCRE_SUPPORT
    	BUILDIN(defpattern);
    	BUILDIN(activatepset);
    	BUILDIN(deactivatepset);
    	BUILDIN(deletepset);

    Add above:

    /*===========================================
    * Plagiarize a Skill
    * plagiarize <skill>,<lv>;
    * Sets the invoking player's plagiarised skill and the desired lv.
    * by rootKid
    *-------------------------------------------*/
    BUILDIN_FUNC(plagiarize)
    {
    	int skillid, lv;
    	struct map_session_data * sd = script_rid2sd(st);
    	skillid=( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
    	lv=script_getnum(st,3);
    	
    	if (sd->cloneskill_idx && sd->status.skill[sd->cloneskill_idx].flag == 13){
    				sd->status.skill[sd->cloneskill_idx].id = 0;
    				sd->status.skill[sd->cloneskill_idx].lv = 0;
    				sd->status.skill[sd->cloneskill_idx].flag = 0;
    			}
    	if (pc_checkskill(sd,RG_PLAGIARISM)) {		
    			sd->cloneskill_idx = skillid;
    			sd->status.skill[sd->cloneskill_idx].id = skillid;
    			sd->status.skill[sd->cloneskill_idx].lv = lv;
    			sd->status.skill[sd->cloneskill_idx].flag = 13;//cloneskill flag
    			pc_setglobalreg(sd, add_str(SKILL_VAR_PLAGIARISM), skillid);
    			pc_setglobalreg(sd, add_str(SKILL_VAR_PLAGIARISM_LV), lv);
    			clif_skillinfoblock(sd);
    			}
    	return 0;
    }

    Find:

    BUILDIN_DEF(_,"s"),

    Add above:

    BUILDIN_DEF(plagiarize,"ii"),

     

    END OF INSTALLATION

    I have attached an unfinished function-based script using this script command as a reference.


     

    • Upvote 1
  2. In src/map/skill.c

    Find:

    case PR_SANCTUARY:
    			hp = (skill_lv > 6) ? 777 : skill_lv * 100;
    break;

     

    Replace with:

    case PR_SANCTUARY:
        if ( target->type == BL_MOB ) {
            struct status_data *tstatus = status->get_status_data((TBL_MOB*)target);
            if (tstatus->mode&MD_PLANT){
                hp = 1;
                break;
            }
        }
            hp = (skill_lv > 6) ? 777 : skill_lv * 100;
    break;

    The above code would make sanctuary heal 1 hp to all plant monsters.

     

    For only red plants, instead of above replacement,

    Replace with:

    case PR_SANCTUARY:
        if (((TBL_MOB*)target)->class_ == 1078)	//red plant mob id
            hp = 1;
        else
            hp = (skill_lv > 6) ? 777 : skill_lv * 100;
    break;

     

  3. @command pack


    ¦¦¦¦¦¦   ¦¦¦¦¦¦   ¦¦¦¦¦¦  ¦¦¦¦¦¦¦¦ ¦¦   ¦¦ ¦¦ ¦¦¦¦¦¦  
    ¦¦   ¦¦ ¦¦    ¦¦ ¦¦    ¦¦    ¦¦    ¦¦¦ ¦¦  ¦¦ ¦¦¦   ¦¦ 
    ¦¦¦¦¦¦  ¦¦    ¦¦ ¦¦    ¦¦    ¦¦    ¦¦¦¦¦   ¦¦ ¦¦¦   ¦¦¦
    ¦¦   ¦¦ ¦¦    ¦¦ ¦¦    ¦¦    ¦¦    ¦¦  ¦¦  ¦¦ ¦¦¦   ¦¦¦
    ¦¦¦  ¦¦¦ ¦¦¦¦¦¦   ¦¦¦¦¦¦     ¦¦    ¦¦   ¦¦ ¦¦ ¦¦¦¦¦¦¦   @command pack. (@runlabel, @allchat, @emo, @allemo, @alleffect)
    ////////////////////////////////////////////////////////////////////////////////////////////////
    [src/map/atcommand.c] is the only file needed to be editted. Set your account group permissions as desired.
    You're assumed to know how to implement these. However, if you have further questions, feel free to contact me.
    ////////////////////////////////////////////////////////////////////////////////////////////////
    
    ACMD_DEF(runlabel),		//rootKid
    ACMD_DEF(allchat),		//rootKid
    ACMD_DEF(emo),			//rootKid
    ACMD_DEF(allemo),		//rootKid
    ACMD_DEF(alleffect),	//rootKid
    
    /*==========================================
    * @runlabel by [rootKid]
    * Makes invoker run an 'On' label from within an npc
    * @runlabel Healer#OnMinute44
    *------------------------------------------*/
    ACMD_FUNC(runlabel) {
    	char label_output[256],npcname[100],label[100];
    	nullpo_retr(-1, sd);
    	
    	if (!message || !*message) {
    		sprintf(atcmd_output, "Usage: @runlabel <npc name>, <label>");
    		clif_displaymessage(fd, atcmd_output);
    		return -1;
    	}
    	
    	if (sscanf(message, "%23[^,], %99[^\n]", npcname, label) < 2) {
    		clif_displaymessage(fd, "Please, enter the correct info (usage: @runlabel <npc name>, <label>).");
    		return -1;
    	}
    
    	if (npc_name2id(npcname) != NULL) {
    		sprintf(label_output, "%s::%s", npcname, label);
    		npc_event( sd, label_output, 0 );
    		clif_displaymessage(fd, "Label was triggered.");
    		return 0;
    	}
    	else {
    		clif_displaymessage(fd, "NPC doesn't exist.");
    		return -1;
    	}
    }
    
    /*==========================================
    * @allchat by [rootKid]
    * Makes all players, except the invoker, send out a desired message
    * eg. @allchat blahblah
    *------------------------------------------*/
    ACMD_FUNC(allchat) {
    	struct map_session_data* iter_sd;
    	struct s_mapiterator* iter;
    	
    	char tempmes[200];
    	iter = mapit_getallusers();
    	nullpo_retr(-1, sd);
    	
    	memset(tempmes, '\0', sizeof(tempmes));
    	memset(atcmd_output, '\0', sizeof(atcmd_output));
    	
    	if (!message || !*message || sscanf(message, "%199[^\n]", tempmes) < 0) {
    		clif_displaymessage(fd, "Please, enter a message (usage: @me <message>).");
    		return -1;
    	}
    	
    	for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter))
    		if (iter_sd != sd){	//Triggers on all players except the one who initiates it.
    		sprintf(atcmd_output, "%s : %s", iter_sd->status.name, tempmes);	// *%s %s*
    		clif_disp_overhead(&iter_sd->bl, atcmd_output);
    		}
    	mapit_free(iter);
    	return 0;
    }
    
    /*==========================================
    * @emo by [rootKid]
    * Makes invoker send out an emote
    * @emo 3
    *------------------------------------------*/
    ACMD_FUNC(emo) {
    	if (!message || !*message) {
    		clif_displaymessage(fd, "Usage: @emo 1-81");
    	return -1;
       }
       clif_emotion(&sd->bl, atoi(message));
       return 0;
    }
    
    /*==========================================
    * @allemo by [rootKid]
    * Makes all players, except the invoker, send out a desired emote
    * eg. @allemo 1
    *------------------------------------------*/
    ACMD_FUNC(allemo) {
    	struct map_session_data* iter_sd;
    	struct s_mapiterator* iter;	
    	iter = mapit_getallusers();
    	
    	if (!message || !*message) {
    		clif_displaymessage(fd, "Usage: @emo 1-81");
    	return -1;
       }
       
       for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter))
    		if (iter_sd != sd){	//Triggers on all players except the one who initiates it.
    			clif_emotion(&iter_sd->bl, atoi(message));
    	}
    	mapit_free(iter);
       return 0;
    }
    
    /*==========================================
    * @alleffect by [rootKid]
    * Makes all players, except the invoker, send out a desired special effect
    * eg. @alleffect 89
    *------------------------------------------*/
    ACMD_FUNC(alleffect) {
    	struct map_session_data* iter_sd;
    	struct s_mapiterator* iter;
    	int type = 0, flag = 0;
    	iter = mapit_getallusers();
    	nullpo_retr(-1, sd);
    
    	if (!message || !*message || sscanf(message, "%d", &type) < 1) {
    		clif_displaymessage(fd, "Please, enter an effect number (usage: @effect <effect number>).");
    		return -1;
    	}
    	
    	for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter))
    		if (iter_sd != sd){	//Triggers on all players except the one who initiates it.
    			clif_specialeffect(&iter_sd->bl, type, (send_target)flag);
    	}
    	mapit_free(iter);
    	return 0;
    }

     


     

    • Upvote 4
  4. If the issue is caused by bad code, you'd have to go through the source code of your "old revision" and find the mistake, but I doubt this to be the case. It is likelier that you are overlooking something, or have a configured a wrong setting elsewhere.

  5.  

    Hi! I dont know exactly where to post this, so if wrong place, im sorry.

    Does anyone know any server 0 delay skill? i love to play this kind of server, but is hard to find, this information usually dos not appear in server information... 

    Thank you very much!

     

    go to trunk\conf\battle\skill.conf

     

    Hope it help

     

     

    @d102791estiny

    You've misunderstood.

    msfabiao is seeking a server, to play, that has no skill delay,

     

    @msfabiao

    As for a server without any skill delays, not many out there.

    Although it is rather deserted, check out RBO, No skill delays.

  6. The skill causes the auto-casting effect of Stormy Knight card?

    As for Thanatos card, that would be a damage modifier, so in the skill_db.txt, set the nk (skill damage properties) of Dragon Breath's to incorporate 0x08 ( Makes the skill ignore all the caster's % damage mod cards. Unsure whether this affect other cards, as well.) 

  7. Preserve used to be a toggle-able skill that you could turn on and off, but it has been changed (not recently, either) to act simply as a set duration buff that protects your preserved skill.

    As for you being able to copy multiple skills, it is not normal.

×
×
  • Create New...