Jacquelinett Posted August 25, 2011 Share Posted August 25, 2011 you need vb6 for almost all the thing in EO. Without Vb6, you can only use what you have right now and can't add anything Link to comment Share on other sites More sharing options...
ChrisWR Posted August 25, 2011 Share Posted August 25, 2011 Yep i got a label called lblProjectilePicI make a copy of all my files and imported the uploaded form work and it works fine , so i tried to find out what was different but i cant seem to find a single thing that the uploaded form work has that i dontI havent lost any other work by using the uploaded form work , im just kinda noobish at vb6 still and would like to know what causes this kinda problem Link to comment Share on other sites More sharing options...
evilbunnie Posted August 25, 2011 Author Share Posted August 25, 2011 @TianaJRP:> you need vb6 for almost all the thing in EO. Without Vb6, you can only use what you have right now and can't add anything…What are you on about?@Chris, if it's giving you that error, you obviously do /not/ have a label called that. Link to comment Share on other sites More sharing options...
Peter112 Posted August 26, 2011 Share Posted August 26, 2011 Can NPCs shot? Link to comment Share on other sites More sharing options...
erkro1 Posted August 26, 2011 Share Posted August 26, 2011 @Peter112:> Can NPCs shot?This mod only works for players, not NPCs ;) Link to comment Share on other sites More sharing options...
ZeoWorks Posted September 3, 2011 Share Posted September 3, 2011 Great work!~~The only problem I see is that players can attack eachother even within a safe zone. :S~~EDIT: Lol nvm what I just said, I got it fixed now. ^^Also its a shame that you can't hear the sounds when you shoot at a player, or a firing sound when you press ctrl, Ah wellz.. :) Link to comment Share on other sites More sharing options...
Guest Posted September 3, 2011 Share Posted September 3, 2011 a easy way would be to put a animation with just sound and no animation, then set that animation to the weapon, this would give you sound when you are attacking something at least with the bow. Link to comment Share on other sites More sharing options...
Warden Posted September 4, 2011 Share Posted September 4, 2011 ummh,i did everything what tutorial said but when i shoot someone the projectile wont appear and NPC wont get any damage :/ Link to comment Share on other sites More sharing options...
evilbunnie Posted September 22, 2011 Author Share Posted September 22, 2011 bump for lulz! Link to comment Share on other sites More sharing options...
Guest Posted September 29, 2011 Share Posted September 29, 2011 This is a nice source edit! Pretty useful!…Yet I have a one question...How can you make the arrows/projectiles stop when it hits a resource? -Kindly, Night~ Link to comment Share on other sites More sharing options...
Asgarith Posted September 30, 2011 Share Posted September 30, 2011 ~~can someone iluminate me with their wisdom and tell me where is Sub Main? coz i can't find it in my src folderEdit: found it in modGeneral, hope it is thatRe-edit: In modDirectDraw7 insert:```' player ProjectilesPublic Sub BltProjectile(ByVal Index As Long, ByVal PlayerProjectile As Long)Dim x As Long, y As Long, PicNum As Long, i As LongDim rec As DxVBLib.RECT ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' check for subscript error If Index < 1 Or PlayerProjectile < 1 Or PlayerProjectile > MAX_PLAYER_PROJECTILES Then Exit Sub ' check to see if it's time to move the Projectile If GetTickCount > Player(Index).ProjecTile(PlayerProjectile).TravelTime Then With Player(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 0 .y = .y + 1 ' check if they reached maxrange If .y = (GetPlayerY(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' up Case 1 .y = .y - 1 ' check if they reached maxrange If .y = (GetPlayerY(Index) - .Range) - 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' right Case 2 .x = .x + 1 ' check if they reached max range If .x = (GetPlayerX(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' left Case 3 .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 ' set the x, y & pic values for future reference x = Player(Index).ProjecTile(PlayerProjectile).x y = Player(Index).ProjecTile(PlayerProjectile).y PicNum = Player(Index).ProjecTile(PlayerProjectile).Pic ' check if left map If x > Map.MaxX Or y > Map.MaxY Or x < 0 Or y < 0 Then ClearProjectile Index, PlayerProjectile Exit Sub End If ' check if we hit a block If Map.Tile(x, y).Type = TILE_TYPE_BLOCKED Then ClearProjectile Index, PlayerProjectile Exit Sub End If ' check for player hit For i = 1 To Player_HighIndex If x = GetPlayerX(i) And y = GetPlayerY(i) Then ' they're hit, remove it If Not x = Player(MyIndex).x Or Not y = GetPlayerY(MyIndex) Then ClearProjectile Index, PlayerProjectile Exit Sub End If End If Next ' check for npc hit For i = 1 To MAX_MAP_NPCS If x = MapNpc(i).x And y = MapNpc(i).y Then ' they're hit, remove it ClearProjectile Index, PlayerProjectile Exit Sub End If Next ' if projectile is not loaded, load it, female dog. If DDS_Projectile(PicNum) Is Nothing Then Call InitDDSurf("projectiles\" & PicNum, DDSD_Projectile(PicNum), DDS_Projectile(PicNum)) End If ' get positioning in the texture With rec .top = 0 .Bottom = SIZE_Y .Left = Player(Index).ProjecTile(PlayerProjectile).Direction * SIZE_X .Right = .Left + SIZE_X End With ' blt the projectile Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Projectile(PicNum), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) ' Error handler Exit Suberrorhandler: HandleError "BltProjectile", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```~~i can place that anywhere i want inside modDirectDraw7?~~Final edit: Could someone tell me if anyone had uploaded the client with this modification and that works? i made all the process and i can't use them…~~ Link to comment Share on other sites More sharing options...
Justn Posted October 8, 2011 Share Posted October 8, 2011 EDIT: NVM there was a logic error in my canPlayerAttackNpcOk what is the line needed to keep you from killing friendly npcs with projectiles?Because I can still kill friendly npcs is there a logic mistake in my sub?```Public Sub PlayerAttackNpc(ByVal attacker As Long, ByVal MapNpcNum As Long, ByVal Damage As Long, Optional ByVal SpellNum As Long, Optional ByVal overTime As Boolean = False) Dim Name As String Dim exp As Long Dim n As Long Dim i As Long Dim STR As Long Dim DEF As Long Dim mapnum As Long Dim npcNum As Long Dim Buffer As clsBuffer ' Check for subscript out of range If IsPlaying(attacker) = False Or MapNpcNum <= 0 Or MapNpcNum > MAX_MAP_NPCS Or Damage < 0 Then Exit Sub End If mapnum = GetPlayerMap(attacker) npcNum = MapNpc(mapnum).NPC(MapNpcNum).Num If npcNum < 1 Then Exit Sub Name = Trim$(NPC(npcNum).Name) ' Check for weapon n = 0 If GetPlayerEquipment(attacker, Weapon) > 0 Then n = GetPlayerEquipment(attacker, Weapon) End If ' set the regen timer TempPlayer(attacker).stopRegen = True TempPlayer(attacker).stopRegenTimer = GetTickCount If Damage >= MapNpc(mapnum).NPC(MapNpcNum).Vital(Vitals.HP) Then SendActionMsg GetPlayerMap(attacker), "-" & MapNpc(mapnum).NPC(MapNpcNum).Vital(Vitals.HP), BrightRed, 1, (MapNpc(mapnum).NPC(MapNpcNum).x * 32), (MapNpc(mapnum).NPC(MapNpcNum).y * 32) SendBlood GetPlayerMap(attacker), MapNpc(mapnum).NPC(MapNpcNum).x, MapNpc(mapnum).NPC(MapNpcNum).y ' send the sound If SpellNum > 0 Then SendMapSound attacker, MapNpc(mapnum).NPC(MapNpcNum).x, MapNpc(mapnum).NPC(MapNpcNum).y, SoundEntity.seSpell, SpellNum ' send animation If n > 0 Then If Not overTime Then If SpellNum = 0 Then Call SendAnimation(mapnum, Item(GetPlayerEquipment(attacker, Weapon)).Animation, MapNpc(mapnum).NPC(MapNpcNum).x, MapNpc(mapnum).NPC(MapNpcNum).y) End If End If ' Calculate exp to give attacker exp = NPC(npcNum).exp ' Make sure we dont get less then 0 If exp < 0 Then exp = 1 End If ' in party? If TempPlayer(attacker).inParty > 0 Then ' pass through party sharing function Party_ShareExp TempPlayer(attacker).inParty, exp, attacker Else ' no party - keep exp for self GivePlayerEXP attacker, exp End If 'Drop the goods if they get it For n = 1 To MAX_NPC_DROPS If NPC(npcNum).DropItem(n) = 0 Then Exit For If Rnd <= NPC(npcNum).DropChance(n) Then Call SpawnItem(NPC(npcNum).DropItem(n), NPC(npcNum).DropItemValue(n), mapnum, MapNpc(mapnum).NPC(MapNpcNum).x, MapNpc(mapnum).NPC(MapNpcNum).y) End If Next ' Now set HP to 0 so we know to actually kill them in the server loop (this prevents subscript out of range) MapNpc(mapnum).NPC(MapNpcNum).Num = 0 MapNpc(mapnum).NPC(MapNpcNum).SpawnWait = GetTickCount MapNpc(mapnum).NPC(MapNpcNum).Vital(Vitals.HP) = 0 ' clear DoTs and HoTs For i = 1 To MAX_DOTS With MapNpc(mapnum).NPC(MapNpcNum).DoT(i) .Spell = 0 .Timer = 0 .Caster = 0 .StartTime = 0 .Used = False End With With MapNpc(mapnum).NPC(MapNpcNum).HoT(i) .Spell = 0 .Timer = 0 .Caster = 0 .StartTime = 0 .Used = False End With Next Call CheckTasks(attacker, QUEST_TYPE_GOSLAY, npcNum) ' send death to the map Set Buffer = New clsBuffer Buffer.WriteLong SNpcDead Buffer.WriteLong MapNpcNum SendDataToMap mapnum, Buffer.ToArray() Set Buffer = Nothing 'Loop through entire map and purge NPC from targets For i = 1 To Player_HighIndex If IsPlaying(i) And IsConnected(i) Then If Player(i).Map = mapnum Then If TempPlayer(i).targetType = TARGET_TYPE_NPC Then If TempPlayer(i).target = MapNpcNum Then TempPlayer(i).target = 0 TempPlayer(i).targetType = TARGET_TYPE_NONE SendTarget i End If End If End If End If Next Else ' NPC not dead, just do the damage MapNpc(mapnum).NPC(MapNpcNum).Vital(Vitals.HP) = MapNpc(mapnum).NPC(MapNpcNum).Vital(Vitals.HP) - Damage ' Check for a weapon and say damage SendActionMsg mapnum, "-" & Damage, BrightRed, 1, (MapNpc(mapnum).NPC(MapNpcNum).x * 32), (MapNpc(mapnum).NPC(MapNpcNum).y * 32) SendBlood GetPlayerMap(attacker), MapNpc(mapnum).NPC(MapNpcNum).x, MapNpc(mapnum).NPC(MapNpcNum).y ' send the sound If SpellNum > 0 Then SendMapSound attacker, MapNpc(mapnum).NPC(MapNpcNum).x, MapNpc(mapnum).NPC(MapNpcNum).y, SoundEntity.seSpell, SpellNum ' send animation If n > 0 Then If Not overTime Then If SpellNum = 0 Then Call SendAnimation(mapnum, Item(GetPlayerEquipment(attacker, Weapon)).Animation, 0, 0, TARGET_TYPE_NPC, MapNpcNum) End If End If ' Set the NPC target to the player MapNpc(mapnum).NPC(MapNpcNum).targetType = 1 ' player MapNpc(mapnum).NPC(MapNpcNum).target = attacker ' Now check for guard ai and if so have all onmap guards come after'm If NPC(MapNpc(mapnum).NPC(MapNpcNum).Num).Behaviour = NPC_BEHAVIOUR_GUARD Then For i = 1 To MAX_MAP_NPCS If MapNpc(mapnum).NPC(i).Num = MapNpc(mapnum).NPC(MapNpcNum).Num Then MapNpc(mapnum).NPC(i).target = attacker MapNpc(mapnum).NPC(i).targetType = 1 ' player End If Next End If ' set the regen timer MapNpc(mapnum).NPC(MapNpcNum).stopRegen = True MapNpc(mapnum).NPC(MapNpcNum).stopRegenTimer = GetTickCount ' if stunning spell, stun the npc If SpellNum > 0 Then If Spell(SpellNum).StunDuration > 0 Then StunNPC MapNpcNum, mapnum, SpellNum ' DoT If Spell(SpellNum).Duration > 0 Then AddDoT_Npc mapnum, MapNpcNum, SpellNum, attacker End If End If SendMapNpcVitals mapnum, MapNpcNum End If If SpellNum = 0 Then ' Reset attack timer TempPlayer(attacker).AttackTimer = GetTickCount End IfEnd Sub``` Link to comment Share on other sites More sharing options...
evilbunnie Posted October 15, 2011 Author Share Posted October 15, 2011 bump Link to comment Share on other sites More sharing options...
XPiXel Posted October 29, 2011 Share Posted October 29, 2011 Great.But where do you keep the projectiles?EDIT: Remove this post. Link to comment Share on other sites More sharing options...
Sickey Posted November 9, 2011 Share Posted November 9, 2011 When I try to start it I get an error saying"Run-Time error '399':Component 'mswinsck.ocx' or one of its dependencies not correctly registered: a file is missing or invalid"Anyone got any idea how to fix it? Please. Link to comment Share on other sites More sharing options...
Robin Posted November 10, 2011 Share Posted November 10, 2011 This has absolutely nothing to do with this tutorial at all. Link to comment Share on other sites More sharing options...
takatoreborn Posted November 12, 2011 Share Posted November 12, 2011 When I shoot projectiles, they'll stop appearing if I shoot them often. They also do no damage.Restarting the client makes the projectiles reappear though. Help? Link to comment Share on other sites More sharing options...
takatoreborn Posted November 13, 2011 Share Posted November 13, 2011 BUmp for answer. :( Link to comment Share on other sites More sharing options...
Surma Posted November 14, 2011 Share Posted November 14, 2011 Whenever I copy and paste code my paste in vb6 does not keep the formatting. I have to manually go in and ad spaces and tabs.Is there some way of pasting the code and maintaining the codes format?Thanksexample:' player ProjectilesPublic Sub BltProjectile(ByVal Index As Long, ByVal PlayerProjectile As Long)Dim x As Long, y As Long, PicNum As Long, i As LongDim rec As DxVBLib.RECT ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' check for subscript error If Index < 1 Or PlayerProjectile < 1 Or PlayerProjectile > MAX_PLAYER_PROJECTILES Then Exit Sub ' check to see if it's time to move the Projectile If GetTickCount > Player(Index).ProjecTile(PlayerProjectile).TravelTime Then With Player(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 0 .y = .y + 1 ' check if they reached maxrange If .y = (GetPlayerY(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' up Case 1 .y = .y - 1 ' check if they reached maxrange If .y = (GetPlayerY(Index) - .Range) - 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' right Case 2 .x = .x + 1 ' check if they reached max range If .x = (GetPlayerX(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' left Case 3 .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 ' set the x, y & pic values for future reference x = Player(Index).ProjecTile(PlayerProjectile).x y = Player(Index).ProjecTile(PlayerProjectile).y PicNum = Player(Index).ProjecTile(PlayerProjectile).Pic ' check if left map If x > Map.MaxX Or y > Map.MaxY Or x < 0 Or y < 0 Then ClearProjectile Index, PlayerProjectile Exit Sub End If ' check if we hit a block If Map.Tile(x, y).Type = TILE_TYPE_BLOCKED Then ClearProjectile Index, PlayerProjectile Exit Sub End If ' check for player hit For i = 1 To Player_HighIndex If x = GetPlayerX(i) And y = GetPlayerY(i) Then ' they're hit, remove it If Not x = Player(MyIndex).x Or Not y = GetPlayerY(MyIndex) Then ClearProjectile Index, PlayerProjectile Exit Sub End If End If Next ' check for npc hit For i = 1 To MAX_MAP_NPCS If x = MapNpc(i).x And y = MapNpc(i).y Then ' they're hit, remove it ClearProjectile Index, PlayerProjectile Exit Sub End If Next ' if projectile is not loaded, load it, female dog. If DDS_Projectile(PicNum) Is Nothing Then Call InitDDSurf("projectiles\" & PicNum, DDSD_Projectile(PicNum), DDS_Projectile(PicNum)) End If ' get positioning in the texture With rec .top = 0 .Bottom = SIZE_Y .Left = Player(Index).ProjecTile(PlayerProjectile).Direction * SIZE_X .Right = .Left + SIZE_X End With ' blt the projectile Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Projectile(PicNum), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) ' Error handler Exit Suberrorhandler: HandleError "BltProjectile", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub Link to comment Share on other sites More sharing options...
Justn Posted November 14, 2011 Share Posted November 14, 2011 Not sure why you posted that here but ok… I use to have the same problem then I switched to firefox instead of Internet explorer and it fixed it. Link to comment Share on other sites More sharing options...
evilbunnie Posted November 18, 2011 Author Share Posted November 18, 2011 I'm sorry to the people asking for help, I've currently got no time available to help. (Exams) Link to comment Share on other sites More sharing options...
lexkymbeth Posted November 19, 2011 Share Posted November 19, 2011 thanks, works perfect. Link to comment Share on other sites More sharing options...
kibbelz Posted November 19, 2011 Share Posted November 19, 2011 Hmm… while testing this on my friends game i noticed that the projectiles seem to jump around whilst in motion. They don't seem to fire smoothly at all.~Kibbelz. Link to comment Share on other sites More sharing options...
evilbunnie Posted November 19, 2011 Author Share Posted November 19, 2011 @kibbelz:> Hmm… while testing this on my friends game i noticed that the projectiles seem to jump around whilst in motion. They don't seem to fire smoothly at all.> > ~Kibbelz.Your friend has done it wrong. It's smooth as hell for me. Link to comment Share on other sites More sharing options...
mrmiguu Posted November 20, 2011 Share Posted November 20, 2011 @Captain:> Your friend has done it wrong. It's smooth as hell for me.Why do you have such a high max-range for the speed scrollbar? Anything past 50 is choppy because you have the arrows traveling on a tile-by-tile movement system. Why didn't you use an offset system that makes slower moving arrows actually appear to move slow instead of tile-by-tile?::EDIT::For the record, I was only testing this out on the precompiled client and server you posted as _Projectiles.zip_ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now