Jump to content

quesoph

Members
  • Content Count

    562
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by quesoph


  1.  


    One way would be an OnPCLoadMapEvent script, that announces with a fontColor and fontSize.

    Here you go:

    1. edit trunk/src/map/clif.c so OnPCLoadMapEvent always triggers, even if maps do not have the 'loadevent' mapflag.
    Find these lines:
        if(map[sd->bl.m].flag.loadevent) // Lance        npc_script_event(sd, NPCE_LOADMAP);

    and change to look like this:
        npc_script_event(sd, NPCE_LOADMAP);

     
    2. load this script: where_am_i.txt
    (I commented out maps that did not have an English translation in mapnametable.txt, so there will be no announcement when you load on those maps.

    Follow these steps or place loadevent mapflag in every map listed in this script.


  2.  

     

     

    Index: clif.c===================================================================--- clif.c	(revision 14843)+++ clif.c	(working copy)@@ -8674,6 +8674,12 @@	if(map[sd->bl.m].flag.loadevent) // Lance		npc_script_event(sd, NPCE_LOADMAP);+	if ( map[sd->bl.m].movespeed )+		sd->battle_status.speed = map[sd->bl.m].movespeed;+	else+		sd->battle_status.speed = status_calc_speed( &sd->bl, &sd->sc, sd->base_status.speed );+	clif_updatestatus(sd,SP_SPEED);+	if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobexp(sd))		clif_status_load(&sd->bl, SI_DEVIL, 1); //blindness [Komurka]@@ -15403,3 +15409,139 @@	add_timer_func_list(clif_delayquit, "clif_delayquit");	return 0;}++static unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc, int speed)+{+	TBL_PC* sd = BL_CAST(BL_PC, bl);+	int speed_rate;++	if( sc == NULL )+		return cap_value(speed,10,USHRT_MAX);++	if( sd && sd->ud.skilltimer != INVALID_TIMER && pc_checkskill(sd,SA_FREECAST) > 0 )+	{+		speed_rate = 175 - 5 * pc_checkskill(sd,SA_FREECAST);+	}+	else+	{+		speed_rate = 100;++		//GetMoveHasteValue2()+		{+			int val = 0;++			if( sc->data[SC_FUSION] )+				val = 25;+			else+			if( sd && pc_isriding(sd) )+				val = 25;++			speed_rate -= val;+		}++		//GetMoveSlowValue()+		{+			int val = 0;++			if( sd && sc->data[SC_HIDING] && pc_checkskill(sd,RG_TUNNELDRIVE) > 0 )+				val = 120 - 6 * pc_checkskill(sd,RG_TUNNELDRIVE);+			else+			if( sd && sc->data[SC_CHASEWALK] && sc->data[SC_CHASEWALK]->val3 < 0 )+				val = sc->data[SC_CHASEWALK]->val3;+			else+			{+				// Longing for Freedom cancels song/dance penalty+				if( sc->data[SC_LONGING] )+					val = max( val, 50 - 10 * sc->data[SC_LONGING]->val1 );+				else+				if( sd && sc->data[SC_DANCING] )+					val = max( val, 500 - (40 + 10 * (sc->data[SC_SPIRIT] &&sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER)) *pc_checkskill(sd,(sd->status.sex?BA_MUSICALLESSON:DC_DANCINGLESSON)));++				if( sc->data[SC_DECREASEAGI] )+					val = max( val, 25 );+				if( sc->data[SC_QUAGMIRE] )+					val = max( val, 50 );+				if( sc->data[SC_DONTFORGETME] )+					val = max( val, sc->data[SC_DONTFORGETME]->val3 );+				if( sc->data[SC_CURSE] )+					val = max( val, 300 );+				if( sc->data[SC_CHASEWALK] )+					val = max( val, sc->data[SC_CHASEWALK]->val3 );+				if( sc->data[SC_WEDDING] )+					val = max( val, 100 );+				if( sc->data[SC_JOINTBEAT] && sc->data[SC_JOINTBEAT]->val2&(BREAK_ANKLE|BREAK_KNEE) )+					val = max( val, (sc->data[SC_JOINTBEAT]->val2&BREAK_ANKLE? 50 : 0) + (sc->data[SC_JOINTBEAT]->val2&BREAK_KNEE ? 30 :0) );+				if( sc->data[SC_CLOAKING] && (sc->data[SC_CLOAKING]->val4&1) == 0 )+					val = max( val, sc->data[SC_CLOAKING]->val1 < 3 ? 300 : 30 - 3 * sc->data[SC_CLOAKING]->val1 );+				if( sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_ENEMY )+					val = max( val, 75 );+				if( sc->data[SC_SLOWDOWN] ) // Slow Potion+					val = max( val, 100 );+				if( sc->data[SC_GATLINGFEVER] )+					val = max( val, 100 );+				if( sc->data[SC_SUITON] )+					val = max( val, sc->data[SC_SUITON]->val3 );+				if( sc->data[SC_SWOO] )+					val = max( val, 300 );++				if( sd && sd->speed_rate + sd->speed_add_rate > 0 ) // permanent item-based speedup+					val = max( val, sd->speed_rate + sd->speed_add_rate );+			}++			speed_rate += val;+		}++		//GetMoveHasteValue1()+		{+			int val = 0;++			if( sc->data[SC_SPEEDUP1] ) //FIXME: used both by NPC_AGIUP and Speed Potion script+				val = max( val, 50 );+			if( sc->data[SC_INCREASEAGI] )+				val = max( val, 25 );+			if( sc->data[SC_WINDWALK] )+				val = max( val, 2 * sc->data[SC_WINDWALK]->val1 );+			if( sc->data[SC_CARTBOOST] )+				val = max( val, 20 );+			if( sd && (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN && pc_checkskill(sd,TF_MISS) > 0 )+				val = max( val, 1 * pc_checkskill(sd,TF_MISS) );+			if( sc->data[SC_CLOAKING] && (sc->data[SC_CLOAKING]->val4&1) == 1 )+				val = max( val, sc->data[SC_CLOAKING]->val1 >= 10 ? 25 : 3 * sc->data[SC_CLOAKING]->val1 - 3 );+			if( sc->data[SC_BERSERK] )+				val = max( val, 25 );+			if( sc->data[SC_RUN] )+				val = max( val, 55 );+			if( sc->data[SC_AVOID] )+				val = max( val, 10 * sc->data[SC_AVOID]->val1 );+			if( sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] )+				val = max( val, 75 );++			//FIXME: official items use a single bonus for this [ultramage]+			if( sc->data[SC_SPEEDUP0] ) // temporary item-based speedup+				val = max( val, 25 );+			if( sd && sd->speed_rate + sd->speed_add_rate < 0 ) // permanent item-based speedup+				val = max( val, -(sd->speed_rate + sd->speed_add_rate) );++			speed_rate -= val;+		}++		if( speed_rate < 40 )+			speed_rate = 40;+	}++	//GetSpeed()+	{+		if( sd && pc_iscarton(sd) )+			speed += speed * (50 - 5 * pc_checkskill(sd,MC_PUSHCART)) / 100;+		if( speed_rate != 100 )+			speed = speed * speed_rate / 100;+		if( sc->data[SC_STEELBODY] )+			speed = 200;+		if( sc->data[SC_DEFENDER] )+			speed = max(speed, 200);+		if( sc->data[SC_WALKSPEED] && sc->data[SC_WALKSPEED]->val1 > 0 ) // ChangeSpeed+			speed = speed * 100 / sc->data[SC_WALKSPEED]->val1;+	}++	return (short)cap_value(speed,10,USHRT_MAX);+}Index: clif.h===================================================================--- clif.h	(revision 14843)+++ clif.h	(working copy)@@ -625,4 +625,6 @@void clif_open_search_store_info(struct map_session_data* sd);void clif_search_store_info_click_ack(struct map_session_data* sd, short x, short y);+static unsigned short status_calc_speed(struct block_list *,struct status_change *,int);+#endif /* _CLIF_H_ */Index: map.c===================================================================--- map.c	(revision 14843)+++ map.c	(working copy)@@ -2801,6 +2801,7 @@		// additional mapflag data		map[i].zone = 0; // restricted mapflag zone		map[i].nocommand = 0; // nocommand mapflag level+		map[i].movespeed = 0; // movespeed mapflag level		map[i].bexp = 100; // per map base exp multiplicator		map[i].jexp = 100; // per map job exp multiplicator		memset(map[i].drop_list, 0, sizeof(map[i].drop_list)); // pvp nightmare drop listIndex: map.h===================================================================--- map.h	(revision 14843)+++ map.h	(working copy)@@ -500,6 +500,7 @@	int jexp;	// map experience multiplicator	int bexp;	// map experience multiplicator	int nocommand; //Blocks @/# commands for non-gms. [Skotlex]+	int movespeed;	// Instance Variables	int instance_id;	int instance_src_map;Index: npc.c===================================================================--- npc.c	(revision 14843)+++ npc.c	(working copy)@@ -3115,6 +3115,21 @@		map[m].flag.partylock=state;	else if (!strcmpi(w3,"guildlock"))		map[m].flag.guildlock=state;+	else if (!strcmpi(w3,"movespeed")) {+		if (state) {+			if ( sscanf(w4, "%d", &state) == 1 ) {+				if ( state < 50 )+					map[m].movespeed = 50;+				else if ( state > 1000 )+					map[m].movespeed = 1000;+				else+					map[m].movespeed = state;+			}+			else+				map[m].movespeed = 150;+		} else+			map[m].movespeed = 0;+	}	else		ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s',line '%d').n", w3, filepath, strline(buffer,start-buffer));Index: pc.c===================================================================--- pc.c	(revision 14843)+++ pc.c	(working copy)@@ -6025,6 +6025,7 @@	nullpo_ret(sd);	switch(type) {+	case SP_SPEED: val = sd->battle_status.speed; break;	case SP_SKILLPOINT: val = sd->status.skill_point; break;	case SP_STATUSPOINT: val = sd->status.status_point; break;	case SP_ZENY: val = sd->status.zeny; break;Index: script.c===================================================================--- script.c	(revision 14843)+++ script.c	(working copy)@@ -348,7 +348,8 @@	MF_ALLOWKS,	MF_MONSTER_NOTELEPORT,	MF_PVP_NOCALCRANK,	//50-	MF_BATTLEGROUND+	MF_BATTLEGROUND,+	MF_MOVESPEED};const char* script_op2name(int op)@@ -9627,6 +9628,7 @@			case MF_MONSTER_NOTELEPORT:	script_pushint(st,map[m].flag.monster_noteleport); break;			case MF_PVP_NOCALCRANK:		script_pushint(st,map[m].flag.pvp_nocalcrank); break;			case MF_BATTLEGROUND:		script_pushint(st,map[m].flag.battleground); break;+			case MF_MOVESPEED:			script_pushint(st,map[m].movespeed); break;		}	}@@ -9696,6 +9698,7 @@			case MF_MONSTER_NOTELEPORT:	map[m].flag.monster_noteleport=1; break;			case MF_PVP_NOCALCRANK:		map[m].flag.pvp_nocalcrank=1; break;			case MF_BATTLEGROUND:		map[m].flag.battleground = (!val || atoi(val) < 0 || atoi(val) > 2) ? 1 : atoi(val); break;+			case MF_MOVESPEED:			map[m].movespeed = (!val)? 150: (atoi(val) < 50)? 50: (atoi(val) > 1000)? 1000: atoi(val); break;		}	}@@ -9762,6 +9765,7 @@			case MF_MONSTER_NOTELEPORT:	map[m].flag.monster_noteleport=0; break;			case MF_PVP_NOCALCRANK:		map[m].flag.pvp_nocalcrank=0; break;			case MF_BATTLEGROUND:		map[m].flag.battleground=0; break;+			case MF_MOVESPEED:			map[m].movespeed=0; break;		}	}Index: status.c===================================================================--- status.c	(revision 14843)+++ status.c	(working copy)@@ -3886,6 +3886,10 @@			speed = speed * 100 / sc->data[SC_WALKSPEED]->val1;	}+	if ( bl->type == BL_PC )+		if ( map[sd->bl.m].movespeed )+			speed = map[sd->bl.m].movespeed;+	return (short)cap_value(speed,10,USHRT_MAX);}

     

     

     

    prontera   mapflag   movespeed   50

     

     

     

    This is an old modification by AnnieRuru


  3.  

    //===== Hercules Script ======================================//= Job Master//===== By: ==================================================//= Euphy//===== Current Version: =====================================//= 1.3//===== Description: =========================================//= A fully functional job changer.//===== Additional Comments: =================================//= 1.1 Fixed reset on Baby job change. [Euphy]//= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. [Euphy]//= 1.3 Kagerou/Oboro added. [Euphy]//============================================================prontera,153,193,6    script    Job Master    2_F_MAGICMASTER,{function Job_Menu; function A_An;    mes "[Job Master]";    if (Class > 4049) {        mes "No more jobs are available.";        close;    }    if (checkfalcon() || checkcart() || checkriding() || ismounting()) {        mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((ismounting())?"mount":"")+" before proceeding.";        close;    }    if (.SkillPointCheck && SkillPoint) {        mes "Please use all your skill points before proceeding.";        close;    }    set .@eac, eaclass();    set .@i, ((.ThirdClass)?roclass(.@eac&EAJ_UPPERMASK):Class);    if (.@i > 6 && .@i < 22) {        if (BaseLevel < .Rebirth[0] || JobLevel < .Rebirth[1]) {            set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .Rebirth[1]-JobLevel;            mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue.";            close;        }        if (Class > 21) {            mes "Switch to third class?";            next;            Job_Menu(roclass(.@eac|EAJL_THIRD));            close;        }        while(1) {            mes "Select an option.";            next;            set .@i, select(" ~ ^0055FFRebirth^000000:"+((.ThirdClass)?" ~ ^FF0000Third Class^000000":"")+": ~ ^777777Cancel^000000");            if (.@i==3) close;            mes "[Job Master]";            mes "Are you sure?";            next;            Job_Menu(((.@i==1)?4001:roclass(.@eac|EAJL_THIRD)));            mes "[Job Master]";        }    }    set .@j1, roclass(.@eac|EAJL_2_1); set .@j2,roclass(.@eac|EAJL_2_2);    if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) setarray .@exp[0],roclass(.@eac|EAJL_THIRD),99;//    if (Class == Job_Ninja) setarray .@exp[0],.@j1,70;    if (.@exp[0] && .ThirdClass) {        if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {            set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .@exp[1]-JobLevel;            mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue.";            close;        }        mes "Switch to "+jobname(.@exp[0])+"?";        next;        Job_Menu(.@exp[0]);        close;    }    if (.@eac&EAJL_2)        if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) {            mes "No more jobs are available.";            close;        }    if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {        if (JobLevel < .JobReq[0])            mes "A job level of "+.JobReq[0]+" is required to change into the 1st Class.";        else if (Class == 4001 && .LastJob && lastJob) {            mes "Switch classes now?";            next;            Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));        } else switch(Class) {            case 0: Job_Menu(1,2,3,4,5,6,23,4046,24,25,4023);            case 4001: Job_Menu(4002,4003,4004,4005,4006,4007);            case 4023: Job_Menu(4024,4025,4026,4027,4028,4029,4045);            default: mes "An error has occurred."; break;        }        close;    }    if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)        mes "No more jobs are available.";    else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])        mes "A job level of "+.JobReq[1]+" is required to change into the 2nd Class.";    else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {        mes "Switch classes now?";        next;        Job_Menu(lastJob+4001);    } else        Job_Menu(.@j1,.@j2);    close;function Job_Menu {    while(1) {        if (getargcount() > 1) {            mes "Select a job.";            set .@menu$,"";            for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)                set .@menu$, .@menu$+" ~ "+jobname(getarg(.@i))+":";            set .@menu$, .@menu$+" ~ ^777777Cancel^000000";            next;            set .@i, getarg(select(.@menu$)-1,0);            if (!.@i) close;            if ((.@i == 23 || .@i == 4045) && BaseLevel < .SNovice) {                mes "[Job Master]";                mes "A base level of "+.SNovice+" is required to turn into a "+jobname(.@i)+".";                close;            }            mes "[Job Master]";            mes "Are you sure?";            next;        } else            set .@i, getarg(0);        if (select(" ~ Change into ^0055FF"+jobname(.@i)+"^000000 class: ~ ^777777"+((getargcount() > 1)?"Go back":"Cancel")+"^000000") == 1) {            mes "[Job Master]";            mes "You are now "+A_An(jobname(.@i))+"!";            if (.@i==4001 && .LastJob) set lastJob, Class;            jobchange .@i;            if (.@i==4001 || .@i==4023) resetlvl(1);            specialeffect2 338; specialeffect2 432;            if (.Platinum) callsub Get_Platinum;            close;        }        if (getargcount() == 1) return;        mes "[Job Master]";    }    end;}function A_An {    setarray .@A$[0],"a","e","i","o","u";    set .@B$, "_"+getarg(0);    for(set .@i,0; .@i<5; set .@i,.@i+1)        if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);    return "a "+getarg(0);}Get_Platinum:    skill 142,1,0;    switch(BaseClass) {        case 0: if (Class !=23) skill 143,1,0; break;        case 1: skill 144,1,0; skill 145,1,0; skill 146,1,0; break;        case 2: skill 157,1,0; break;        case 3: skill 147,1,0; skill 148,1,0; break;        case 4: skill 156,1,0; break;        case 5: skill 153,1,0; skill 154,1,0; skill 155,1,0; break;        case 6: skill 149,1,0; skill 150,1,0; skill 151,1,0; skill 152,1,0; break;        default: break;    }    switch(BaseJob) {        case 7: skill 1001,1,0; break;        case 8: skill 1014,1,0; break;        case 9: skill 1006,1,0; break;        case 10: skill 1012,1,0; skill 1013,1,0; break;        case 11: skill 1009,1,0; break;        case 12: skill 1003,1,0; skill 1004,1,0; break;        case 14: skill 1002,1,0; break;        case 15: skill 1015,1,0; skill 1016,1,0; break;        case 16: skill 1007,1,0; skill 1008,1,0; skill 1017,1,0; skill 1018,1,0; skill 1019,1,0; break;        case 17: skill 1005,1,0; break;        case 18: skill 238,1,0; break;        case 19: skill 1010,1,0; break;        case 20: skill 1011,1,0; break;        default: break;    }    return;OnInit:    setarray .Rebirth[0],99,50;    // Minimum base level, job level to rebirth OR change to third class    setarray .JobReq[0],10,40;    // Minimum job level to turn into 1st class, 2nd class    set .ThirdClass,1;        // Enable third classes? (1: yes / 0: no)    set .SNovice,45;        // Minimum base level to turn into Super Novice    set .LastJob,1;            // Enforce linear class changes? (1: yes / 0: no)    set .SkillPointCheck,1;        // Force player to use up all skill points? (1: yes / 0: no)    set .Platinum,1;        // Get platinum skills automatically? (1: yes / 0: no)    end;}

  4. I think this is what you are looking for

     

    https://github.com/HerculesWS/Hercules/blob/master/src/map/skill.c#L361

     

    hp = ( status->get_lv(src) + status_get_int(src) ) / 8 * (4 + ( skill_id == AB_HIGHNESSHEAL ? ( sd ? pc->checkskill(sd,AL_HEAL) : 10 ) : skill_lv ) * 8);

     

    try to change it to:

     

    hp = ( status->get_lv(src) + status_get_int(src) ) / 4 * (4 + ( skill_id == AB_HIGHNESSHEAL ? ( sd ? pc->checkskill(sd,AL_HEAL) : 10 ) : skill_lv ) * 8);

    to make it x2.


  5.  

    //==================================================================// Pincode system//==================================================================// A window is opened before you can select your character and you will have to enter a pincode by using only your mouse// NOTE: Requires client 2011-03-09aragexeRE or newer.// 0: disabled// 1: enabledpincode_enabled: 1// Request Pincode only on login or on everytime char select is accessed?// 0: only on login (default)// 1: everytime the char select window is accessedpincode_charselect: 0// How often does a user have to change his pincode?// Default: 0// 0: never// X: every X minutespincode_changetime: 0// How often can a user enter the wrong password?// Default: 3// NOTE: The maximum on clientside is 3pincode_maxtry: 3

     

    this?


  6.  

    -    script    check_ip    -1,{OnPCLoginEvent:    if (strcharinfo(3) == "prontera") end;    query_sql "SELECT `last_ip` FROM `login` WHERE `account_id` = " + getcharid(3), .@last_ip$;    set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+ .@last_ip$ +"'",.@aid);    if (.@size < 4) end;    set .@self, getcharid(3);    for(.@i = 0; .@i < .@size; .@i++) {	    if (.@aid[.@i] == .@self)		    continue;	    if (attachrid(.@aid[.@i])) {		    set .@name$, strcharinfo(0);		    attachrid(.@self);		    message strcharinfo(0), "Too many accounts.";		    sleep2 5000;		    atcommand "@kick "+strcharinfo(0);		    end;	    }    }    end;}

  7. prontera,150,150,5	script	random style	2_M_DYEINGER,{	.@cloth = rand(getbattleflag("min_cloth_color"), getbattleflag("max_cloth_color"));	.@hairs = rand(getbattleflag("min_hair_style"), getbattleflag("max_hair_style"));	.@hairc = rand(getbattleflag("min_hair_color"), getbattleflag("max_hair_color"));	setlook 1, .@hairs; //Hair Style	setlook 6, .@hairc; //Hair Color	setlook 7, .@cloth; //Cloth Color	end;}


  8. https://github.com/HerculesWS/Hercules/blob/master/src/map/skill.c#L11601

    Add:

     

    +   	 case UNT_SPIDERWEB:        case UNT_ANKLESNARE:        case UNT_MANHOLE:
     

    Pre-Renewal: https://github.com/HerculesWS/Hercules/blob/master/db/pre-re/skill_unit_db.txt#L85

    Renewal: https://github.com/HerculesWS/Hercules/blob/master/db/re/skill_unit_db.txt#L85

    Replace with:

     

    405,0xb7,    ,  0, 1,1000,enemy, 0x002    //PF_SPIDERWEB
     

     

    Pre-Renewal:https://github.com/HerculesWS/Hercules/blob/master/db/pre-re/skill_db.txt#L451

    Renewal: https://github.com/HerculesWS/Hercules/blob/master/db/re/skill_db.txt#L451

    Replace with:

     

    405,7,6,2,0,0x1,0,1,1,no,0,0,3,magic,0,        PF_SPIDERWEB,Fiber Lock
     

     

    tested.


  9. have you tried skill_cast_db.txt?

     

     

    // Skill Times Database
    //
    // Structure of Database:
    // SkillID,CastingTime,AfterCastActDelay,AfterCastWalkDelay,Duration1,Duration2,Cool Down
    //== Explained:
    // CastingTime : time to cast this skill, in miliseconds
    // AfterCastActDelay : "normal" delay, character cannot use skills, in miliseconds
    // AfterCastWalkDleay : amount of time before character can move again, in miliseconds
    // Duration1 / Duration2 : usually the durations used by the skill, at special cases it is used to hold special data
    // Cool Down : amount of time until character can re-use this skill, in miliseconds
    //== Extra
    // On all fields you can use ':' as a delimiter to level-specific values,
    // - Example using SM_PROVOKE
    // - Original:6,0,0,0,30000,0,1000
    // - ModifiedTo:6,0,0,0,30000,0,1000:2500:3000:etc
    // - Makes lvl 1 have 1000 (1s) cool down, lvl 2 2500 (2.5s), lvl 3 3000, and so on.
    //==========================================

     

     

    //-- KG_KAGEHUMI3023,0,0,0,5000,0,0

  10. atcommand.c

     

     

     

    ACMD(dpt){	struct pet_data *pd;	if(!sd->status.pet_id || !(pd=sd->pd))	{		clif->message(fd, msg_txt(184));		return false;	}	if (!pd->pet_no_talk) {		pd->pet_no_talk = 1;	} else {		pd->pet_no_talk = 0;	}	sprintf(atcmd_output, "%s pet talk.", (pd->pet_no_talk? "Disabled" : "Enabled"));	clif->message(fd, atcmd_output);	return 1;}

     

     

    ACMD(pettalk){    char mes[100],temp[100];    struct pet_data *pd;+    if(sd->pd->pet_no_talk) {+  	 clif->message(fd, "pet muted.");+   	 return false;+    }    if ( battle_config.min_chat_delay ) {        if( DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0 )            return true;        sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay;    } 

     

     

    pet.h

     

     

     

    struct pet_data {    struct block_list bl;    struct unit_data ud;    struct view_data vd;    struct s_pet pet;    struct status_data status;    struct mob_db *db;    struct s_pet_db *petDB;    int pet_hungry_timer;    int target_id;+    int pet_no_talk : 1;    struct {        unsigned skillbonus : 1;    } state;    int move_fail_count;    int64 next_walktime, last_thinktime;    short rate_fix;    //Support rate as modified by intimacy (1000 = 100%) [Skotlex]    struct pet_recovery* recovery;    struct pet_bonus* bonus;    struct pet_skill_attack* a_skill;    struct pet_skill_support* s_skill;    struct pet_loot* loot;    struct map_session_data *msd;};

     

     

     

    clif.c

     

     

    /// Notification about a pet's emotion/talk (ZC_PET_ACT)./// 01aa <id>.L <data>.L/// data:///	 @see CZ_PET_ACT.void clif_pet_emotion(struct pet_data *pd,int param){    unsigned char buf[16];    nullpo_retv(pd);    +    if(pd->pet_no_talk)+   	 return;            memset(buf,0,packet_len(0x1aa));    WBUFW(buf,0)=0x1aa;    WBUFL(buf,2)=pd->bl.id;    if(param >= 100 && pd->petDB->talk_convert_class) {        if(pd->petDB->talk_convert_class < 0)            return;        else if(pd->petDB->talk_convert_class > 0) {            // replace mob_id component of talk/act data            param -= (pd->pet.class_ - 100)*100;            param += (pd->petDB->talk_convert_class - 100)*100;        }    }            WBUFL(buf,6)=param;    clif->send(buf,packet_len(0x1aa),&pd->bl,AREA);}

     


  11.  

     

    function    script    soullink    {    switch ( BaseJob ) {        case 18:    .@spirit = 445; break;        case 20:        case 15:    .@spirit = 447; break;        case 19:    .@spirit = 455; break;        case 4047:    .@spirit = 448; break;        case 17:    .@spirit = 456; break;        case 16:    .@spirit = 449; break;        case 12:    .@spirit = 457; break;        case 14:    .@spirit = 450; break;        case 10:    .@spirit = 458; break;        case 23:    .@spirit = 451; break;        case 11:    .@spirit = 460; break;        case 7:        .@spirit = 452; break;        case 4049:    .@spirit = 461; break;        case 8:        .@spirit = 454; break;        case 9:        .@spirit = 453; break;    }        sc_start4 .@j, 240000, 5,  .@spirit,0,0;    skilleffect .@spirit, 5;    // Start Soul Link Effect.    end;}

     

    item script.

     

        OnEquipScript: <"        callfunc "soullink";    ">    OnUnequipScript: <"        sc_end SC_SOULLINK;    ">

     

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.