Jump to content
  • 0

Gunslinger dual-wielding


Scylla

Question


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

Yeah i successfully made a Dual-Wielding gunslinger but the problem is, It attacks like a dual dagger sin. And if i equipped the two revolvers together, bullets is not required anymore. Anyone can help me o how to require bullets when it's also equipped with 2 guns?
 
Here's what i've edited:
 

on pc.h

enum weapon_type {
	W_FIST,	//Bare hands
	W_DAGGER,	//1
	W_1HSWORD,	//2
	W_2HSWORD,	//3
	W_1HSPEAR,	//4
	W_2HSPEAR,	//5
	W_1HAXE,	//6
	W_2HAXE,	//7
	W_MACE,	//8
	W_2HMACE,	//9 (unused)
	W_STAFF,	//10
	W_BOW,	//11
	W_KNUCKLE,	//12	
	W_MUSICAL,	//13
	W_WHIP,	//14
	W_BOOK,	//15
	W_KATAR,	//16
	W_REVOLVER,	//17
	W_RIFLE,	//18
	W_GATLING,	//19
	W_SHOTGUN,	//20
	W_GRENADE,	//21
	W_HUUMA,	//22
	W_2HSTAFF,	//23
	MAX_WEAPON_TYPE,
	// dual-wield constants
	W_DOUBLE_DD, // 2 daggers
	W_DOUBLE_SS, // 2 swords
	W_DOUBLE_AA, // 2 axes
	W_DOUBLE_DS, // dagger + sword
	W_DOUBLE_DA, // dagger + axe
	W_DOUBLE_SA, // sword + axe
	W_DOUBLE_GU, // 2 guns

I added W_DOUBLE_GU, // 2 guns

 


on pc.c

int pc_equippoint(struct map_session_data *sd,int n)
{
	int ep = 0;

	nullpo_ret(sd);

	if(!sd->inventory_data[n])
		return 0;

	if (!itemdb_isequip2(sd->inventory_data[n]))
		return 0; //Not equippable by players.
	
	ep = sd->inventory_data[n]->equip;
	if(sd->inventory_data[n]->look == W_DAGGER	||
		sd->inventory_data[n]->look == W_1HSWORD ||
		sd->inventory_data[n]->look == W_1HAXE ||
		sd->inventory_data[n]->look == W_REVOLVER)	{
		if(ep == EQP_HAND_R && (pc_checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN) || (sd->class_&MAPID_UPPERMASK) == MAPID_GUNSLINGER)
			return EQP_ARMS;
	}
	return ep;

In here i added (sd->class_&MAPID_UPPERMASK) == MAPID_GUNSLINGER)

 

and again on pc.c

	// dual-wield
	sd->status.weapon = 0;
	switch (sd->weapontype1){
	case W_DAGGER:
		switch (sd->weapontype2) {
		case W_DAGGER:  sd->status.weapon = W_DOUBLE_DD; break;
		case W_1HSWORD: sd->status.weapon = W_DOUBLE_DS; break;
		case W_1HAXE:   sd->status.weapon = W_DOUBLE_DA; break;
		}
		break;
	case W_1HSWORD:
		switch (sd->weapontype2) {
		case W_DAGGER:  sd->status.weapon = W_DOUBLE_DS; break;
		case W_1HSWORD: sd->status.weapon = W_DOUBLE_SS; break;
		case W_1HAXE:   sd->status.weapon = W_DOUBLE_SA; break;
		}
		break;
	case W_1HAXE:
		switch (sd->weapontype2) {
		case W_DAGGER:  sd->status.weapon = W_DOUBLE_DA; break;
		case W_1HSWORD: sd->status.weapon = W_DOUBLE_SA; break;
		case W_1HAXE:   sd->status.weapon = W_DOUBLE_AA; break;
		}
		break;
	case W_REVOLVER:
		switch (sd->weapontype2) {
		case W_REVOLVER: sd->status.weapon = W_DOUBLE_GU; break;
		}
		
	}

And here i added case W_REVOLVER:

        switch (sd->weapontype2) {
        case W_REVOLVER: sd->status.weapon = W_DOUBLE_GU; break;

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  319
  • Reputation:   198
  • Joined:  11/14/11
  • Last Seen:  

In pc.c you may need to add to this line to allow the bullets to give their element (holy bullets for example)....

 

	case SP_ATKELE:
		if(val >= ELE_MAX) {
			ShowError("pc_bonus: SP_ATKELE: Invalid element %d\n", val);
			break;
		}
		switch (sd->state.lr_flag)
		{
		case 2:
			switch (sd->status.weapon) {
				case W_BOW:
				case W_REVOLVER:
				case W_RIFLE:
				case W_GATLING:
				case W_SHOTGUN:
				case W_GRENADE:
					//Become weapon element.
					status->rhw.ele=val;
					break;
				default: //Become arrow element.
					sd->arrow_ele=val;
					break;
			}
			break;
		case 1:
			status->lhw.ele=val;
			break;
		default:
			status->rhw.ele=val;
			break;
		}
		break;

 

 

Their's also a SP_ATTACKRANGE you might need to add to as well. Also search around in the battle.c file for something like W_REVOLVER and youll find the spots where youll need to add your custom weapon mask to require bullets. Also I don't know if this is required, but be sure to check your job_db.txt to see if you need to add a new column for setting the attack speed for duel welding revolvers. What exactly do you mean by they attack like assassins?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

In pc.c you may need to add to this line to allow the bullets to give their element (holy bullets for example)....

 

	case SP_ATKELE:
		if(val >= ELE_MAX) {
			ShowError("pc_bonus: SP_ATKELE: Invalid element %d\n", val);
			break;
		}
		switch (sd->state.lr_flag)
		{
		case 2:
			switch (sd->status.weapon) {
				case W_BOW:
				case W_REVOLVER:
				case W_RIFLE:
				case W_GATLING:
				case W_SHOTGUN:
				case W_GRENADE:
					//Become weapon element.
					status->rhw.ele=val;
					break;
				default: //Become arrow element.
					sd->arrow_ele=val;
					break;
			}
			break;
		case 1:
			status->lhw.ele=val;
			break;
		default:
			status->rhw.ele=val;
			break;
		}
		break;

 

 

Their's also a SP_ATTACKRANGE you might need to add to as well. Also search around in the battle.c file for something like W_REVOLVER and youll find the spots where youll need to add your custom weapon mask to require bullets. Also I don't know if this is required, but be sure to check your job_db.txt to see if you need to add a new column for setting the attack speed for duel welding revolvers. What exactly do you mean by they attack like assassins?

 

Thank rytech! I mean they attack assassins like if you have a sin with dual dagger on it, it has a chance to have that 4x attack in a row right? That one.

 

EDIT: Oh nevermind, It's because of the Chain Action skill which causes it. Anyway the bullet requirement still don't work. I added W_DOUBLE_GU on those spots that require bullets but still if i equip the 2 revolvers together, it still doesn't consume bullets. It only consumes if i equip only one revolver (Either if i equip it on left hand or right hand as long as i only equip one)

Edited by Mary Magdalene
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...