Dethtou Posted December 2, 2009 Author Share Posted December 2, 2009 Hey i was wondering if i can disable "*NPC* couldn't hurt you" I really need it off otherwise people will just farm of the NPCs and get tons of stuff. Thanks! ;) Link to comment Share on other sites More sharing options...
Zetasis Posted December 2, 2009 Share Posted December 2, 2009 I don't think there is a way to turn it off. Only thing I can think of is to make you NPC's have more STR. I think the fighting system is a little wired my self. I don't think that just because you have a higher DEF then the NPC has STR it shouldn't beable to hurt you. It should do less damage then normal. Link to comment Share on other sites More sharing options...
balliztik1 Posted December 2, 2009 Share Posted December 2, 2009 It's as simple as adding "If Damage = 0 then Damage = 1" to the NPC's attack script section. Link to comment Share on other sites More sharing options...
Zetasis Posted December 2, 2009 Share Posted December 2, 2009 So you can script this? I've been looking in my main.txt but I can't figure out where I would make an edit for this? Link to comment Share on other sites More sharing options...
balliztik1 Posted December 2, 2009 Share Posted December 2, 2009 There's some sub for when an NPC attacks you. You can manually alter the damage there. Not sure the exact name of the sub. Link to comment Share on other sites More sharing options...
Dethtou Posted December 2, 2009 Author Share Posted December 2, 2009 Oh cool ok, can u explain it to me more? Im a noob at this stuff? Link to comment Share on other sites More sharing options...
Zetasis Posted December 2, 2009 Share Posted December 2, 2009 This is the only thing I could find that looks like it may effect an NPC attacking.```Sub PlayerHit(Index, NPCNum, Damage) If Damage > 0 then Call NPCAttack(NPCNum, Index, Damage) End IfEnd Sub```If this is it then I would just have to alter it to this```Sub PlayerHit(Index, NPCNum, Damage) If Damage = 0 then Damage = 1 Call NPCAttack(NPCNum, Index, Damage) End IfEnd Sub```If this is right is there a call to get the NPC's STR so I could make the NPC do half its normal Damage if they players has a higher DEF then the NPCs STR? Link to comment Share on other sites More sharing options...
balliztik1 Posted December 2, 2009 Share Posted December 2, 2009 That's not right, but you can do what you mentioned. This is the correct way:```Sub PlayerHit(Index, NPCNum, Damage) If Damage = 0 then Damage = 1 Call NPCAttack(NPCNum, Index, Damage)End Sub```Just compare the hitting NPC's strength with the player's defense. You'll have to make your own math within the sub, but it's a lot easier than altering player's damage. Link to comment Share on other sites More sharing options...
Dethtou Posted December 2, 2009 Author Share Posted December 2, 2009 Does that go for all the NPCs? Like if i have a lvl 2 NPC and i have a lvl 50 NPC and i set the damage = 1 will they both only hit 1? I need to have it so they hit different because of their level. Link to comment Share on other sites More sharing options...
balliztik1 Posted December 2, 2009 Share Posted December 2, 2009 Well, if the damage is 0, then it will be 1\. You can script it to be whatever. Link to comment Share on other sites More sharing options...
damian666 Posted December 2, 2009 Share Posted December 2, 2009 you could script it to calculate the level in it.whats it called in english? multiply?like have it: damage x level = damage doneDamian666 Link to comment Share on other sites More sharing options...
Dethtou Posted December 2, 2009 Author Share Posted December 2, 2009 I dont exactly have "Levels" in the game, just like a high lvl strength and stuff compared to a low lvl strength Link to comment Share on other sites More sharing options...
damian666 Posted December 2, 2009 Share Posted December 2, 2009 hmm yeah, i see what ya mean…it would work from player to player though...damn, thats actually harder then it looks XDDamian666 Link to comment Share on other sites More sharing options...
Dethtou Posted December 2, 2009 Author Share Posted December 2, 2009 Yeah i really need to get this fixed. i can have people like just farming off the NPCs and getting a crazy amount of gold for free. :icon_crap: Link to comment Share on other sites More sharing options...
damian666 Posted December 2, 2009 Share Posted December 2, 2009 maybe you can do the calculation depending on str of the Npc?that way atleast your holding of the farming…Damian666 Link to comment Share on other sites More sharing options...
Dethtou Posted December 2, 2009 Author Share Posted December 2, 2009 Yeah i kno but if i change the strength of a beginner NPC the noobs trying to train off it will die right? Link to comment Share on other sites More sharing options...
damian666 Posted December 2, 2009 Share Posted December 2, 2009 yeah… XDlike flies :pDamian666 Link to comment Share on other sites More sharing options...
Dethtou Posted December 2, 2009 Author Share Posted December 2, 2009 Yeah so im screwed with this i guess xS Link to comment Share on other sites More sharing options...
damian666 Posted December 2, 2009 Share Posted December 2, 2009 wait for ballie, he is good with this stuff.personally i would make the npc's have levels, so i could use it.but thats source, and waay out of this scope, sorry.Damian666 Link to comment Share on other sites More sharing options...
Dethtou Posted December 2, 2009 Author Share Posted December 2, 2009 ok thx Link to comment Share on other sites More sharing options...
Dethtou Posted December 3, 2009 Author Share Posted December 3, 2009 Can someone please think of a way to help? idk how i can make the game if i dont fix this the economy will be horrible! :sad: Link to comment Share on other sites More sharing options...
Nahchito Posted December 3, 2009 Share Posted December 3, 2009 The npc is too weak to hurt you. Link to comment Share on other sites More sharing options...
Draken Posted December 3, 2009 Share Posted December 3, 2009 um the only thing i think you could do is edit the npc Damage script Which isnt hard code. To deal a Minimum amount of damage not matter what. Link to comment Share on other sites More sharing options...
Dethtou Posted December 3, 2009 Author Share Posted December 3, 2009 Would i be able to set it to a certain NPC like if i have one NPC that is low in stats and another NPC high in stats, could i set one to If Damage > 0 then Damage > 5 and the other one to If Damage > 0 then Damage > 35? Link to comment Share on other sites More sharing options...
balliztik1 Posted December 3, 2009 Share Posted December 3, 2009 Something like```If Damage < GetNpcStrength(GetMapNPCnumber(GetPlayerMap(index), NPCNum)) \ 2 Then Damage = GetNpcStrength(GetMapNPCnumber(GetPlayerMap(index), NPCNum)) \ 2```The scripting part of it in really simple. It's just coming up with the damage pattern that you want to use. This, for example, makes all NPCs do at least half damage. It doesn't have to be this simple. You can make it whatever you want. Someone can script it for you. 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