Jump to content

Technoken

Members
  • Posts

    505
  • Joined

  • Days Won

    8

Posts posted by Technoken

  1. Also check if ports are opened. Try to contact your host and ask them to open port 3306.

    If they tell you that your ports are open, try to execute this command via root on your ro server vps.

    setsebool -P httpd_can_network_connect=1

    If the above command doesn't work, try to execute this instead

    /usr/sbin/setsebool httpd_can_network_connect 1

     

    • Upvote 1
  2. Does your server trunk hosted on the same VPS with the database?
    You can use 127.0.0.1 as the host name if they're on the same vps.

    And try to put your WAN ip in  'ServerAddress' instead of the hostname.

    Also try to check this if you're using 2 different host. You might need to allow permission for the other database to connect.

     

     

  3. Try this just expand the dialogue.

    prontera,156,176,5	script	sdhsh2323f	100,{
    mes "[Identifier]";
    mes "Hello, would you like to identify all your unidentified items for 200 zeny each?";
    next;
    getinventorylist;
    for( .@i=0; .@i<@inventorylist_count; .@i++ ) {
    	if( @inventorylist_identify[.@i] )
    		continue;
    	.@identify++;
    }
    if( !.@identify ) {
    	mes "[Identifier]";
    	mes "You don't have any unidentified item in your inventory.";
    	close;
    }
    mes "[Identifier]";
    mes "Found "+.@identify+" unidentified item(s)";
    mes "Cost: "+(.@identify*200)+"z";
    next;
    if( select("Identify All:I'll think about it")&2)close;
    if( Zeny < .@identify*200 ) {
    	mes "[Identifier]";
    	mes "I'm sorry you don't have enough Zeny";
    	close;
    }
    Zeny -= .@identify*200;
    atcommand "@identifyall";
    mes "[Identifier]";
    mes "All your items have been identified!";
    close;
    }

     

    • Upvote 1
  4. This part, you need to specifiy if its AddHunting or AddCollection.

    	("Bloody Branch Wisdom",99,255,12103,1,500000,10000,2000,604,150,7939,5,7203,5);
          
    	("Leveling Quest 150-200",150,200,32503,2,500000,300000,150000,1219,25);
    	("Leveling Quest 201-254",201,254,32503,2,750000,900000,300000,2085,20,2086,15);

     

    Shoud be

    	AddCollection("Bloody Branch Wisdom",99,255,12103,1,500000,10000,2000,604,150,7939,5,7203,5);
    
    	AddHunting("Leveling Quest 150-200",150,200,32503,2,500000,300000,150000,1219,25);
    	AddHunting("Leveling Quest 201-254",201,254,32503,2,750000,900000,300000,2085,20,2086,15);

     

    • Upvote 2
  5. Might be implemented once migration to C++ is implemented.

    Quote

    In addition, rAthena being in C++ open the possibility for a nice plugin system to make mod developers' life easier. Also, currently the project will not compile on Linux. We will make a change to our Makefile later to support Linux.

     

  6. Try

    -	script	tesqweqweast	-1,{
    OnInit:
    	initnpctimer;
    	end;
    
    OnTimer5000:
    	stopnpctimer;
    	deletearray .players;
    	addrid(5,1,"guild_vs1");
    	.players[getarraysize(.players)] = getcharid(3);
    	detachrid;
    	while( .@i < getarraysize(.players) ){
    		if( attachrid( .players[.@i] ) )
    			if( HP && compare( strcharinfo(3),"guild_vs1" ) )
    				.@alive++;
    		.@i++;
    	}
    	if( .@alive ){
    		initnpctimer;
    		end;
    	}
    	deletearray .players;
    	announce "Players are all the dead",0;
    	mapwarp "guild_vs1","prontera",155,181;
    	end;
    }

     

    • Upvote 1
  7. 5 hours ago, kabralgaming said:

    I would like to swap

    I thought you would like to swap it? /hmm

    Do you want to make it like a costume item? You cannot use SC_START show both item sprite.

    I guess you wanted to make it like a costume item. Try this

    Blue_Valkyrie_Helm_S,Blue Valkyrie Helm S,4,100000,,,,5,,4,0xFFFFFFFF,63,2,1024,,0,1,3000,{},{},{} 

     

  8. Cyro already told you what to do. Just swap their view id's

    27 minutes ago, Cyro said:

    if you want change look of the gear change 3000 to 1267

     

    20132,C_Aura_Vicious_Mind,Costume Aura Vicious Mind,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,3000,{},{},{}
    Blue_Valkyrie_Helm_S,Blue Valkyrie Helm S,4,100000,,,,5,,4,0xFFFFFFFF,63,2,256,,0,1,1267,{},{ sc_start SC_TIME_ACCESSORY,-1,0; },{ sc_end SC_TIME_ACCESSORY; } 

     

  9. 2 minutes ago, Bringer said:

    yes old

    Try this

    Index: atcommand.c
    ===================================================================
    --- atcommand.c	(revision 17454)
    +++ atcommand.c	(working copy)
    @@ -1117,7 +1117,7 @@
     ACMD_FUNC(item)
     {
     	char item_name[100];
    -	int number = 0, item_id, flag = 0;
    +	int number = 0, item_id, flag = 0, costume = 0;
     	struct item item_tmp;
     	struct item_data *item_data;
     	int get_count, i;
    @@ -1142,7 +1142,27 @@
     		clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name.
     		return -1;
     	}
    -
    +	
    +	if( !strcmpi(command+1,"costumeitem") )
    +	{
    +		if( !battle_config.reserved_costume_id )
    +		{
    +			clif_displaymessage(fd, "Costume convertion is disable. Set a value for reserved_cosutme_id on your battle.conf file.");
    +			return -1;
    +		}
    +		if( !(item_data->equip&EQP_HEAD_LOW) &&
    +			!(item_data->equip&EQP_HEAD_MID) &&
    +			!(item_data->equip&EQP_HEAD_TOP) &&
    +			!(item_data->equip&EQP_COSTUME_HEAD_LOW) &&
    +			!(item_data->equip&EQP_COSTUME_HEAD_MID) &&
    +			!(item_data->equip&EQP_COSTUME_HEAD_TOP) )
    +		{
    +			clif_displaymessage(fd, "You cannot costume this item. Costume only work for headgears.");
    +			return -1;
    +		}
    +		costume = 1;
    +	}
    +	
     	item_id = item_data->nameid;
     	get_count = number;
     	//Check if it's stackable.
    @@ -1155,7 +1175,13 @@
     			memset(&item_tmp, 0, sizeof(item_tmp));
     			item_tmp.nameid = item_id;
     			item_tmp.identify = 1;
    -
    +			if( costume == 1 )
    +			{ // Costume Item
    +				item_tmp.card[0] = CARD0_CREATE;
    +				item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0);
    +				item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1);
    +			}
    +			
     			if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND)))
     				clif_additem(sd, 0, 0, flag);
     		}
    @@ -9251,7 +9277,9 @@
     		ACMD_DEF(channel),
     		ACMD_DEF(fontcolor),
     		ACMD_DEF(langtype),
    -		ACMD_DEF(reloadmsgconf)
    +		ACMD_DEF(reloadmsgconf),
    +		ACMD_DEF2("costumeitem", item)
    +		
     	};
     	AtCommandInfo* atcommand;
     	int i;
    Index: battle.c
    ===================================================================
    --- battle.c	(revision 17454)
    +++ battle.c	(working copy)
    @@ -5939,6 +5939,7 @@
     	{ "item_enabled_npc",                   &battle_config.item_enabled_npc,                1,      0,      1,              },
     	{ "item_flooritem_check",               &battle_config.item_onfloor,                    1,      0,      1,              },
     	{ "bowling_bash_area",                  &battle_config.bowling_bash_area,               0,      0,      20,             },
    +	{ "reserved_costume_id",                &battle_config.reserved_costume_id,             999998, 0,      INT_MAX,        },
     };
     #ifndef STATS_OPT_OUT
     /**
    Index: battle.h
    ===================================================================
    --- battle.h	(revision 17454)
    +++ battle.h	(working copy)
    @@ -488,6 +488,10 @@
     	int item_enabled_npc;
     	int item_onfloor; // Whether to drop an undroppable item on the map or destroy it if inventory is full.
     	int bowling_bash_area;
    +	
    +	// Costume System
    +	int reserved_costume_id;
    +	
     	} battle_config;
     
     void do_init_battle(void);
    Index: map.c
    ===================================================================
    --- map.c	(revision 17454)
    +++ map.c	(working copy)
    @@ -1537,7 +1537,13 @@
     	struct map_session_data* tsd;
     
     	nullpo_retv(sd);
    -
    +	
    +	if( battle_config.reserved_costume_id && battle_config.reserved_costume_id == charid )
    +	{
    +		clif_solved_charname(sd->fd, charid, "Costume");
    +		return;
    +	}
    +	
     	tsd = map_charid2sd(charid);
     	if( tsd )
     	{
    Index: pc.c
    ===================================================================
    --- pc.c	(revision 17454)
    +++ pc.c	(working copy)
    @@ -66,8 +66,7 @@
     struct fame_list chemist_fame_list[MAX_FAME_LIST];
     struct fame_list taekwon_fame_list[MAX_FAME_LIST];
     
    -static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT,EQP_AMMO};
    -
    +static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_AMMO,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT};
     #define MOTD_LINE_SIZE 128
     static char motd_text[MOTD_LINE_SIZE][CHAT_SIZE_MAX]; // Message of the day buffer [Valaris]
     
    @@ -586,7 +585,7 @@
     
     int pc_equippoint(struct map_session_data *sd,int n)
     {
    -	int ep = 0;
    +	int ep = 0, char_id = 0;
     
     	nullpo_ret(sd);
     
    @@ -604,6 +603,15 @@
     			(sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO))//Kagerou and Oboro can dual wield daggers. [Rytech]
     			return EQP_ARMS;
     	}
    +	
    +	if( battle_config.reserved_costume_id &&
    +		sd->status.inventory[n].card[0] == CARD0_CREATE &&
    +		(char_id = MakeDWord(sd->status.inventory[n].card[2],sd->status.inventory[n].card[3])) == battle_config.reserved_costume_id )
    +	{ // Costume Item - Converted
    +		if( ep&EQP_HEAD_TOP ) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }
    +		if( ep&EQP_HEAD_LOW ) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }
    +		if( ep&EQP_HEAD_MID ) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }
    +	}
     	return ep;
     }
     
    @@ -1910,8 +1918,8 @@
     				if( autobonus[i].bonus_script )
     				{
     					int j;
    -					ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos );
    -					if( j < EQI_MAX-1 )
    +					ARR_FIND( 0, EQI_MAX_BONUS, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos );
    +					if( j < EQI_MAX_BONUS )
     						script_run_autobonus(autobonus[i].bonus_script,sd->bl.id,sd->equip_index[j]);
     				}
     				continue;
    @@ -1941,8 +1949,8 @@
     	if( autobonus->other_script )
     	{
     		int j;
    -		ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos );
    -		if( j < EQI_MAX-1 )
    +		ARR_FIND( 0, EQI_MAX_BONUS, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos );
    +		if( j < EQI_MAX_BONUS )
     			script_run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]);
     	}
     
    Index: pc.h
    ===================================================================
    --- pc.h	(revision 17454)
    +++ pc.h	(working copy)
    @@ -37,11 +37,12 @@
     	EQI_ARMOR,
     	EQI_HAND_L,
     	EQI_HAND_R,
    +	EQI_AMMO,
    +	EQI_MAX_BONUS = 10,
     	EQI_COSTUME_TOP,
     	EQI_COSTUME_MID,
     	EQI_COSTUME_LOW,
     	EQI_COSTUME_GARMENT,
    -	EQI_AMMO,
     	EQI_MAX
     };
     
    Index: script.c
    ===================================================================
    --- script.c	(revision 17454)
    +++ script.c	(working copy)
    @@ -17596,6 +17596,52 @@
     	return 0;
     }
     
    +/*==========================================
    + * Costume Items
    + *------------------------------------------*/
    +BUILDIN_FUNC(costume)
    +{
    +	int i = -1, num, ep;
    +	TBL_PC *sd;
    +
    +	num = script_getnum(st,2); // Equip Slot
    +	sd = script_rid2sd(st);
    +
    +	if( sd == NULL )
    +		return 0;
    +	if( num > 0 && num <= ARRAYLENGTH(equip) )
    +		i = pc_checkequip(sd, equip[num - 1]);
    +	if( i < 0 )
    +		return 0;
    +
    +	ep = sd->status.inventory[i].equip;
    +	if( !(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP) )
    +		return 0;
    +
    +	log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]);
    +	pc_unequipitem(sd,i,2);
    +	clif_delitem(sd,i,1,3);
    +	// --------------------------------------------------------------------
    +	sd->status.inventory[i].refine = 0;
    +	sd->status.inventory[i].attribute = 0;
    +	sd->status.inventory[i].card[0] = CARD0_CREATE;
    +	sd->status.inventory[i].card[1] = 0;
    +	sd->status.inventory[i].card[2] = GetWord(battle_config.reserved_costume_id, 0);
    +	sd->status.inventory[i].card[3] = GetWord(battle_config.reserved_costume_id, 1);
    +
    +	if( ep&EQP_HEAD_TOP ) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }
    +	if( ep&EQP_HEAD_LOW ) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }
    +	if( ep&EQP_HEAD_MID ) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }
    +	// --------------------------------------------------------------------
    +	log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]);
    +
    +	clif_additem(sd,i,1,0);
    +	pc_equipitem(sd,i,ep);
    +	clif_misceffect(&sd->bl,3);
    +
    +	return 0;
    +}
    +
     // declarations that were supposed to be exported from npc_chat.c
     #ifdef PCRE_SUPPORT
     BUILDIN_FUNC(defpattern);
    @@ -18060,5 +18106,9 @@
     	BUILDIN_DEF(checkquest, "i?"),
     	BUILDIN_DEF(changequest, "ii"),
     	BUILDIN_DEF(showevent, "ii"),
    +	
    +	// Costume System
    +	BUILDIN_DEF(costume,"i"),
    +	
     	{NULL,NULL,NULL},
     };
    Index: status.c
    ===================================================================
    --- status.c	(revision 17454)
    +++ status.c	(working copy)
    @@ -2455,7 +2455,7 @@
     	pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true);
     
     	// Parse equipment.
    -	for(i=0;i<EQI_MAX-1;i++) {
    +	for(i=0;i<EQI_MAX_BONUS;i++) {
     		current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
     		if(index < 0)
     			continue;
    Index: battle.conf
    ===================================================================
    --- battle.conf	(revision 17454)
    +++ battle.conf	(working copy)
    @@ -141,3 +141,9 @@
     // range. For example, Sonic Blow requires a 2 cell distance before autocasting is allowed.
     // This setting also affects autospellwhenhit.
     autospell_check_range: no
    +
    +// ****************************************
    +// Reserved Costume ID's
    +// ****************************************
    +// Reserved Char ID for costume converted items.
    +reserved_costume_id: 999998

     

  10. For jRO Costumes try this script

    prontera,168,178,1	script	jRO Outfit	122,{
    	if( Class < 4054 || Class > 4087 ) {
    		mes "[jRO Outfit]";
    		mes "Sorry,";
    		mes "Only 3rd Jobs are allowed to change outfit.";
    		close;
    	}
    	mes "[jRO Outfit]";
    	mes "Hi. Which outfit do you like?";
    	next;
    	if( select("jRO:Default")&2) {
    		setlook LOOK_BODY2,0;
    		mes "[jRO Outfit]";
    		mes "Enjoy your default outfit!"
    		close;
    	}
    	if( Class == 4054 || Classs == 4060 || Class == 4070 || Class == 4077 || Class == 4067 || Class == 4074 ) {
    		mes "[jRO Outfit]";
    		mes "Sorry, there's no jRO outfit available to this job";
    		close;
    	}
    	setlook LOOK_BODY2,1;
    	mes "[jRO Outfit]";
    	mes "Enjoy your jRO outfit!"
    	close;
    }

    PS: I didn't test it.

    If you wan't the jRO costumes to be saved when player relog set this to yes
    https://github.com/rathena/rathena/blob/master/conf/battle/client.conf#L128

  11. 17 hours ago, Questune09 said:

    sir how to enable this what are the things i have to do ^_^

    Add the script provided to your custom scripts.

    Open your custom grf and add Daily_00.bmp to Daily_28.bmp inside data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\illust folder

    • Upvote 2
×
×
  • Create New...