Jump to content

chojuro

Members
  • Content Count

    46
  • Joined

  • Last visited

Posts posted by chojuro


  1. image.thumb.png.69da9abfde9e5644efdafd40034115d7.png

     

    //===== Hercules Plugin ======================================
    //= change equipment skin
    //===== By: ==================================================
    //= AnnieRuru
    //===== Current Version: =====================================
    //= 1.1
    //===== Compatible With: ===================================== 
    //= Hercules 2019-03-23
    //===== Description: =========================================
    //= change equipment skin
    //===== Topic ================================================
    //= http://herc.ws/board/topic/16618-change-equipment-skin/
    //===== Additional Comments: =================================  
    //= only weapon supported, LOOK_SHIELD are fuck up ... not supported
    //============================================================
    
    #include "common/hercules.h"
    #include "map/pc.h"
    #include "map/clif.h"
    #include "map/battle.h"
    #include "map/script.h"
    #include "common/conf.h"
    #include "common/memmgr.h"
    //#include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    struct change_weapon_skin_data {
    	int itemid;
    	int skinid;
    };
    
    VECTOR_DECL(struct change_weapon_skin_data) weapon_skin_data;
    
    HPExport struct hplugin_info pinfo = {
    	"change_equipment_skin",
    	SERVER_TYPE_MAP,
    	"1.1",
    	HPM_VERSION,
    };
    
    void clif_sendlook_pre( struct block_list **bl, int *id, int *type, int *val, int *val2, enum send_target *target ) {
    	struct map_session_data *sd = BL_CAST(BL_PC, *bl);
    	if ( sd != NULL ) {
    		if ( *type == LOOK_WEAPON ) {
    			int i = pc->checkequip( sd, script->equip[EQI_SHADOW_WEAPON -1] );
    			if ( i >= 0 ) {
    				struct item_data *item = sd->inventory_data[i];
    				if ( item == NULL )
    					return;				
    				for ( i = 0; i < VECTOR_LENGTH(weapon_skin_data); i++ ) {
    					if ( item->nameid == VECTOR_INDEX(weapon_skin_data, i).itemid ) {
    						*val = VECTOR_INDEX(weapon_skin_data, i).skinid;
    						break;
    					}
    				}
    			}
    		}
    	}
    }
    
    void pc_unequipitem_pos_pre( struct map_session_data **sd, int *n, int *pos ) {
    	if ( *sd == NULL )
    		return;
    	if ( *pos & EQP_SHADOW_WEAPON ) {
    		(*sd)->weapontype1 = W_FIST;
    		pc->calcweapontype(*sd);
    		(*sd)->status.look.weapon = 0;
    		clif->changelook( &(*sd)->bl, LOOK_WEAPON, (*sd)->status.look.weapon );
    		hookStop();
    	}
    	return;
    }
    
    int read_change_equipment_skin(void) {
    	const char *confpath = "conf/import/change_equipment_skin.conf";
    	struct config_t change_equipment_skin_conf;
    	if ( !libconfig->load_file( &change_equipment_skin_conf, confpath ) ) {
    		ShowError( "can't read %s, file not found !\n", confpath );
    		return -1;
    	}
    
    	struct config_setting_t *config_db = libconfig->setting_get_member( change_equipment_skin_conf.root, "change_equipment_skin" );
    	if ( config_db == NULL ) {
    		ShowError( "can't read %s\n", confpath );
    		libconfig->destroy( &change_equipment_skin_conf );
    		return -1;
    	}
    
    	struct config_setting_t *config = NULL;
    	int itemid_ = 0, skinid_ = 0, i = 0;
    	const char *looktype_string = NULL;
    	VECTOR_INIT(weapon_skin_data);
    	while (( config = libconfig->setting_get_elem( config_db, i++ ) )) {
    		if ( !libconfig->setting_lookup_string( config, "Type", &looktype_string ) ) {
    			ShowError( "Missing 'Type' on entry no."CL_WHITE"%d"CL_RESET" in '"CL_WHITE"%s"CL_RESET"'.\n", i, confpath );
    			continue;
    		}
    		if ( !libconfig->setting_lookup_int( config, "ItemID", &itemid_ ) ) {
    			ShowError( "Missing 'ItemID' on entry no."CL_WHITE"%d"CL_RESET" in '"CL_WHITE"%s"CL_RESET"'.\n", i, confpath );
    			continue;
    		}
    		if ( !libconfig->setting_lookup_int( config, "SkinID", &skinid_ ) ) {
    			ShowError( "Missing 'SkinID' on entry no."CL_WHITE"%d"CL_RESET" in '"CL_WHITE"%s"CL_RESET"'.\n", i, confpath );
    			continue;
    		}
    
    		if ( !strcmp( looktype_string, "LOOK_WEAPON" ) ) {
    			struct change_weapon_skin_data weapon_data_;
    			weapon_data_.itemid = itemid_;
    			weapon_data_.skinid = skinid_;
    			VECTOR_ENSURE( weapon_skin_data, 1, 1 );
    			VECTOR_PUSH( weapon_skin_data, weapon_data_ );
    		}
    		else
    			ShowError( "Invalid 'Type' on entry no."CL_WHITE"%d"CL_RESET" in '"CL_WHITE"%s"CL_RESET"'.\n", i, confpath );
    	}
    	
    //	ShowDebug( "%d\n", VECTOR_LENGTH(weapon_skin_data) );
    //	for ( i = 0; i < VECTOR_LENGTH(weapon_skin_data); i++ ) {
    //		ShowDebug( "%d", VECTOR_INDEX(weapon_skin_data, i).itemid );
    //		ShowDebug( "%d\n", VECTOR_INDEX(weapon_skin_data, i).skinid );
    //	}
    
    	libconfig->destroy( &change_equipment_skin_conf );
    	ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", VECTOR_LENGTH(weapon_skin_data), confpath);
    	return VECTOR_LENGTH(weapon_skin_data);
    }
    
    void clean_change_equipment_skin(void) {
    	VECTOR_CLEAR(weapon_skin_data);
    	return;
    }
    
    ACMD(reloadequipmentskin) {
    	int count = 0;
    	char msg[CHAT_SIZE_MAX] = "Done reloading '@reloadequipmentskin' with %d entries.";
    	clean_change_equipment_skin();
    	count = read_change_equipment_skin();
    	safesnprintf( msg, CHAT_SIZE_MAX, msg, count );
    	clif->message( sd->fd, msg );
    	return true;
    }
    
    HPExport void plugin_init (void) {
    	addHookPre( clif, sendlook, clif_sendlook_pre );
    	addHookPre( pc, unequipitem_pos, pc_unequipitem_pos_pre );
    	addAtcommand( "reloadequipmentskin", reloadequipmentskin );
    	clean_change_equipment_skin();
    	read_change_equipment_skin();
    }
    
    HPExport void plugin_final (void) {
    	clean_change_equipment_skin();
    }

    here is the code help me to implement this  thanks


  2. 1charpergm_0.2a.c: In function ‘plugin_init’:
    1charpergm_0.2a.c:53:65: error: macro "addHookPre" passed 3 arguments, but takes just 2
      addHookPre( chr, make_new_char_sql, char_make_new_char_sql_pre );
                                                                     ^
    1charpergm_0.2a.c:53:2: error: ‘addHookPre’ undeclared (first use in this function)
      addHookPre( chr, make_new_char_sql, char_make_new_char_sql_pre );
      ^
    1charpergm_0.2a.c:53:2: note: each undeclared identifier is reported only once for each function it appears in
    1charpergm_0.2a.c:54:65: error: macro "addHookPre" passed 3 arguments, but takes just 2
      addHookPre( chr, parse_char_select, char_parse_char_select_pre );
                                                                     ^
    1charpergm_0.2a.c: At top level:
    1charpergm_0.2a.c:31:12: warning: ‘char_make_new_char_sql_pre’ defined but not used [-Wunused-function]
     static int char_make_new_char_sql_pre( struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex) {
                ^
    1charpergm_0.2a.c:40:13: warning: ‘char_parse_char_select_pre’ defined but not used [-Wunused-function]
     static void char_parse_char_select_pre( int *fd, struct char_session_data **sd, uint32 *ipl ) {
                 ^
    make[1]: *** [../../plugins/1charpergm_0.2a.so] Error 1
    make[1]: Leaving directory `/root/hercules/src/plugins'
    make: *** [plugin.1charpergm_0.2a] Error 2
    //===== Hercules Plugin ======================================
    //= 1charpergm
    //===== By: ==================================================
    //= AnnieRuru
    //===== Current Version: =====================================
    //= 0.2a
    //===== Compatible With: ===================================== 
    //= Hercules 2019-02-16
    //===== Description: =========================================
    //= make each GM account can only have 1 character slot
    //===== Topic ================================================
    //= http://herc.ws/board/topic/11215-one-char-per-gm-account/?do=findComment&comment=90332
    //===== Additional Comments: =================================  
    //= simple trick, only allow them to create/login the character on slot 0
    //============================================================
    
    #include "common/hercules.h"
    #include "char/char.h"
    #include "common/nullpo.h"
    #include "common/socket.h"
    //#include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    HPExport struct hplugin_info pinfo = {
    	"1charpergm",
    	SERVER_TYPE_CHAR,
    	"0.2a",
    	HPM_VERSION,
    };
    
    static int char_make_new_char_sql_pre( struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex) {
    	nullpo_retr(-2, *sd);
    	if ( *slot != 0 && (*sd)->group_id > 10 ) {	// change 10 to minimum gm level
    		hookStop();
    		return -2;
    	}
    	return 0;
    }
    
    static void char_parse_char_select_pre( int *fd, struct char_session_data **sd, uint32 *ipl ) {
    	int slot = RFIFOB(*fd, 2);
    	if ( slot != 0 && (*sd)->group_id > 10 ) {
    		RFIFOSKIP(*fd, 3);
    		chr->creation_failed(*fd, -4);
    		hookStop();
    	}
    	return;
    }
    int (*make_new_char_sql) (struct char_session_data* sd, char* name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style);
    void (*parse_char_select) (int fd, struct char_session_data* sd, uint32 ipl);
    
    HPExport void plugin_init (void) {
    	addHookPre( chr, make_new_char_sql, char_make_new_char_sql_pre );
    	addHookPre( chr, parse_char_select, char_parse_char_select_pre );
    }

     

    this is the plugins i used any idea how to fixed this?


  3. 3 hours ago, sotA said:

    image.thumb.png.c48d5318616373989448c9cfb4381df1.png
    I did not write to the form because I did not find the section for my question. Tell me please, I downloaded the latest hercules emulator, but when compiling, it gives a lot of errors! (I'm attaching a photo) I can't figure out on my own what I'm doing wrong!!! I ask for your help!! Visual Studio 2019 compiler. Previously, everything worked well and compiled without problems, but now most likely I'm doing something wrong!

    just disable testvar and it will works fine ignore warnings


  4. 13 hours ago, 4144 said:

    .@id = getelementofarray(getvariableofnpc(.npcgid, "MVPLadder"), getnpcid("MVPLadder"));

    
    .@id = getelementofarray(getvariableofnpc(.npcgid, "MVPLadder"), getnpcid("MVPLadder"));

    like this

    i got this error,debug and warning in console and nothing happen to the npc it doesnt disguise

    image.png.6997ca1b1149f4f1298d1036b9f1e25d.pngimage.png.1ee68e8e86bb57c669d9fd34a7345e2a.pngimage.png.a79b363d0b911e53c2969769a7bdfe9b.png


  5. 5 hours ago, 4144 said:

    then on old hercules try call getnpcid as getnpcid("MYNPC")

    or may be it not exists in your hercules. look for getnpcid in atcommand.c

     

    .@id = getelementofarray(getvariableofnpc(.npcgid, "MVPLadder"), getnpcid(mvp_ladder_statue));

    do you mean like this?
     

    there's no getnpcid in atcommand.c but there is buildin in script.c


  6. 9 hours ago, 4144 said:

    probably you using too old hercules or some bad mod of plugin?

    try test your script on latest clean hercules.

     

    from script file look like this is ratnena? then not sure may be getnpcid in rathena always need npc name as parameter.

    something like: getnpcid("MYNPC")

    yes my emulator is too old, when i compiled there is a lot of warnings too but the server run smooth.

    the script working fine with latest clean hercules.

    this is script has two version i implement hercules version so it is probably the problem is the my emulator is too old


  7. 50 minutes ago, MikZ said:

     

    .@id = getelementofarray(getvariableofnpc(.npcgid, "MVPLadder"), getnpcid());

    
    .@id = getelementofarray(getvariableofnpc(.npcgid, "MVPLadder"),  getnpcid());

    try to input it manually

    same error bro


  8. Question: Why NPC's does'nt transform to the top MVP Player?

    Note: im using old hercules emulator

    //====== rAthena Script ======================================================
    //= MVP ladder script
    //===== By: ==================================================================
    //= Rokimoki but edited and adapted from AnnieRuru PVP Ladder
    //= https://herc.ws/board/topic/18871-dota-pvp-ladder/
    //= Mark Script fixed and adapted some small things
    //===== Current Version: =====================================================
    //= 2.1
    //===== Compatible With: =====================================================
    //= rAthena 2020-10-20, with MySQL 8.0
    //===== Description: =========================================================
    //= MVP ladder store in SQL table
    //= Requested by DevThor
    //===== Additional Comments: =================================================
    //= 1.0 initial version
    //= 2.0 added total kill count and fixed some sql bugs
    //= 2.1 fixed sql sorting rank
    //============================================================================
    
    /*
    CREATE TABLE `mvpladder` (
    	`id` int(11) NOT NULL AUTO_INCREMENT,
    	`char_id` int(11) unsigned NOT NULL default '0',
    	`mob_id` INT NOT NULL,
    	`kills` INT DEFAULT 0,
      	PRIMARY KEY (`id`),
    	INDEX (`char_id`),
    	INDEX (`mob_id`),
    	INDEX (`kills`)
    ) ENGINE=MyISAM AUTO_INCREMENT=1;
    */
    
    //---- MvP Ladder Logic Script
    
    -	script	MVPLadder	-1,{
    
    OnInit:
    // Config
    	.map_killannounce = 1; // announce when MVP is dead on the map where the MVP was killed : 0 - off, 1 - o
    	.killannounce = 1; // announce when MVP is dead globally : 0 - off, 1 - on
    	.gmnokill = 0; // GMs are not suppose to kill MVP. A GM with <this number> level or higher will do nothing. IF set to 60, GM60 and above kill any player will not get anything : 0 - off
    
    //	.min_gm_menu = 90; // minimum level of GM can use the GM menu on ladder npc
    
    	.showtotal = 20; // show the length of ladder.
    	.showpage = 10;	// set the views per page.
    
    	.showstatue = 5; // number of statues. This number must match with the number of duplicates at the end of the script
    	.fix_custom_sprite = false; // if your server has custom animated sprite that overlaps the sprite animation repeatedly on the statues, enable this
    
    // Config ends ------------------------------------------------------------------------------------------
    
    //	to prevent bug happen
    	if (.gmnokill <= 0) .gmnokill = 100;
    
    	sleep 1;
    	
    OnTimer1000: // refresh statues every 30 seconds. Note the `char` table is unrealiable, player still need to perform certain task to save the character -> see 'save_settings' in conf\map-server.conf
    	.@query$ = "SELECT `char`.`char_id`, `char`.`name`, `char`.`guild_id`, `char`.`class`, "
    			 + "`char`.`sex`, `char`.`hair`, `char`.`hair_color`, `char`.`clothes_color`, "
    			 + "`char`.`body`, `char`.`head_top`, `char`.`head_mid`, `char`.`head_bottom`, `char`.`robe`, "
    	         + "SUM(`mvpladder`.`kills`) as `orderKills` "
    	         + "FROM `char` RIGHT JOIN `mvpladder` ON `char`.`char_id` = `mvpladder`.`char_id` GROUP BY `char`.`char_id` ORDER BY `orderKills` DESC LIMIT " + .showstatue;
    	.@nb = query_sql(.@query$, .@cid, .@name$, .@guild_id, .@class, .@sex$, .@hair, .@hair_color, .@clothes_color, .@body, .@head_top, .@head_mid, .@head_bottom, .@robe, .@kills);
    	if (.fix_custom_sprite) {
    		for (.@i = 0; .@i < .@nb; ++.@i) {
    			setunitdata .statue[.@i +1], UDT_HEADTOP, 0;
    			setunitdata .statue[.@i +1], UDT_HEADMIDDLE, 0;
    			setunitdata .statue[.@i +1], UDT_HEADBOTTOM, 0;
    			setunitdata .statue[.@i +1], UDT_ROBE, 0;
    		}
    	}
    	for (.@i = 0; .@i < .@nb; ++.@i) {
    		setunitdata .statue[.@i +1], UDT_CLASS, .@class[.@i];
    		setunitdata .statue[.@i +1], UDT_SEX, (.@sex$[.@i] == "F")? SEX_FEMALE:SEX_MALE;
    		setunitdata .statue[.@i +1], UDT_HAIRSTYLE, .@hair[.@i];
    		setunitdata .statue[.@i +1], UDT_HAIRCOLOR, .@hair_color[.@i];
    		setunitdata .statue[.@i +1], UDT_CLOTHCOLOR, .@clothes_color[.@i];
    		setunitdata .statue[.@i +1], UDT_BODY2, .@body[.@i];
    		setunitdata .statue[.@i +1], UDT_HEADTOP, .@head_top[.@i];
    		setunitdata .statue[.@i +1], UDT_HEADMIDDLE, .@head_mid[.@i];
    		setunitdata .statue[.@i +1], UDT_HEADBOTTOM, .@head_bottom[.@i];
    		setunitdata .statue[.@i +1], UDT_ROBE, .@robe[.@i];
    		setnpcdisplay "mvp_ladder_statue#"+(.@i +1), .@name$[.@i];
    		.statue_name$[.@i +1] = .@name$[.@i];
    		.statue_guild$[.@i +1] = getguildname(.@guild_id[.@i]);
    		.statue_kills[.@i +1] = .@kills[.@i];
    	}
    	for (.@i = .@nb; .@i < .showstatue; ++.@i)
    		setunitdata .statue[.@i +1], UDT_CLASS, HIDDEN_WARP_NPC;
    	initnpctimer;
    	end;
    
    OnNPCKillEvent: // Logic to detect when a MvP is killed
    	if (getmonsterinfo(killedrid, MOB_MVPEXP) > 0) {
    		.@selectIfKillExistQuery$ = "SELECT char_id, mob_id, kills FROM mvpladder WHERE char_id = '" + getcharid(0) + "' AND mob_id = '" + killedrid + "';";
    		if (query_sql(.@selectIfKillExistQuery$) > 0) { // Exist a kill of that MVP so +1 to kill count
    			.@updateLadderQuery$ = "UPDATE mvpladder SET kills = kills + 1 WHERE char_id = '" + getcharid(0) + "' AND mob_id = '" + killedrid + "'";
    		} else { // Create a new kill of specific MVP
    			//.@updateLadderQuery$ = "INSERT INTO mvpladder (char_id, mob_id, kills) VALUES ('" + getcharid(0) + "','" + killedrid + "','1');";
    			.@updateLadderQuery$ = "INSERT INTO mvpladder (`char_id` , `mob_id` , `kills`) VALUES ('" + getcharid(0) + "','" + killedrid + "','1');";
    		}
    		query_sql(.@updateLadderQuery$);
    	}
    	end;
    }
    
    //---- MvP Ladder Info NPC
    
    1@dth3,48,89,5	script	MVP Ladder	120,{
    	.@npcname$ = strnpcinfo(0);
    	while (1) {
    		mes "["+ .@npcname$ +"]";
    		mes "Hello "+ strcharinfo(0) +"...";
    		mes "If you want to I can show you your MVP stats.";
    		next;
    		switch (select("Most MVP killer list","Most MVP killed list","Own Information")) {
    		mes "["+ .@npcname$ +"]";
    		case 1:
    			.@queryKillerList$ = "SELECT t1.char_id, SUM(t1.kills) as `orderKills`, t2.name " +
    								 "FROM `mvpladder` t1 " +
    								 "INNER JOIN `char` t2 " +
    								 "ON t1.char_id = t2.char_id " +
    								 "GROUP BY t1.char_id " +
    								 "ORDER BY `orderKills` DESC " +
    								 "LIMIT " + getvariableofnpc(.showtotal, "MVPLadder") + ";";
    			.@nb = query_sql(.@queryKillerList$, .@charid, .@kills, .@name$);
    			if (!.@nb) {
    				mes "The ladder currently is empty.";
    				next;
    			}
    			for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"MVPLadder")) {
    				for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"MVPLadder") + .@j) && .@i < .@nb; ++.@i)
    					mes "^996600" + (.@i+1) + ": ^006699" + .@name$[.@i] + " ^00AA00[^FF0000" + .@kills[.@i] + " MvP^00AA00 killed]^000000";
    				next;
    			}
    			break;
    			
    		case 2:
    			.@queryKilledList$ = "SELECT char_id, mob_id, SUM(kills) as `orderKills` " +
    								 "FROM `mvpladder` " +
    								 "GROUP BY mob_id " +
    								 "ORDER BY `orderKills` DESC " +
    								 "LIMIT " + getvariableofnpc(.showtotal, "MVPLadder") + ";";
    			.@nb = query_sql(.@queryKilledList$, .@charid, .@mobid, .@kills);
    			if (!.@nb) {
    				mes "The ladder currently is empty.";
    				next;
    			}
    			for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"MVPLadder")) {
    				for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"MVPLadder") + .@j) && .@i < .@nb; ++.@i) {
    					mes "^996600" + (.@i+1) + ": ^006699" + strmobinfo(1, .@mobid[.@i]) + " ^FF0000MvP ^00AA00[Killed ^FF0000" + .@kills[.@i] + " ^00AA00times]^000000";
    				}
    				next;
    			}
    			query_sql("SELECT SUM(kills) FROM mvpladder;", .@killCount);
    			mes "^996600==> ^006699Total MvP Kills [^FF0000" + .@killCount[0] + " ^00AA00kills]^000000";
    			break;
    			
    		case 3:
    			.@queryOwnLadder$ = "SELECT char_id, mob_id, SUM(kills) as `orderKills` " +
    								"FROM `mvpladder` " +
    								"WHERE char_id = '" + getcharid(0) + "'" +
    								"ORDER BY `orderKills` DESC;";
    			.@nb = query_sql(.@queryOwnLadder$, .@charid, .@mobid, .@kills);
    			if (!.@nb) {
    				mes "The ladder currently is empty.";
    				next;
    			}
    			.@totalKillCount = 0;
    			for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"MVPLadder")) {
    				for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"MVPLadder") + .@j) && .@i < .@nb; ++.@i ) {	
    					mes "^996600" + (.@i+1) + ": ^006699" + strmobinfo(1, .@mobid[.@i]) + " ^FF0000MvP ^00AA00[Killed ^FF0000" + .@kills[.@i] + " ^00AA00times]^000000";
    					.@totalKillCount = .@totalKillCount + .@kills[.@i];
    				}
    				next;
    			}
    			mes "^996600==> ^006699Total Own MvP Kills [^FF0000" + .@totalKillCount + " ^00AA00kills]^000000";
    			break;
            }
    	close;
    OnInit:
    	initnpctimer;
    	end;
    OnTimer1000:
    	showscript("MVP Ladder");
    	setnpctimer 0;
    	end;
        }
    close;
    
    }
    
    //---- MSG board NPCs
    
    -	script	mvp_ladder_statue	-1,{
    	.@id = getelementofarray(getvariableofnpc(.npcgid, "MVPLadder"), getnpcid(0));
    	mes "^996600[TOP "+ .@id +"]";
    	mes "^006699Name : "+ getelementofarray(getvariableofnpc(.statue_name$, "MVPLadder"), .@id);
    	.@guildname$ = getelementofarray(getvariableofnpc(.statue_guild$, "MVPLadder"), .@id);
    	mes "^00AAAAGuild : "+((.@guildname$ == "null")? "^AAAAAANone": .@guildname$);
    	mes "^00AA00Total MVP Kills : ["+ getelementofarray(getvariableofnpc(.statue_kills, "MVPLadder"), .@id) +"]";
    	close;
    
    OnInit:
    	.@id = strnpcinfo(2);
    	set getvariableofnpc(.statue[.@id], "MVPLadder"), getnpcid(0);
    	set getvariableofnpc(.npcgid[getnpcid(0)], "MVPLadder"), .@id;
    	end;
    }
    
    1@dth3,55,83,5	duplicate(mvp_ladder_statue)	mvp_ladder_statue#1	1_F_MARIA
    1@dth3,51,83,5	duplicate(mvp_ladder_statue)	mvp_ladder_statue#2	1_F_MARIA
    1@dth3,54,87,5	duplicate(mvp_ladder_statue)	mvp_ladder_statue#3	1_F_MARIA
    1@dth3,54,91,5	duplicate(mvp_ladder_statue)	mvp_ladder_statue#4	1_F_MARIA
    1@dth3,47,83,5	duplicate(mvp_ladder_statue)	mvp_ladder_statue#5	1_F_MARIA
    
    1@dth3,55,83,5	script	 #top1	111,{
    OnInit:
    	initnpctimer;
    	end;
    OnTimer1000:
    	showscript("Top-1 MVP Killer");
    	setnpctimer 0;
    	end;
    }
    
    1@dth3,51,83,5	script	 #top2	111,{
    OnInit:
    	initnpctimer;
    	end;
    OnTimer1000:
    	showscript("Top-2 MVP Killer");
    	setnpctimer 0;
    	end;
    }
    
    1@dth3,54,87,5	script	 #top3	111,{
    OnInit:
    	initnpctimer;
    	end;
    OnTimer1000:
    	showscript("Top-3 MVP Killer");
    	setnpctimer 0;
    	end;
    }
    
    1@dth3,54,91,5	script	 #top4	111,{
    OnInit:
    	initnpctimer;
    	end;
    OnTimer1000:
    	showscript("Top-4 MVP Killer");
    	setnpctimer 0;
    	end;
    }
    
    1@dth3,47,83,5	script	 #top5	111,{
    OnInit:
    	initnpctimer;
    	end;
    OnTimer1000:
    	showscript("Top-5 MVP Killer");
    	setnpctimer 0;
    	end;
    }

     


  9. On 4/10/2021 at 6:07 PM, Neo-Mind said:

    FYI, I have also added Custom Shields & Custom Jobs patches in WARP and yes it supports all clients from 2010 - 2021.

    New features
    Custom Shields:

    • Maximum Shield count can be customized now (limited to 127 for now).
    • You can also validate a shield id based on the job id by modifying the ValidateShieldID function in ShieldTable_F.lub.

    Custom Jobs:

    • All the Lua files are now in a different folder called 'JobInfo' to avoid mixing in with others.
       
    • You can specify different strings based on servicetype. For e.g. "korea" and "america" can have different strings. 
      To achieve this, you need to specify an override table with the name LT_<servicetype number>.
      For e.g. LT_0 specifies overrides for korea servicetype. Check PCNames.lub to get a clearer idea. 
      At present, it is only used for name changes & palette path changes.
       
    • Scaling for Baby Jobs can be changed. You can change this in Shrink_Map inside PCIDs.lub.
      There is one caveat though, due to client limitation, the factor needs to be specified as IEEE hex string.
      (no floating-point support in Lua function calls 😒)

    Common to both:

    • You get the option to copy the files to your patched client area. The files are copied only if you apply the patch.
    • For Custom Shields, the max shield value also gets updated in the copied file automatically.
       

    I was planning on more amount of changes in Custom Jobs, but it's on hold for now.

     

    is there a guide in custom job, how to implement it with JobInfo??

×
×
  • Create New...

Important Information

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