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

[EO 3.0 - DX8 ONLY] Wabbit's Ranged Projectiles!


Whackeddie99
 Share

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Oh yeah, I get what you are saying, but, I have not gotten that far.

I am still trying to make the exe out of the client code.  When I try to make the .exe  in VB6 that is when I get the compiling error.

Here is a rar of my client files if you can look at it…
[http://www.mediafire.com/?c9vvizq13apijj3](http://www.mediafire.com/?c9vvizq13apijj3)

nneader
Link to comment
Share on other sites

@Mortal:

> Arrows does no damage… It shoot, arrow is drawed but no damage >.<

look, you need to open your item editor, and put a damage. You can't leave it at 0, or it does no damage. Same goes for speed, except the more speed the slower it actually is. Same for the picture, and the range.
Link to comment
Share on other sites

  • 2 months later...
> I know but it does too no damage ;-) I tryed it to set the damage at the pic from the projectiles and at ther normal damage scroll but both has not worked…

> In Sub PlayerAttackNpc before:
>
> Name = Trim$(Npc(npcNum).Name)
>
> Insert:
>
> If npcNum < 1 Then Exit Sub

Comment out "If npcNum < 1 Then Exit Sub" and if it works, then you've put this in the wrong place. ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
> well we have a bug in this system
>
> when you kill an NPC you cant kill other in same line because the dead npc in front let a invisible block to next projectile

Try replacing sub handleprojectiles with this one:

```
Public Sub HandleProjecTile(ByVal Index As Long, ByVal PlayerProjectile As Long)

Dim x As Long, y As Long, i As Long

' check for subscript out of range

If Index < 1 Or Index > MAX_PLAYERS Or PlayerProjectile < 1 Or PlayerProjectile > MAX_PLAYER_PROJECTILES Then Exit Sub

' check to see if it's time to move the Projectile

If GetTickCount > TempPlayer(Index).ProjecTile(PlayerProjectile).TravelTime Then

With TempPlayer(Index).ProjecTile(PlayerProjectile)

' set next travel time and the current position and then set the actual direction based on RMXP arrow tiles.

Select Case .Direction

' down

Case DIR_DOWN

.y = .y + 1

' check if they reached maxrange

If .y = (GetPlayerY(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub

' up

Case DIR_UP

.y = .y - 1

' check if they reached maxrange

If .y = (GetPlayerY(Index) - .Range) - 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub

' right

Case DIR_RIGHT

.x = .x + 1

' check if they reached max range

If .x = (GetPlayerX(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub

' left

Case DIR_LEFT

.x = .x - 1

' check if they reached maxrange

If .x = (GetPlayerX(Index) - .Range) - 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub

End Select

.TravelTime = GetTickCount + .Speed

End With

End If

x = TempPlayer(Index).ProjecTile(PlayerProjectile).x

y = TempPlayer(Index).ProjecTile(PlayerProjectile).y

' check if left map

If x > Map(GetPlayerMap(Index)).MaxX Or y > Map(GetPlayerMap(Index)).MaxY Or x < 0 Or y < 0 Then

ClearProjectile Index, PlayerProjectile

Exit Sub

End If

' check if hit player

For i = 1 To Player_HighIndex

' make sure they're actually playing

If IsPlaying(i) Then

' check coordinates

If x = Player(i).x And y = GetPlayerY(i) Then

' make sure it's not the attacker

If Not x = Player(Index).x Or Not y = GetPlayerY(Index) Then

' check if player can attack

If CanPlayerAttackPlayer(Index, i, False, True) = True Then

' attack the player and kill the project tile

PlayerAttackPlayer Index, i, TempPlayer(Index).ProjecTile(PlayerProjectile).Damage

ClearProjectile Index, PlayerProjectile

Exit Sub

End If

End If

End If

End If

Next

' check for npc hit

For i = 1 To MAX_MAP_NPCS

If x = MapNpc(GetPlayerMap(Index)).Npc(i).x And y = MapNpc(GetPlayerMap(Index)).Npc(i).y Then

' they're hit, remove it and deal that damage ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)

If CanPlayerAttackNpc(Index, i, True) Then

PlayerAttackNpc Index, i, TempPlayer(Index).ProjecTile(PlayerProjectile).Damage

ClearProjectile Index, PlayerProjectile

Exit Sub

End If

End If

Next

' hit a block

If Map(GetPlayerMap(Index)).Tile(x, y).Type = TILE_TYPE_BLOCKED Then

' hit a block, clear it.

ClearProjectile Index, PlayerProjectile

Exit Sub

End If

End Sub
```
Link to comment
Share on other sites

  • 2 months later...

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...