PVJsquad Posted January 22, 2012 Share Posted January 22, 2012 Why the NPC no death ? Link to comment Share on other sites More sharing options...
Peter112 Posted February 7, 2012 Share Posted February 7, 2012 I had this error (in client) Variable not defined MAX_NPC_SPELLS so I addedPublic Const MAX_NPC_SPELLS As Long = 5Â Â Â Â to the modConstans and now I have Variable not defined SpellIndex(Npc(EditorIndex).Spell(SpellIndex) = scrlSpell.Value)Any help? Link to comment Share on other sites More sharing options...
DJMaxus Posted February 7, 2012 Author Share Posted February 7, 2012 @Peter112:> I had this error (in client) Variable not defined MAX_NPC_SPELLS so I added> Public Const MAX_NPC_SPELLS As Long = 5Â Â Â Â to the modConstans and now I have Variable not defined SpellIndex> (Npc(EditorIndex).Spell(SpellIndex) = scrlSpell.Value)> Any help?In the frmEditor_NPC I included, there is "Private SpellIndex As Long" at the top right under "Option Explicit"Make sure it is still there, if not, add it in. Link to comment Share on other sites More sharing options...
haileelipse Posted February 8, 2012 Share Posted February 8, 2012 Do the npcs stop walking and cast for anyone mine just keep walking whilst they cast xD Link to comment Share on other sites More sharing options...
DJMaxus Posted February 8, 2012 Author Share Posted February 8, 2012 @haileelipse:> Do the npcs stop walking and cast for anyone mine just keep walking whilst they cast xDThis is something I haven't added in yet. You'll have to add it in for now. Link to comment Share on other sites More sharing options...
Dryath Posted February 16, 2012 Share Posted February 16, 2012 Okay first time trying to add something to the engine and a bit stuck, im using the latest eclipse from the download section 2.0On trying to compile the client i get variable not defined and it points to this lineSpell(1 To MAX_NPC_SPELLS) As LongOn trying to compile the server i get this..Method or data member not foundAnd it points toIf Options.Debug = 1 Then On Error GoTo errorhandlerAnyone can help ?Thanks Link to comment Share on other sites More sharing options...
DJMaxus Posted February 16, 2012 Author Share Posted February 16, 2012 @Dryath:> Okay first time trying to add something to the engine and a bit stuck, im using the latest eclipse from the download section 2.0> > On trying to compile the client i get variable not defined and it points to this line> Spell(1 To MAX_NPC_SPELLS) As Long> > On trying to compile the server i get this..> > Method or data member not found> And it points to> If Options.Debug = 1 Then On Error GoTo errorhandler> > Anyone can help ?> > ThanksAdd this to your modConstants in your client```' NPC SpellsPublic Const MAX_NPC_SPELLS As Long = 5```For the second issue, why is options.debug doing on the server in the first place? Delete it. Link to comment Share on other sites More sharing options...
adammack Posted February 28, 2012 Share Posted February 28, 2012 Alright installed it and everything works perfectly :]Only things im a bit iffy on are1\. NPC can Meele 1 player in a party = Good, but if theres more then 2 in a party.Example: 1 is being meeled, 2 is being attacked with spells, 3 does not get attacked by spells at all, even with an AOE spell and being in the same party as player 1 & 2.Any way to make it attack all 4 people in a party with AOE spells? :]If so can this be added in a tut? :D2\. Having more than 1 spell on an NPC seems a little pointless, i mean they cast at the same time.Is there a way that i can have a random spell cast on the player such as a Fire spell is cast, then randomly a DOT is cast on the player instead of the fire spell, etc…?If so can this be added in a tut :DThanks for the reply in advanced :] Link to comment Share on other sites More sharing options...
DJMaxus Posted March 2, 2012 Author Share Posted March 2, 2012 Probably gonna re-do this whole tutorial. It's old and clunky.I'll take all of the suggestions into account. Link to comment Share on other sites More sharing options...
adammack Posted March 2, 2012 Share Posted March 2, 2012 @DJMaxus:> Probably gonna re-do this whole tutorial. It's old and clunky.> > I'll take all of the suggestions into account.Alright awesome :DLook forward to this :] Link to comment Share on other sites More sharing options...
Wortel Angels Posted March 13, 2012 Share Posted March 13, 2012 Does not work for me >.< anyone know another NPC Spell code ? Link to comment Share on other sites More sharing options...
Justn Posted March 13, 2012 Share Posted March 13, 2012 This tutorial works fine maybe you can tell us what its doing and we can help u… And no there is no other tutorial for npc spells... Link to comment Share on other sites More sharing options...
Wortel Angels Posted March 13, 2012 Share Posted March 13, 2012 I fixed it… but my NPC's doesnt use the skills...must i delete all NPC's or not ? Link to comment Share on other sites More sharing options...
Justn Posted March 13, 2012 Share Posted March 13, 2012 Follow the original tutorial not the other post below it… The tutorial was updated may 2011, the code you posted was from 2010 that is not needed anymore... And yes Sub NpcAttackPlayer is in modcombat just search for what it says and make sure to copy the form work correctly Link to comment Share on other sites More sharing options...
Wortel Angels Posted March 13, 2012 Share Posted March 13, 2012 I Inserted all… now it gives me no compile error...but the NPC's doesnt cast the skills....```Else              ' lol no npc combat :(            End If```Looks at my source```mapnum).Npc(x) > 0 And MapNpc(mapnum).Npc(x).Num > 0 Then          target = MapNpc(mapnum).Npc(x).target          targetType = MapNpc(mapnum).Npc(x).targetType          ' Check if the npc can attack the targeted player player          If target > 0 Then            If targetType = 1 Then ' player              ' Is the target playing and on the same map?              If IsPlaying(target) And GetPlayerMap(target) = mapnum Then                TryNpcAttackPlayer x, target              Else                ' Player left map or game, set target to 0                MapNpc(mapnum).Npc(x).target = 0                MapNpc(mapnum).Npc(x).targetType = 0 ' clear            ElseIf targetType = 2 Then              ' lol no npc combat :( DATS WAT YOU THINK              If Map(mapnum).Npc(x) > 0 And MapNpc(mapnum).Npc(x).Num > 0 Then              If Npc(MapNpc(mapnum).Npc(x).Num).Behaviour = NPC_BEHAVIOUR_PET And Npc(MapNpc(mapnum).Npc(target).Num).Behaviour = NPC_BEHAVIOUR_PET Then              If CanNpcAttackNpc(mapnum, x, MapNpc(mapnum).Npc(x).target) = True Then              Call PetAttackPet(mapnum, x, MapNpc(mapnum).Npc(x).target, Npc(Map(mapnum).Npc(x)).Damage)              End If              ElseIf Npc(MapNpc(mapnum).Npc(x).Num).Behaviour = NPC_BEHAVIOUR_PET Then              If CanNpcAttackNpc(mapnum, x, MapNpc(mapnum).Npc(x).target) = True Then              Call PetAttackNpc(mapnum, x, MapNpc(mapnum).Npc(x).target, Npc(Map(mapnum).Npc(x)).Damage)              End If              End If              End If              If Map(mapnum).Npc(target) > 0 And MapNpc(mapnum).Npc(target).Num > 0 Then              If Npc(MapNpc(mapnum).Npc(target).Num).Behaviour = NPC_BEHAVIOUR_PET And Npc(MapNpc(mapnum).Npc(x).Num).Behaviour = NPC_BEHAVIOUR_PET Then              MapNpc(mapnum).Npc(target).target = x              MapNpc(mapnum).Npc(target).targetType = TARGET_TYPE_NPC              If CanNpcAttackNpc(mapnum, target, MapNpc(mapnum).Npc(target).target) = True Then              Call PetAttackPet(mapnum, target, MapNpc(mapnum).Npc(target).target, Npc(Map(mapnum).Npc(target)).Damage)              End If              ElseIf Npc(MapNpc(mapnum).Npc(target).Num).Behaviour <> NPC_BEHAVIOUR_PET Then              MapNpc(mapnum).Npc(target).target = x              MapNpc(mapnum).Npc(target).targetType = TARGET_TYPE_NPC              If CanNpcAttackNpc(mapnum, target, MapNpc(mapnum).Npc(target).target) = True Then             Call NpcAttackPet(mapnum, target, MapNpc(mapnum).Npc(target).target, Npc(Map(mapnum).Npc(target)).Damage)             End If             End If             End If             End If             End If             Else           End If``` Link to comment Share on other sites More sharing options...
Justn Posted March 13, 2012 Share Posted March 13, 2012 use this u forgot something```mapnum).Npc(x) > 0 And MapNpc(mapnum).Npc(x).Num > 0 Then          target = MapNpc(mapnum).Npc(x).target          targetType = MapNpc(mapnum).Npc(x).targetType          ' Check if the npc can attack the targeted player player          If target > 0 Then            If targetType = 1 Then ' player              ' Is the target playing and on the same map?              If IsPlaying(target) And GetPlayerMap(target) = mapnum Then                TryNpcAttackPlayer x, target              Else                ' Player left map or game, set target to 0                MapNpc(mapnum).Npc(x).target = 0                MapNpc(mapnum).Npc(x).targetType = 0 ' clear            ElseIf targetType = 2 Then              ' lol no npc combat :( DATS WAT YOU THINK              If Map(mapnum).Npc(x) > 0 And MapNpc(mapnum).Npc(x).Num > 0 Then              If Npc(MapNpc(mapnum).Npc(x).Num).Behaviour = NPC_BEHAVIOUR_PET And Npc(MapNpc(mapnum).Npc(target).Num).Behaviour = NPC_BEHAVIOUR_PET Then              If CanNpcAttackNpc(mapnum, x, MapNpc(mapnum).Npc(x).target) = True Then              Call PetAttackPet(mapnum, x, MapNpc(mapnum).Npc(x).target, Npc(Map(mapnum).Npc(x)).Damage)              End If              ElseIf Npc(MapNpc(mapnum).Npc(x).Num).Behaviour = NPC_BEHAVIOUR_PET Then              If CanNpcAttackNpc(mapnum, x, MapNpc(mapnum).Npc(x).target) = True Then              Call PetAttackNpc(mapnum, x, MapNpc(mapnum).Npc(x).target, Npc(Map(mapnum).Npc(x)).Damage)              End If              End If              End If              If Map(mapnum).Npc(target) > 0 And MapNpc(mapnum).Npc(target).Num > 0 Then              If Npc(MapNpc(mapnum).Npc(target).Num).Behaviour = NPC_BEHAVIOUR_PET And Npc(MapNpc(mapnum).Npc(x).Num).Behaviour = NPC_BEHAVIOUR_PET Then              MapNpc(mapnum).Npc(target).target = x              MapNpc(mapnum).Npc(target).targetType = TARGET_TYPE_NPC              If CanNpcAttackNpc(mapnum, target, MapNpc(mapnum).Npc(target).target) = True Then              Call PetAttackPet(mapnum, target, MapNpc(mapnum).Npc(target).target, Npc(Map(mapnum).Npc(target)).Damage)              End If              ElseIf Npc(MapNpc(mapnum).Npc(target).Num).Behaviour <> NPC_BEHAVIOUR_PET Then              MapNpc(mapnum).Npc(target).target = x              MapNpc(mapnum).Npc(target).targetType = TARGET_TYPE_NPC              If CanNpcAttackNpc(mapnum, target, MapNpc(mapnum).Npc(target).target) = True Then             Call NpcAttackPet(mapnum, target, MapNpc(mapnum).Npc(target).target, Npc(Map(mapnum).Npc(target)).Damage)             End If             End If             End If             End If             End If             Else           End If  ' Spell Casting                For i = 1 To MAX_NPC_SPELLS                  If NPC(npcNum).Spell(i) > 0 Then                    If MapNpc(mapNum).NPC(x).SpellTimer(i) + (Spell(NPC(npcNum).Spell(i)).CastTime * 1000) < GetTickCount Then                      NpcSpellPlayer x, target, i                    End If                  End If                Next              End If```Also what pet system is that? It looks not very good =/ Link to comment Share on other sites More sharing options...
Wortel Angels Posted March 13, 2012 Share Posted March 13, 2012 I've insertet it above            ElseIf targetType = 2 Then              ' lol no npc combat :( DATS WAT YOU THINKWhen i insert it at the bottom i got an ErrorRTE 9Subscript out of rangeThe Pet system was theren when i downloaded it ;) but it works so its good hahaEDIT–--If Npc(npcNum).Spell(i) > 0 Then   <---- This is hilightedEDIT 2---I Moved it again Up and now its working Thanks :D Link to comment Share on other sites More sharing options...
Domino_ Posted March 19, 2012 Share Posted March 19, 2012 Hey, I'v missed something or DoT from npc doesnt work? Link to comment Share on other sites More sharing options...
23.kraft Posted April 2, 2012 Share Posted April 2, 2012 you could not throw a client + server with your lesson? Link to comment Share on other sites More sharing options...
Zopto Posted April 2, 2012 Share Posted April 2, 2012 i found 1 bug when you set animation(no cast animation)in spell editor and when npc attack you it teleport you back where you frst show on map Link to comment Share on other sites More sharing options...
or3o Posted April 15, 2012 Share Posted April 15, 2012 This is awsome! thanks for the tutorial. I haven't ran into any issues yet but if I find any bugs ill tell ya. Link to comment Share on other sites More sharing options...
DarkDino Posted April 18, 2012 Share Posted April 18, 2012 Marvelous!! i finish install in my game! :D. Link to comment Share on other sites More sharing options...
or3o Posted June 8, 2012 Share Posted June 8, 2012 i get an error in the server only when i am killed by an npc that has spells, its a rte 9 error and it hightlights this```Select Case Spell(spellnum).Type```in npcspell player sub anyone have this issue? the npcs cast spells and everything but if they kill a player my server crashes. and for some reason if only does this if its on the first map. Link to comment Share on other sites More sharing options...
Riordan Posted July 30, 2012 Share Posted July 30, 2012 Enemies will not heal themselves or attack on sight.No crashing. Link to comment Share on other sites More sharing options...
Bahamut92 Posted September 15, 2012 Share Posted September 15, 2012 I've inserted the code, i don't get an error but i need to add the scrl… how i name them and which code i put in them?p.s. i use eclipse origins 2.3EDIT: Fixed getting code from other frmNpc_Editor ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) 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