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

Rydo

Members
  • Posts

    265
  • Joined

  • Last visited

    Never

Everything posted by Rydo

  1. Nickpop123 and Domino, both of your codes work, but I still get an error in ModHandle Data highlighting "TryPlayerAttackNPC" and saying "Sub or function not defined".
  2. In mod HandleData :/
  3. Got an error with "TryPlayerAttackNpc"
  4. ``` Public Function CanPlayerAttackNpc(ByVal Attacker As Long, ByVal mapNpcNum As Long, Optional ByVal IsSpell As Boolean = False) As Boolean Dim mapNum As Long Dim npcNum As Long Dim NpcX As Long Dim NpcY As Long Dim attackspeed As Long ' Check for subscript out of range If IsPlaying(Attacker) = False Or mapNpcNum MAX_MAP_NPCS Then Exit Function End If ' Check for subscript out of range If MapNpc(GetPlayerMap(Attacker)).Npc(mapNpcNum).Num ADMIN_MONITOR Then Call PlayerMsg(Attacker, "You can't attack " & GetPlayerName(petowner) & "'s pet!", BrightRed) Exit Function End If End If If MapNpc(mapNum).Npc(mapNpcNum).IsPet = YES Then If GetPlayerAccess(Attacker) > ADMIN_MONITOR Then Call PlayerMsg(Attacker, "Admins can't attack other player's pet.", Yellow) Exit Function End If End If If MapNpc(mapNum).Npc(mapNpcNum).IsPet = YES Then petowner = MapNpc(mapNum).Npc(mapNpcNum).PetData.Owner If GetPlayerLevel(petowner) < 10 Then Call PlayerMsg(Attacker, GetPlayerName(petowner) & " is below level 10, you can't attack his pet!", BrightRed) Exit Function End If End If If MapNpc(mapNum).Npc(mapNpcNum).IsPet = YES Then If GetPlayerLevel(Attacker) < 10 Then Call PlayerMsg(Attacker, "You are below level 10, you can't attack players with your pet yet!", BrightRed) Exit Function End If End If ' attack speed from weapon If GetPlayerEquipment(Attacker, Weapon) > 0 Then attackspeed = Item(GetPlayerEquipment(Attacker, Weapon)).Speed Else attackspeed = 1000 End If If npcNum > 0 And GetTickCount > TempPlayer(Attacker).AttackTimer + attackspeed Then ' Check if at same coordinates Select Case GetPlayerDir(Attacker) Case DIR_UP NpcX = MapNpc(mapNum).Npc(mapNpcNum).x NpcY = MapNpc(mapNum).Npc(mapNpcNum).y + 1 Case DIR_DOWN NpcX = MapNpc(mapNum).Npc(mapNpcNum).x NpcY = MapNpc(mapNum).Npc(mapNpcNum).y - 1 Case DIR_LEFT NpcX = MapNpc(mapNum).Npc(mapNpcNum).x + 1 NpcY = MapNpc(mapNum).Npc(mapNpcNum).y Case DIR_RIGHT NpcX = MapNpc(mapNum).Npc(mapNpcNum).x - 1 NpcY = MapNpc(mapNum).Npc(mapNpcNum).y End Select If NpcX = GetPlayerX(Attacker) Then If NpcY = GetPlayerY(Attacker) Then If Npc(npcNum).Behaviour NPC_BEHAVIOUR_FRIENDLY And Npc(npcNum).Behaviour NPC_BEHAVIOUR_SHOPKEEPER And Npc(npcNum).Behaviour NPC_BEHAVIOUR_MANAGER Then 'House Editor CanPlayerAttackNpc = True Else 'House Editor If Npc(npcNum).Behaviour = NPC_BEHAVIOUR_MANAGER Then Call SendInitManager(Attacker, CInt(GetVar(App.Path & "\data\accounts\houses.ini", "OPTIONS", "" & Player(Attacker).Name)), Npc(npcNum).HMapNum, Npc(npcNum).HBuy, Npc(npcNum).HSell) End If '/House Editor If Len(Trim$(Npc(npcNum).AttackSay)) > 0 Then PlayerMsg Attacker, Trim$(Npc(npcNum).Name) & ": " & Trim$(Npc(npcNum).AttackSay), White End If End Function ```
  5. ``` If NpcX = GetPlayerX(Attacker) Then If NpcY = GetPlayerY(Attacker) Then If Npc(npcNum).Behaviour NPC_BEHAVIOUR_FRIENDLY And Npc(npcNum).Behaviour NPC_BEHAVIOUR_SHOPKEEPER And Npc(npcNum).Behaviour NPC_BEHAVIOUR_MANAGER Then 'House Editor CanPlayerAttackNpc = True Else 'House Editor If Npc(npcNum).Behaviour = NPC_BEHAVIOUR_MANAGER Then Call SendInitManager(Attacker, CInt(GetVar(App.Path & "\data\accounts\houses.ini", "OPTIONS", "" & Player(Attacker).Name)), Npc(npcNum).HMapNum, Npc(npcNum).HBuy, Npc(npcNum).HSell) End If '/House Editor If Len(Trim$(Npc(npcNum).AttackSay)) > 0 Then PlayerMsg Attacker, Trim$(Npc(npcNum).Name) & ": " & Trim$(Npc(npcNum).AttackSay), White End If End Function ```
  6. I like the layout of the screen, but some of the buttons would need to be..lets say re-done, Even though its nothing to do with this thread, I just wanted to share some advice as I too, am making a Pokémon mmo (The PMD kind ;] ).
  7. @DrunkenHyena: > Means you're missing an end if to match one of your ifs. In this case the If missing an end if is, > > ``` > if Npc(npcNum).Behaviour NPC_BEHAVIOUR_ > > ``` > As well as an end if for the two if statements above it. I basically took half of that in. So basically some of the Ifs are missing End If? Also where about would I put the End If's since there are more needed?
  8. Ok so I attempted (yet again!) to put the alatars house system fix into my project, and it keeps giving me this message. ![](http://i45.tinypic.com/n3lyc2.png)
  9. Rydo

    House Editor

    Ok so basically I have been having problems with files in my VB6 so I'm going to find the disc and re-install it. But in the mean time if someone could put http://www.touchofdeathforums.com/smf2/index.php/topic,80560\. In a version of http://www.touchofdeathforums.com/smf2/index.php/topic,81199.0.html I would give them credit in my project and it would be much appreciated.
  10. Rydo

    Help

    Here it is. http://www.touchofdeathforums.com/smf2/index.php/topic,80560.msg862448.html#msg862448 And sorry I do need to learn to be more patient :L Also I have no idea what this is. ![](http://i48.tinypic.com/e0085i.png) I am positive I put all of the code in correctly
  11. Rydo

    Help

    :o nobody?
  12. Rydo

    Help

    Ok so I'm adding the alatars house sytem fix by Deathbeam, and it says that I need to find "If IsSpell Then" In ModGameLogic. But its not in there, and i guessed since its to do with combat, it would be in ModCombat, which it is. But I'm just wondering if that it was a mistake in the tutorial?
  13. Rydo

    Run-time Error '9'

    @Soul: > You have to delete all your items. > > No. I…Knew that :embarrassed:
  14. Rydo

    Run-time Error '9'

    Well basically I'm new to this stuff, but I guess it may be clashing with the command, so I suggest you find the code for /edititem and change the command.
  15. Rydo

    Help with error

    Haha, Thanks. And yeah I always make backups. I guess I'm going to do the housing system first, and the friends list could be included in a small update later on.
  16. Rydo

    Help with error

    Yeah, good thing I made a copy before I did anything :D. but i dont think I will be able to do it easily since I'm using ED and some variables are different.
  17. Rydo

    Help with error

    I actually have no idea, I guess i read the tutorial wrong?. So I guess that part of code goes in ModCombat under Sub NpcAttackPlayer?
  18. Rydo

    Help with error

    Ahh, so you made ED? :D. Big fan, I love everything about ED So I'm currently using it to make a Pokémon MMO (The one where you play as Pokemon ;] ) With a team of staff of course, But nobody is awake, So im just working away ;P. Also I replaced that and now it says Variable Not Defined for (Attacker) in the code >MapNpc(mapnum).Npc(mapNpcNum).x = GetPlayerX(attacker)
  19. Rydo

    Help with error

    I see, Ok so that worked, but now a new error -.- :confused: ![](http://i46.tinypic.com/b7fj2b.png)
  20. Rydo

    Help with error

    So I change .Char with TempPlayer(Index).CurChar?
  21. Rydo

    Help with error

    I think that did the trick, And if you dont mind, could you help me with another thing please?. Basically I also added a house system (lmao) and I got this error. ![](http://i45.tinypic.com/nnwbgk.png) Also when i test it, I get this runtime error, and when I press "Debug" it shows this line of code. ![](http://i50.tinypic.com/1055ti1.png)
  22. Rydo

    Help with error

    ![](http://i49.tinypic.com/sdiaoi.png)
  23. Rydo

    Help with error

    Hey, I basically tried adding a friend sytem to my project and it seemed to work fine, I tested it and it worked, but when I try to compile it, this happens. ![](http://i49.tinypic.com/2d9veqf.png) I have no idea what the problem could be, also this is the server side code, nothing wrong at all with the client side.
  24. Rydo

    Portforwarding help!

    Ok so i know mainly how to portforward, but it wont work. im positive the port part is right but then when i get to the inbound part where i put in the ip it doesnt work. i put in my gateway ip, tried it, it didnt work. then i tried my external ip ( http://www.whatismyip.com) and it still didn't work. i set it to port thing to ucp/udp.
×
×
  • Create New...