Mr. Bob Firefarter Posted July 23, 2009 Share Posted July 23, 2009 I have a question:Couldn't we source for attacks **FROM** NPCs **APPLY** to NPCs, then modify the onattack sub To fit? Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Not really, i'm trying to make it as same as the attack NPCvsHUMAN. Here's the spawn:If MapNPC(Y, X).num = 0 Then          If Map(Y).NPC(X) > 0 Then            If TickCount > MapNPC(Y, X).SpawnWait + (NPC(Map(Y).NPC(X)).SpawnSecs * 1000) Then              Call SpawnNpc(X, Y)            End If          End If        End If      Next X    End If  Next Y Link to comment Share on other sites More sharing options...
Pikachu Posted July 23, 2009 Share Posted July 23, 2009 Should there be one pet per player, or multiple pets per player (changeable by changing MAX_PETS variable) that are always active, or multiple pets per player, but only one active at a time? Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Yep yep, but what you can do, is put the pet on the left and the pet just sticks there to walk. but here's the problem, we CAN set the pet to attack on SIGHT but, it's going to move away from the owner, so how do we get the pet back? - teleport is in(just a guess):Case 1 "/getback"*blahblah if the the pet is not within 1,1 poins from the owner, he teleports back*Exit sub Link to comment Share on other sites More sharing options...
Mr. Bob Firefarter Posted July 23, 2009 Share Posted July 23, 2009 @Dᴺᴬ:> I have a question:> > Couldn't we source for attacks **FROM** NPCs **APPLY** to NPCs, then modify the onattack sub To fit?Could someone answer my question? Link to comment Share on other sites More sharing options...
Patrick Posted July 23, 2009 Share Posted July 23, 2009 One pet per player. You should call them out with a spell and the spell levels up everytime the pet levels up. So if you abandon the pet you can summon a new one which is the same level. Link to comment Share on other sites More sharing options...
Pikachu Posted July 23, 2009 Share Posted July 23, 2009 Its actually pretty easy to have the pet return to you instead of warping.```If GetTickCount > Pet.LastMove + petmovespeed Then  If Pet.TargetX > Pet.X Then   Pet.X = Pet.X - 1  End If  If Pet.TargetX < Pet.X Then   Pet.X = Pet.X + 1  End If  If Pet.TargetY > Pet.Y Then   Pet.Y = Pet.Y - 1  End If  If Pet.TargetY < Pet.Y Then   Pet.Y = Pet.Y + 1  End If  Pet.LastMove = GetTickCountEnd If```That wont check for any blocks, so you would have to add a CanPetMove(Pet, direction) Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Here's the attack on sight so the pet can move away and attack the NPC that it can see:``` ' /////////////////////////////////////////        ' // This is used for ATTACKING ON SIGHT //        ' /////////////////////////////////////////        ' Make sure theres a PET with the map        If Map(Y).Pet(X) > 0 Then          If MapPET(Y, X).num > 0 Then            ' If the pet is a attack on sight, search for a player on the map            If Pet(PETnum).Behavior = PET_BEHAVIOR_ATTACKONSIGHT Or Pet(PETnum).Behavior = PET_BEHAVIOR_RELAXED Then              For I = 1 To MAX_PLAYERS                If IsPlaying(I) Then                  If GetPlayerMap(I) = Y Then                    If MapPET(Y, X).Target = 0 Then                      If GetPlayerAccess(I) <= ADMIN_MONITER Then                        n = Pet(PETnum).Range                        DistanceX = MapPET(Y, X).X - GetPlayerX(I)                        DistanceY = MapPET(Y, X).Y - GetPlayerY(I)                        ' Make sure we get a positive value                        If DistanceX < 0 Then DistanceX = DistanceX * -1                        If DistanceY < 0 Then DistanceY = DistanceY * -1                        ' Are they in range? if so GET'M!                        If DistanceX <= n Then                          If DistanceY <= n Then                            If Pet(PETnum).Behavior = PET_BEHAVIOR_ATTACKONSIGHT Or GetPlayerPK(I) = YES Then                              If Trim(Pet(PETnum).AttackSay) <> vbNullString Then                                Call PlayerMsg(I, "A " & Trim(Pet(NPCnum).Name) & " : " & Trim(Pet(NPCnum).AttackSay), SayColor)                              End If                              MapPET(Y, X).Target = I                            End If                          End If                        End If                      End If                    End If                  End If                End If              Next I            End If```Okay this is just for attack on sight and the "guard" changed to "relaxed" mode, basically what i want to make it is that pet only attacks when the other "player" or "npc" attack.EDIT: ALSO, I do not think it is nessecary to make more than 5-7 attack on sight thing, so i might as well just make it permenant. Link to comment Share on other sites More sharing options...
Patrick Posted July 23, 2009 Share Posted July 23, 2009 We should make .ini's to make it easier. It'll require variables but that's easy. Link to comment Share on other sites More sharing options...
Mr. Bob Firefarter Posted July 23, 2009 Share Posted July 23, 2009 Hmmmmmmm…I believe this will generate some major problems with KO's Turn based boss battlesystem... :sad: Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 Wow you posted alot while i was away. Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Mcnugget, that's brilliant ;) think of the variable that we are going to need. like[PET]DMG=100DEF=50SPD=50[PET_RESPAWN]Map=1X=1Y=5[PET_REGEN]HPRegen=1HPTimer=2000Also put in server folder, in data.txt under the NPCREGEN=1```PETRegen=1``` Link to comment Share on other sites More sharing options...
Mr. Bob Firefarter Posted July 23, 2009 Share Posted July 23, 2009 WHY WONT ANYONE RESPOND TO MY QUESTION ABOUT NPCvsNPC?!?!?!?@Dᴺᴬ:> I have a question:> > Couldn't we source for attacks **FROM** NPCs **APPLY** to NPCs, then modify the onattack sub To fit? Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 DNA Virus, that's because I already posted that i'm doing that. Link to comment Share on other sites More sharing options...
Mr. Bob Firefarter Posted July 23, 2009 Share Posted July 23, 2009 Geez, you couldve at least said:@DNA Link to comment Share on other sites More sharing options...
Pikachu Posted July 23, 2009 Share Posted July 23, 2009 You would need these variables too:  Name As String  Sprite As Long  Behavior As Byte  Range As Integer  STR As Long  DEF As Long  Speed As Long  Magi As Long  Big As Long  MAXHP As Long  Exp As Long  SpawnTime As Long  PetItem As Integer  Element As Long  SPRITESIZE As Byte Link to comment Share on other sites More sharing options...
Mr. Bob Firefarter Posted July 23, 2009 Share Posted July 23, 2009 In KO, the pets need to have paperdoll items… :cry: Link to comment Share on other sites More sharing options...
Patrick Posted July 23, 2009 Share Posted July 23, 2009 @Ridrik:> Mcnugget, that's brilliant ;) think of the variable that we are going to need. like> > [PET]> DMG=100> DEF=50> SPD=50> [PET_RESPAWN]> Map=1> X=1> Y=5> [PET_REGEN]> HPRegen=1> HPTimer=2000> > Also put in server folder, in data.txt under the NPCREGEN=1> > ```> PETRegen=1> ```That should be like basic and we set the variables higher when it levels up! Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 ~~MAX_PET = GetVar(App.Path & "\Data.ini", "CONFIG", "MAX_PETS")~~ - this is one of the requirements, put this in server side, modgeneral, right after MAX_PLAYERS. And also put MAX_PETS="whatever max of the pets you want on your server" in the data.txtEDIT: Here's the fixed one: MAX_PET = GetVar(App.Path & "\Data.ini", "MAX", "MAX_PETS")Put the MAX_PETS=*number of maxes you want, i recommend over 200 because that's for the whole game not just the map*.Edit2: PET_REGEN = GetVar(App.path & "\Data.ini", "PET", "PETRegen") same as the max pets.Also at the bottom make new [PET] and at the end add PETRegen=1(or 0 if you do not want to heal the pet) Link to comment Share on other sites More sharing options...
Patrick Posted July 23, 2009 Share Posted July 23, 2009 @Dᴺᴬ:> In KO, the pets need to have paperdoll items… :cry:We're just doing the pet system first. You can just make a sprite change to put clothes on you know. Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Mcnugget, that's easy, just do the +1 scripting, just like the stats when a player levels up. Link to comment Share on other sites More sharing options...
Mr. Bob Firefarter Posted July 23, 2009 Share Posted July 23, 2009 I think by treating an NPC as a player, we could get it to allow that. Link to comment Share on other sites More sharing options...
Patrick Posted July 23, 2009 Share Posted July 23, 2009 @Ridrik:> Mcnugget, that's easy, just do the +1 scripting, just like the stats when a player levels up.If we have a pet.ini we'll just set the code +1 Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Yeah, i just added two new codes, that get the regeneration of the pet and the max pets per game. Link to comment Share on other sites More sharing options...
Patrick Posted July 23, 2009 Share Posted July 23, 2009 Off topic: How do you (ridrik) have four stars with 288 posts and DNA has 3 with 400 posts?I think we should for the npcs per map have 15 plus the max amount of players available on one map at one time. so 50 pets would be allowed without fuss if each player has one pet. 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