Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Creating Weapon 2 Hands


Valentine90
 Share

Recommended Posts

**Sorry my english**

I know that there may be tutorials for the same purpose, but this is the most simple and quick to make two-handed weapon.

**Open Server**

**1** - In **modPlayer**, look for:

```
Case ITEM_TYPE_WEAPON
```

**2** - Below add:

```
' if you have a shield equipped and weapon is 2 hands

If GetPlayerEquipment(Index, Shield) > 0 Then

If ItemNum = 1 Then

PlayerMsg Index, "You must remove the shield to equip a two-handed weapon.", BrightRed

Exit Sub

End If

End If
```

**3** - Look for:

```
Case ITEM_TYPE_SHIELD
```

**4** - Below add:

```
' If a weapon is equipped with 2 hands

If GetPlayerEquipment(Index, Weapon) > 0 Then

If GetPlayerEquipment(Index, Weapon) = 1 Then

PlayerMsg Index, "You can not use shield, you are using a two-handed weapon.", BrightRed

Exit Sub

End If

End If
```

**5** - Now just modify the ID 1 for two-handed weapon of editor items.

Note: If you want to put more than one two-handed weapon, you should use **Or** like this:

```
If ItemNum = 1 Or ItemNum = 2 Then
```
Also

```
If GetPlayerEquipment(Index, Weapon) = 1 Or GetPlayerEquipment(Index, Weapon) = 2 Then
```

**Credits:**

Valentine
Link to comment
Share on other sites

Not trying to bash your tutorial, but i made a tutorial for two handed weapons that is a bit more convenient. If you have a one handed weapon and a shield, it unequips them and equips the two handed weapon. If you only have one free space in your inventory, it gives you a message that you need more room in your inventory. Its practically the same system like in Runescape.

ON TOPIC: It was a great tutorial, quick and simple. But to be honest, it gets annoying (especially in a pvp or pvm situation) when you have to go to your char screen and unequip a shield or a two handed weapon in order to wield a two handed weapon or shield.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...