Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    247

Posts posted by AnnieRuru


  1. that's why I keep saying hercules mob controller is utterly broken

    there are 2 problems here

    1. the hp and max hp is very strange thing
    when you want to increase the monster hp, setunitdata UDT_MAXHP 1st, then UDT_HP later
    when you want to decrease the monster hp, setunitdata UDT_HP 1st, then UDT_MAXHP later
    I'm not even sure need to fix this or not, because rathena also doing this way

    2. yes, our recalculate monster status are broken
    https://github.com/HerculesWS/Hercules/pull/2408

    prontera,155,185,5	script	askdaksd	1_F_MARIA,{
    	.@mobgid = monster( "this", -1,-1, "--ja--", PORING, 1 );
    	setunitdata .@mobgid, UDT_MAXHP, 1000000;
    	setunitdata .@mobgid, UDT_HP, 1000000;
    	setunitdata .@mobgid, UDT_LEVEL, 99;
    	end;
    }

     


  2. 2 hours ago, Kiyoshi Visser said:

    The server I GM for uses empty autobonuses to refresh condition checks. 100% autobonus when attacking or being hit works rather well for red-health builds. However! There is a limit of 10 autobonuses one player can have at a time, so unless you can increase it and recompile, I suggest to use it sparingly and on slots where card granted autobonuses already happen. Also, I am not really sure how server resource heavy these are. ;o

     

    autobonus "{  }",1000,1000,BF_WEAPON|BF_MAGIC|BF_MISC|BF_NORMAL|BF_SKILL,"{  }";
    autobonus2 "{  }",1000,1000,BF_WEAPON|BF_MAGIC|BF_MISC|BF_NORMAL|BF_SKILL,"{  }";
    if(Hp < MaxHp/4) {
        bonus bAtkRate,3;
        bonus bMatkRate,3;
    }

    test with

    {
    	Id: 5083
    	AegisName: "Red_Tailed_Ribbon"
    	Name: "Red Ribbon"
    	Type: "IT_ARMOR"
    	Buy: 20
    	Weight: 200
    	Def: 2
    	Loc: "EQP_HEAD_TOP"
    	EquipLv: 45
    	ViewSprite: 167
    	Script: <" bonus bMdef,10; autobonus2 "{ if(Hp < MaxHp/4) bonus bAtk, 10000; }", 1000, 5000, BF_WEAPON|BF_MAGIC|BF_MISC|BF_NORMAL|BF_SKILL; ">
    },

    it works, but the bAtk bonus only give you for the <duration> in seconds ...
    if the duration too high, like 1 day, lol ... if the player already recover the hp, the bAtk will still be there

     


     

    ok 1 more try
    https://github.com/AnnieRuru/Release/blob/master/plugins/bAtkWhenLowHP.c
    this one can be use on live server

    EDITING --- found a bug OK done


  3. no.1, my 1st impression is run status_calc_pc everytime player receive hits or healing, which will be server resources heavy
    OnPCStatCalcEvent already deem very resource heavy, and you want to make this heavier LOL

     

    no.2, even I want to write this for fun
    when player login, sd->battle_status.max_hp is 0, and can cause server crash
    when I changed to sd->status.max_hp, that is the player's base hp, if the player have bMaxHP bonus then it will calculate wrongly

    Spoiler
    
    #include "common/hercules.h"
    #include "map/pc.h"
    #include "common/utils.h"
    #include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    HPExport struct hplugin_info pinfo = {
    	"bAtkBaseonHPRate",
    	SERVER_TYPE_MAP,
    	"0.1",
    	HPM_VERSION,
    };
    
    struct player_data {
    	int atk_baseon_hprate;
    };
    
    int ATK_BASEON_HP_RATE = 0;
    
    int pc_bonus_pre( struct map_session_data **sd, int *type, int *val ) {
    	if ( *sd == NULL )
    		return 0;
    //	ShowDebug( "%d %d %d %d\n", (*sd)->base_status.lhw.atk, (*sd)->battle_status.hp, (*sd)->status.max_hp, (*sd)->battle_status.max_hp );
    	if ( *type == ATK_BASEON_HP_RATE ) {
    		if ( (*sd)->state.lr_flag != 2 ) {
    			int bonus = (*sd)->base_status.lhw.atk + ( 99 - ( (*sd)->battle_status.hp *100 / ((*sd)->battle_status.max_hp +1) ) ) * *val;
    			(*sd)->base_status.lhw.atk = cap_value(bonus, 0, USHRT_MAX);
    		}
    //		ShowDebug( "%d\n", (*sd)->base_status.lhw.atk );
    		hookStop();
    	}
    	return 0;
    }
    
    void pc_damage_post( struct map_session_data *sd, struct block_list *src, unsigned int hp, unsigned int sp ) {
    	if ( sd == NULL )
    		return;
    	status_calc_pc(sd, SCO_FORCE);
    	return;
    }
    
    void pc_heal_post( struct map_session_data *sd, unsigned int hp, unsigned int sp, int type ) {
    	if ( sd == NULL )
    		return;
    	status_calc_pc(sd, SCO_FORCE);
    	return;
    }
    
    HPExport void plugin_init (void) {
    	ATK_BASEON_HP_RATE = map->get_new_bonus_id();
    	script->set_constant( "bAtkBaseonHPRate", ATK_BASEON_HP_RATE, false, false );
    	addHookPre( pc, bonus, pc_bonus_pre );
    	addHookPost( pc, damage, pc_damage_post );
    	addHookPost( pc, heal, pc_heal_post );
    }

     

    EDIT: some minor trick to calculate division by 1 instead of 0, kinda hacky

     

    2 hours ago, Tio Akima said:

    Do you think this is possible?

    no
    not recommend

    EDIT2: but if you want the bonus only at certain HP threshold like only activate below 15% hp, then it might be more ... practical


  4. 4 hours ago, MikZ said:

    @AnnieRuru your Quest information is so neat. can that be use for client 20141022 or for 2018 client only?

    the new quest log window is only for 2018-03-07b onward, so if your client is not so up to date, can use version 0.3 ...

    nope, that is just some information when I brainstorming some quest idea

    about Dastgir's idea that add custom quest in Any tab, I'm thinking not going for it,
    because I'm thinking of integrate this with achievement system ...
    using such old client version also means you can't use more modern features


  5. not very satisfy with my previous attempt, so redo again with *hateffect

    #include "common/hercules.h"
    #include "map/pc.h"
    #include "map/battle.h"
    #include "common/timer.h"
    #include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    HPExport struct hplugin_info pinfo = {
    	"pk_showeffect",
    	SERVER_TYPE_MAP,
    	"0.2",
    	HPM_VERSION,
    };
    
    int hateffect_timerid = INVALID_TIMER;
    
    int hateffect_countdown( int tid, int64 tick, int id, intptr data ) {
    	struct map_session_data *sd = map->id2sd(id);
    	if ( sd != NULL )
    		clif->hat_effect_single( &sd->bl, 27, false );
    	hateffect_timerid = INVALID_TIMER;
    	return 0;
    }
    
    int battle_check_target_post( int retVal, struct block_list *src, struct block_list *target, int flag ) {
    	struct block_list *s_bl = src, *t_bl = target;
    	if ( (t_bl = battle->get_master(target)) == NULL )
    		t_bl = target;
    	if ( (s_bl = battle->get_master(src)) == NULL )
    		s_bl = src;
    
    	if ( s_bl->type == BL_PC && t_bl->type == BL_PC && (flag & BCT_ENEMY) == BCT_ENEMY && retVal == 1 ) {
    		if ( hateffect_timerid != INVALID_TIMER ) {
    			timer->delete( hateffect_timerid, hateffect_countdown );
    			hateffect_timerid = INVALID_TIMER;
    		}
    		hateffect_timerid = timer->add( timer->gettick() + battle->bc->prevent_logout, hateffect_countdown, ((struct map_session_data*)s_bl)->bl.id, 0 );
    		clif->hat_effect_single( s_bl, 27, true );
    	}
    
    	return retVal;
    }
    
    HPExport void plugin_init (void) {
    	addHookPost( battle, check_target, battle_check_target_post );
    }

     


  6. just learn attendance system today,

    attendance system add 2 fields to the `char` table, which is `attendance_count` and `attendance_timer`
    in theory, whenever player click to retrieve the item, in clif_parse_attendance_reward_request function,
    -> update `char` where account_id = sd->status.account_id

    EDIT: it seems if the player create a new character in the account, will mess up the `attendance_count` ...
    hmm ... have to fix this to the core ...


  7. can we do this with quest log system instead ?

    there is no need to waste a variable ... well, quest log system also support UI

    screen2019Hercules032.jpg

    problem ? not every server use up to date client version

    are you using client version in year 2018 ?
    I'm using PACKETVER 20180621

    and for your answer, just add *getcalendartime(12,0) something like that on the daily quest log script

    if your server using up to date client version, then I could write this script easily with *getcalendartime script command
    using outdated client version, then have to hijack another script variable


  8. Spoiler
    
    -	script	simple invasion	FAKE_NPC,{
    OnInit:
    	setarray .mvp,
    		ORK_HERO,            // 50
    		MAYA,                // 55
    		ORC_LORD,            // 55
    		GOLDEN_BUG,          // 65
    		EDDGA,               // 65
    		OSIRIS,              // 68
    		AMON_RA,             // 69
    		PHREEONI,            // 71
    		DRACULA,             // 75
    		DOPPELGANGER,        // 77
    		MISTRESS,            // 78
    		MOONLIGHT,           // 79
    		LADY_TANEE,          // 80
    		BAPHOMET,            // 81
    		PHARAOH,             // 85
    		DRAKE,               // 91
    		KNIGHT_OF_WINDSTORM, // 92
    		BOITATA,             // 93
    		LORD_OF_DEATH,       // 94
    		LEAK,                // 94
    		DARK_LORD,           // 96
    		BACSOJIN_,           // 97
    		GARM,                // 98
    		KTULLANUX,           // 98
    		THANATOS,            // 99
    		INCANTATION_SAMURAI, // 100
    		RSX_0806,            // 100
    		DARK_SNAKE_LORD,     // 105
    		TURTLE_GENERAL,      // 110
    		TAO_GUNKA,           // 110
    		ATROCE,              // 113
    		S_NYDHOG,            // 117
    		KRAKEN,              // 124
    		KIEL_,               // 125
    		APOCALIPS_H,         // 128 (Vesper)
    		DETALE,              // 135
    		FALLINGBISHOP,       // 138
    		GLOOMUNDERNIGHT,     // 139
    		QUEEN_SCARABA,       // 140
    		PYURIEL,             // 141
    		RANDGRIS,            // 141
    		B_YGNIZEM,           // 141
    		DAEHYON,             // 142
    		KADES,               // 143
    		IFRIT,               // 146
    		GIOIA,               // 146
    		BEELZEBUB_,          // 147
    		FACEWORM_QUEEN,      // 155
    		B_SEYREN,            // 160
    		B_EREMES,            // 160
    		B_HARWORD,           // 160
    		B_MAGALETA,          // 160
    		B_SHECIL,            // 160
    		B_KATRINN,           // 160
    		TIMEHOLDER;          // 170
    	setarray .towns$,
    		"prontera",
    		"izlude",
    		"moc_ruins",
    		"geffen",
    		"payon",
    		"pay_arche",
    		"alberta",
    		"aldebaran",
    		"yuno",
    		"lighthalzen",
    		"einbroch",
    		"einbech",
    		"comodo",
    		"umbala",
    		"amatsu",
    		"gonryun",
    		"ayothaya",
    		"louyang",
    		"hugel",
    		"rachel",
    		"veins",
    		"brasilis",
    		"dicastes01",
    		"mora",
    		"dewata",
    		"malangdo",
    		"malaya",
    		"eclage";
    	.mvpsize = getarraysize(.mvp);
    	.townsize = getarraysize(.towns$);
    //	bindatcmd "invade", strnpcinfo(NPC_NAME)+"::OnClock1600";
    	end;
    OnClock1600:
    	.@mvp = .mvp[ rand(.mvpsize) ];
    	.@town$ = .towns$[ rand(.townsize) ];
    	monster .@town$, 0,0, "--ja--", .@mvp, 1, strnpcinfo(NPC_NAME)+"::Onkill";
    	announce sprintf( _$( "An MVP [%s] rampaging in [%s] town !!" ), getmonsterinfo( .@mvp, MOB_NAME ), .@town$ ), bc_all, C_RED;
    	end;
    Onkill:
    	announce sprintf( _$( "The player [%s] has dealt the final blow to the invasion boss ..." ), strcharinfo(PC_NAME) ), bc_all, C_LIME;
    	// haiz...  still don't support killedrid from monster event label
    	end;
    }

     

     


  9. Spoiler
    
    function	script	F_MesItemInfo	{
    	.@item = getarg(0);
    	.@itemname$ = getitemname(.@item);
    	if (.@itemname$ != "null") {
    		.@itemslot = getitemslots(.@item);
    		if (.@itemslot)
    			.@itemname$ = sprintf("%s [%d]", .@itemname$, .@itemslot);
    	}
    	else
    		.@itemname$ = "Unknown Item";
    	if (PACKETVER >= 20150729)
    		return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item);
    	else if (PACKETVER >= 20130130)
    		return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item);
    	else
    		return .@itemname$;
    }
    
    function	script	timeleft__	{
    	.@left = getarg(0);
    	if ( .@left <= 0 )
    		return getarg(0);
    	.@day = .@left / 86400;
    	.@hour = .@left % 86400 / 3600;
    	.@min = .@left % 3600 / 60;
    	.@sec = .@left % 60;
    	if ( .@day )
    		return sprintf( _$( "%d day %d hour" ), .@day, .@hour );
    	else if ( .@hour )
    		return sprintf( _$( "%d hour %d min" ), .@hour, .@min );
    	else if ( .@min )
    		return sprintf( _$( "%d min %d sec" ), .@min, .@sec );
    	else
    		return sprintf( _$( "%d sec" ), .@sec );
    }
    
    prontera,155,185,5	script	kjdsfhskhf	1_F_MARIA,{
    //	#daily_supply = 0;
    	.@today = atoi( gettimestr( "%Y%m%d", 9 ) );
    	if ( #daily_supply == .@today ) {
    		mes "You have already taken today's supply";
    		mesf "You have to wait %s countdown to get next supply", timeleft__( getcalendartime(0,0) - gettimetick(2) );
    	}
    	else if ( checkweight( Knife, 3 ) == false ) {
    		mes "It appears you have overweight";
    	}
    	else {
    		mes "Retrieving today's supply...";
    		for ( .@i = 1; .@i <= 3; ++.@i ) {
    			.@r = rand(.totalchance[.@i]);
    			for ( .@j = 3; ( .@r -= getd(".item"+ .@i +"["+ .@j +"]") ) >= 0; .@j += 2 );
    			getitem getd(".item"+ .@i +"["+( .@j -1 )+"]"), rand( getd(".item"+ .@i +"[0]"), getd(".item"+ .@i +"[1]") );
    		}	
    		#daily_supply = .@today;
    	}
    	next;
    //	chinese government enforce the law when giving items based on probability
    	mes "The Chances are:-";
    	for ( .@i = 1; .@i <= 3; ++.@i ) {
    		mes " ";
    		mesf "Set %d :", .@i;
    		mesf "Randomly get any one type of these item, the amount between %d~%d", getd(".item"+ .@i +"[0]"), getd(".item"+ .@i +"[1]");
    		for ( .@j = 3; .@j < getd(".item"+ .@i +"size"); .@j += 2 )
    			mesf "%s : %s", F_MesItemInfo( getd(".item"+ .@i +"["+( .@j -1 )+"]") ), getd(".chance_display_item"+ .@i +"$["+ .@j +"]");
    	}
    	close;
    OnInit:
    	setarray .item1,
    		1, 10, // amount : rand(1,10)
    	//	chance of getting the items Set#1
    	//	<Item ID>,<chance>
    		Red_Potion,    5,
    		Orange_Potion, 4,
    		Yellow_Potion, 3,
    		White_Potion,  2,
    		Blue_Potion,   1,
    		Green_Potion,  6;
    
    	setarray .item2,
    		5, 15, // amount : rand(5,15)
    	//	chance of getting the items Set#1
    	//	<Item ID>,<chance>
    		Red_Herb,    5,
    		Yellow_Herb, 4,
    		White_Herb,  3,
    		Blue_Herb,   2,
    		Green_Herb,  1;
    
    	setarray .item3,
    		10, 20, // amount : rand(10,20)
    	//	chance of getting the items Set#1
    	//	<Item ID>,<chance>
    		Apple,        5,
    		Banana,       4,
    		Grape,        3,
    		Carrot,       2,
    		Sweet_Potato, 1,
    		Meat,         99, 
    		Honey,        50,
    		Milk,         100;
    
    	for ( .@i = 1; .@i <= 3; ++.@i ) {
    		setd ".item"+ .@i +"size", getarraysize( getd(".item"+ .@i) );
    		for ( .@j = 3; .@j < getd(".item"+ .@i +"size"); .@j += 2 )
    			.totalchance[.@i] += getd(".item"+ .@i +"["+ .@j +"]");
    		for ( .@j = 3; .@j < getd(".item"+ .@i +"size"); .@j += 2 ) {
    			.@chance = getd(".item"+ .@i +"["+ .@j +"]") *10000 / .totalchance[.@i];
    			.@division = .@chance / 100;
    			.@remainder$ = .@chance % 100;
    			while ( getstrlen(.@remainder$) < 2 )
    				.@remainder$ = insertchar(.@remainder$, "0", 0);
    			setd ".chance_display_item"+ .@i +"$["+ .@j +"]", .@division +"."+ .@remainder$ +"%";
    		}
    	}
    	end;
    }

     

    erm ... its getting interestingly ... complexity ...


  10. https://github.com/AnnieRuru/Release/blob/master/Guides/Daily Quest - use gettimetick(2) or gettimestr.md

    function	script	timeleft__	{
    	.@left = getarg(0);
    	if ( .@left <= 0 )
    		return getarg(0);
    	.@day = .@left / 86400;
    	.@hour = .@left % 86400 / 3600;
    	.@min = .@left % 3600 / 60;
    	.@sec = .@left % 60;
    	if ( .@day )
    		return sprintf( _$( "%d day %d hour" ), .@day, .@hour );
    	else if ( .@hour )
    		return sprintf( _$( "%d hour %d min" ), .@hour, .@min );
    	else if ( .@min )
    		return sprintf( _$( "%d min %d sec" ), .@min, .@sec );
    	else
    		return sprintf( _$( "%d sec" ), .@sec );
    }
    
    prontera,155,185,5	script	kjdsfhskhf	1_F_MARIA,{
    	.@today = atoi( gettimestr( "%Y%m%d", 9 ) );
    	if ( #daily_supply == .@today ) {
    		mes "You have already taken today's supply";
    		mesf "You have to wait %s countdown to get next supply", timeleft__( getcalendartime(0,0) - gettimetick(2) );
    		close;
    	}
    	getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,10);
    	getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(5,15);
    	getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(10,20);
    	#daily_supply = .@today;
    	end;
    }

  11. need source modification plugin to do this

    #include "common/hercules.h"
    #include "map/pc.h"
    #include "map/battle.h"
    #include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    HPExport struct hplugin_info pinfo = {
    	"pk_showeffect",
    	SERVER_TYPE_MAP,
    	"x_O",
    	HPM_VERSION,
    };
    
    int battle_check_target_post( int retVal, struct block_list *src, struct block_list *target, int flag ) {
    	struct block_list *s_bl = src, *t_bl = target;
    	if ( (t_bl = battle->get_master(target)) == NULL )
    		t_bl = target;
    	if ( (s_bl = battle->get_master(src)) == NULL )
    		s_bl = src;
    
    	if ( s_bl->type == BL_PC && t_bl->type == BL_PC && (flag & BCT_ENEMY) == BCT_ENEMY && retVal == 1 )
    		clif->specialeffect( s_bl, 548, AREA ); // EF_RED_HIT
    
    	return retVal;
    }
    
    HPExport void plugin_init (void) {
    	addHookPost( battle, check_target, battle_check_target_post );
    }

    player will blink with red effect when hitting another player

    yes, possible, setoption, specialeffect, sc_start ... you name it
    you just need some source modification knowledge to do it


  12. 8 hours ago, skyundersea said:

    You can close this topic, i found something for now, "Equip: changebase Job_Xmas;" "UnEquip: changebase Class;" and so....

    I knew that, but this doesn't show the weapon sprite

    although its a bit off when enable it

    screen2019Hercules036.jpgscreen2019Hercules037.jpg

    hmm ... I just re-read the topic, you only want to enable attack/skill on these job sprite,
    not enabling the weapon sprite ... it was from lllaaazzz suggestion


  13. On 3/16/2019 at 5:46 PM, MikZ said:

    Set A: random (1x,10x) pcs

    random :656 , 657 , 505 , 645 , 506 , 14510 

    Set B: random (5x,15x) pcs

    random :656 , 657 , 505 , 645 , 506 , 14510 

    Set C: random (10x,20x) pcs

    random :656 , 657 , 505 , 645 , 506 , 14510

    curious, why all 3 sets have same item ID ?
    so it means they can be repeated ?

     

    prontera,155,185,5	script	kjdsfhskhf	1_F_MARIA,{	
    	getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,10);
    	getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(5,15);
    	getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(10,20);
    	end;
    }

     


  14. almost similar to this

     

    #include "common/hercules.h"
    #include "map/pc.h"
    #include "map/atcommand.h"
    #include "common/timer.h"
    #include "common/memmgr.h"
    #include "common/HPMDataCheck.h"
    
    HPExport struct hplugin_info pinfo = {
    	"die_delay",
    	SERVER_TYPE_MAP,
    	"x_O",
    	HPM_VERSION,
    };
    
    ACMD(kill) {
    	if ( DIFF_TICK( timer->gettick(), sd->canlog_tick ) < battle->bc->prevent_logout ) {
    		char msg[CHAT_SIZE_MAX];
    		safesnprintf( msg, CHAT_SIZE_MAX, "There is a %d seconds delay of using this command to kill the character again", battle->bc->prevent_logout /1000 );
    		clif->message( fd, msg );
    		return false;
    	}
    	status_kill( &sd->bl );
    	clif->message( sd->fd, msg_fd( fd, 13 )); // A pity! You've died.
    	if ( fd != sd->fd )
    		clif->message( fd, msg_fd( fd, 14 )); // Character killed.
    	return true;
    }
    
    HPExport void plugin_init (void) {
    	addAtcommand( "kill", kill );
    }

    this assume your prevent_logout in your battle_config has default setting

    // Prevent logout of players after being hit for how long (in ms, 0 disables)?
    prevent_logout: 10000
    
    // When should the server prevent a player from logging out? Have no effect if prevent_logout is disabled. (Note 3)
    // Official servers prevent players from logging out after attacking, casting skills, and taking damage.
    // 0 = Players can always logout
    // 1 = Prevent logout on login
    // 2 = Prevent logout after attacking
    // 4 = Prevent logout after casting skill
    // 8 = Prevent logout after being hit
    prevent_logout_trigger: 14

    prevent_logout_trigger have to at least has 2+8


  15.  src/map/clif.c | 17 +----------------
     src/map/pc.c   |  2 --
     2 files changed, 1 insertion(+), 18 deletions(-)
    
    diff --git a/src/map/clif.c b/src/map/clif.c
    index a037d3436..8bc5a24f8 100644
    --- a/src/map/clif.c
    +++ b/src/map/clif.c
    @@ -959,10 +959,6 @@ static void clif_get_weapon_view(struct map_session_data *sd, int *rhand, int *l
     	nullpo_retv(sd);
     	nullpo_retv(rhand);
     	nullpo_retv(lhand);
    -	if(sd->sc.option&OPTION_COSTUME) {
    -		*rhand = *lhand = 0;
    -		return;
    -	}
     
     #if PACKETVER < 4
     	*rhand = sd->status.look.weapon;
    @@ -3638,9 +3634,6 @@ static void clif_changelook(struct block_list *bl, int type, int val)
     				if (val == INVISIBLE_CLASS) /* nothing to change look */
     					return;
     
    -				if (sd->sc.option & OPTION_COSTUME)
    -					vd->weapon = vd->shield = 0;
    -
     				if (!vd->cloth_color)
     					break;
     
    @@ -3760,6 +3753,7 @@ static void clif_changetraplook(struct block_list *bl, int val)
     /// 01d7 <id>.L <type>.B <value>.L (ZC_SPRITE_CHANGE2)
     static void clif_sendlook(struct block_list *bl, int id, int type, int val, int val2, enum send_target target)
     {
    +	ShowDebug( "type: %d val: %d\n", type, val );
     	struct PACKET_ZC_SPRITE_CHANGE p;
     	p.packetType = sendLookType;
     	p.AID = id;
    @@ -11061,9 +11055,6 @@ static void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action
     			if( pc_cant_act(sd) || pc_issit(sd) || sd->sc.option&OPTION_HIDE )
     				return;
     
    -			if( sd->sc.option&OPTION_COSTUME )
    -				return;
    -
     			if (!battle_config.sdelay_attack_enable && pc->checkskill(sd, SA_FREECAST) <= 0 && (skill->get_inf2(sd->ud.skill_id) & (INF2_FREE_CAST_REDUCED | INF2_FREE_CAST_NORMAL)) == 0) {
     				if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) {
     					clif->skill_fail(sd, 1, USESKILL_FAIL_SKILLINTERVAL, 0, 0);
    @@ -12199,9 +12190,6 @@ static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill
     		}
     	}
     
    -	if (sd->sc.option & OPTION_COSTUME)
    -		return;
    -
     	if (sd->sc.data[SC_BASILICA] && (skill_id != HP_BASILICA || sd->sc.data[SC_BASILICA]->val4 != sd->bl.id))
     		return; // On basilica only caster can use Basilica again to stop it.
     
    @@ -12327,9 +12315,6 @@ static void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uin
     		}
     	}
     
    -	if( sd->sc.option&OPTION_COSTUME )
    -		return;
    -
     	if( sd->sc.data[SC_BASILICA] && (skill_id != HP_BASILICA || sd->sc.data[SC_BASILICA]->val4 != sd->bl.id) )
     		return; // On basilica only caster can use Basilica again to stop it.
     
    diff --git a/src/map/pc.c b/src/map/pc.c
    index ea18715bb..3285e58cd 100644
    --- a/src/map/pc.c
    +++ b/src/map/pc.c
    @@ -2066,8 +2066,6 @@ static int pc_disguise(struct map_session_data *sd, int class)
     	// We need to update the client so it knows that a costume is being used
     	if( sd->sc.option&OPTION_COSTUME ) {
     		clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class);
    -		clif->changelook(&sd->bl,LOOK_WEAPON,0);
    -		clif->changelook(&sd->bl,LOOK_SHIELD,0);
     		clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
     	}
     

    there is a reason why we disable this server-side,
    because I remember long time ago, during eathena times, having wedding sprite or xmas sprite can crash the client

    just tested again today, although it doesn't crash my 20180621 client,
    but it doesn't seems like can update the weapon/shield sprite properly
    not really sure its server or client side restriction though,
    I couldn't find any thing seems to block it from server side, since ShowDebug() shows the value properly ...

     


    cash mount sprite problem,
    yup, I can't move this topic into graphic support, because you asking multiple questions in 1 topic

    download act editor and fix it yourself


  16. increase movement speed bonus bSpeedAddRate,`n`;
    but to make the character floating, nope, only star gladiator can fly

    prontera,157,180,4	script	Option Master	4_DOG01,{
    	setoption Option_Flying, true;
    	sleep2 1000;
    	setoption Option_Flying, false;
    }

    this will make the character flying while changing the cloth to star gladiator
    http://herc.ws/board/topic/15912-only-star-gladiator-can-fly/#comment-87647
    its restricted by client side, which I hope someone who are good at client can take a crack at it

     

    18 hours ago, skyundersea said:

    also need to know if is possible to add Visual option to manner PK system, when ppl kill someone it show Option i choose!

    no idea what's this means

×
×
  • Create New...

Important Information

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