karpaz Posted March 15, 2012 Author Share Posted March 15, 2012 hello again .. i have big problem .. my npc dont want speak with me ..i use altar quest system , door system , edit max npc 30>to 50 and it is all :| how can i fix it ?[![](http://img52.imageshack.us/img52/8738/screeenshot.png)](http://imageshack.us/photo/my-images/52/screeenshot.png/) Link to comment Share on other sites More sharing options...
PVJsquad Posted March 16, 2012 Share Posted March 16, 2012 close the server and open it again…and give the health the Npc.. Link to comment Share on other sites More sharing options...
Vus Posted March 16, 2012 Share Posted March 16, 2012 @GoldSide:> and give the health the Npc..Off topic:If you will look really closely, you can see that his NPC has already 20 healthOn topic:Podle toho, jak to NPC mas nastaveny, by ti to fungovat melo, problem bude nejspis s tim editem max poctu NPC na 50, jak rikal GoldSide, zkus restartovat server. Pokud to nepomuze, tak problem bude nejspis s tim, ze vetsina lidi rika, ze po takovyhlech editacich je treba smazat svoje mapy nebo NPC, nebo napsat converter (coz nemam paru jak), takze to nejako zkus.A predtim ti to fungovalo (pred editem max NPC) nebo ne? Link to comment Share on other sites More sharing options...
karpaz Posted March 16, 2012 Author Share Posted March 16, 2012 jo pracovalo .. zkusim ;) Link to comment Share on other sites More sharing options...
karpaz Posted March 16, 2012 Author Share Posted March 16, 2012 i gived npc health .. you can see and i restart server and npc and all .. and still not fixed :( Link to comment Share on other sites More sharing options...
Justn Posted March 16, 2012 Share Posted March 16, 2012 Can you post ur sub canplayerattacknpc? Link to comment Share on other sites More sharing options...
karpaz Posted March 16, 2012 Author Share Posted March 16, 2012 server/client? and which modules ;) Link to comment Share on other sites More sharing options...
Justn Posted March 16, 2012 Share Posted March 16, 2012 Server modcombat…. Link to comment Share on other sites More sharing options...
karpaz Posted March 16, 2012 Author Share Posted March 16, 2012 Sub canplayerattacknpc> 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 <= 0 Or mapNpcNum > MAX_MAP_NPCS Then> Exit Function> End If> > ' Check for subscript out of range> If MapNpc(GetPlayerMap(attacker)).NPC(mapNpcNum).Num <= 0 Then> Exit Function> End If> > mapNum = GetPlayerMap(attacker)> npcNum = MapNpc(mapNum).NPC(mapNpcNum).Num> > ' Make sure the npc isn't already dead> If MapNpc(mapNum).NPC(mapNpcNum).Vital(Vitals.HP) <= 0 Then> Exit Function> End If> > ' Make sure they are on the same map> If IsPlaying(attacker) Then> > ' exit out early> If IsSpell Then> If npcNum > 0 Then> If NPC(npcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And NPC(npcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER Then> CanPlayerAttackNpc = True> Exit Function> End If> 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 Then> CanPlayerAttackNpc = True> Else> 'ALATAR> If NPC(npcNum).Behaviour = NPC_BEHAVIOUR_FRIENDLY Then> Call CheckTasks(attacker, QUEST_TYPE_GOTALK, npcNum)> Call CheckTasks(attacker, QUEST_TYPE_GOGIVE, npcNum)> Call CheckTasks(attacker, QUEST_TYPE_GOGET, npcNum)> > If NPC(npcNum).Quest = YES Then> If CanStartQuest(attacker, NPC(npcNum).QuestNum) Then> 'if can start show the request message (chat1)> QuestMessage attacker, NPC(npcNum).QuestNum, Trim$(Quest(NPC(npcNum).QuestNum).Chat(1)), NPC(npcNum).QuestNum> Exit Function> End If> If QuestInProgress(attacker, NPC(npcNum).QuestNum) Then> 'if the quest is in progress show the meanwhile message (chat2)> PlayerMsg attacker, Trim$(NPC(npcNum).Name) + ": " + Trim$(Quest(NPC(npcNum).QuestNum).Chat(2)), BrightGreen> 'QuestMessage attacker, NPC(npcNum).QuestNum, Trim$(Quest(NPC(npcNum).QuestNum).Chat(2)), 0> Exit Function> End If> End If> End If> '/ALATAR> If Len(Trim$(NPC(npcNum).AttackSay)) > 0 Then> PlayerMsg attacker, Trim$(NPC(npcNum).Name) & ": " & Trim$(NPC(npcNum).AttackSay), White> End If> End If> End If> End If> End If> End If Link to comment Share on other sites More sharing options...
deathtaker26 Posted March 16, 2012 Share Posted March 16, 2012 I found that sometimes, if you edit an NPC on a map after he was already on the map, this tends to happen. Simply use /refresh on the map and than try to talk to him. No garuntee that this will fix it, it's just a suggestion Link to comment Share on other sites More sharing options...
karpaz Posted March 16, 2012 Author Share Posted March 16, 2012 how refresh map ? :D Link to comment Share on other sites More sharing options...
Justn Posted March 16, 2012 Share Posted March 16, 2012 Sorry I can't help you ur sub looks fine.. did u try deleting your npc .dat files out of the server data folder? :\ Link to comment Share on other sites More sharing options...
karpaz Posted March 16, 2012 Author Share Posted March 16, 2012 still not work :( can i upload all my project ? Link to comment Share on other sites More sharing options...
deathtaker26 Posted March 16, 2012 Share Posted March 16, 2012 karpaz: to refresh a map just do /refresh on the map Link to comment Share on other sites More sharing options...
karpaz Posted March 16, 2012 Author Share Posted March 16, 2012 on server >control>maps? this i do it and nothing :(or in game ? (command is not valid) Link to comment Share on other sites More sharing options...
deathtaker26 Posted March 16, 2012 Share Posted March 16, 2012 maybe ingame the command is /respawn. Link to comment Share on other sites More sharing options...
karpaz Posted March 16, 2012 Author Share Posted March 16, 2012 still nothing :( here is my project http://www.mediafire.com/?75akd69do0vpok4 Link to comment Share on other sites More sharing options...
deathtaker26 Posted March 17, 2012 Share Posted March 17, 2012 is it only this one npc? Link to comment Share on other sites More sharing options...
karpaz Posted March 17, 2012 Author Share Posted March 17, 2012 no all npc dont speak Link to comment Share on other sites More sharing options...
tslusny Posted March 17, 2012 Share Posted March 17, 2012 jeeej konecne nejaky sk/cz :DDD Link to comment Share on other sites More sharing options...
karpaz Posted March 18, 2012 Author Share Posted March 18, 2012 jo taky te zdravim ;) {BUT NOT FIXED} :( Link to comment Share on other sites More sharing options...
Justn Posted March 20, 2012 Share Posted March 20, 2012 I looked at ur project and I noticed that most of your playermsgs don't show up..examples: welcome message , number of players online, message when u warp maps, notification when learning a spell, all resource related messages and others.. some do work like ur map msgs and "invalid trade target". I'll keep looking but not really sure what to look for now :\ maybe someone can point u where to correct this Link to comment Share on other sites More sharing options...
karpaz Posted March 21, 2012 Author Share Posted March 21, 2012 thx alot if you find anything send me pm .. i try fix it too ;) Link to comment Share on other sites More sharing options...
Adamse Posted March 21, 2012 Share Posted March 21, 2012 'my npc dont speak with me' just sounded like one of the saddest and lonliest things n_n I found it….. entertaining. Link to comment Share on other sites More sharing options...
Robin Posted March 21, 2012 Share Posted March 21, 2012 @Justn:> I looked at ur project and I noticed that most of your playermsgs don't show up..> examples: welcome message , number of players online, message when u warp maps, notification when learning a spell, all resource related messages and others.. some do work like ur map msgs and "invalid trade target". I'll keep looking but not really sure what to look for now :\ maybe someone can point u where to correct thisSounds like a packet issue, then.You probably screwed up the header enumeration so they're not synced. This'll cause all kinds of problems. 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