[Huge-Release] All-In-One Basic NPC Scripts For The 5165 Source!

01/22/2010 23:05 Nolaner#16
Thanks for the quick reply hunter.

Well am i forgeting to add something in somewhere?
Im using the rikardo source that alot of people use and all im changing is adding a line in the NPCs txt file in the OldCODB (which makes the NPC appear in my server fine) and im just adding that piece of code to NPCDialog.cs in the "Fixed Source" part, so like am i supposed to add something else somewhere to make the NPC say these things and take these actions?

Like i tried on an already existing and working NPC in the NPCDialog.cs, by just changing what he said, but the NPC just keeps saying what he was originally coded to say, hope im clear :P

appreciate the response
01/22/2010 23:10 .Ryu#17
I wouldent call it a huge release but a good release =P
01/22/2010 23:14 hunterman01#18
Quote:
Originally Posted by Nolaner View Post
Thanks for the quick reply hunter.

Well am i forgeting to add something in somewhere?
Im using the rikardo source that alot of people use and all im changing is adding a line in the NPCs txt file in the OldCODB (which makes the NPC appear in my server fine) and im just adding that piece of code to NPCDialog.cs in the "Fixed Source" part, so like am i supposed to add something else somewhere to make the NPC say these things and take these actions?

Like i tried on an already existing and working NPC in the NPCDialog.cs, by just changing what he said, but the NPC just keeps saying what he was originally coded to say, hope im clear :P

appreciate the response
Only thing i could think of is your not debugging which im not sure if you are or your not but your brackets seem to be in the right place so makes me think you are debugging
01/22/2010 23:23 Nolaner#19
Hmm well im not sure then i'll just playing around with it until i get it right i guess :P
if i find out what i was doing wrong i'll post it here :P

thanks for the attempt anyway :)
01/23/2010 02:40 killersub#20
Quote:
Originally Posted by Nolaner View Post
Hmm well im not sure then i'll just playing around with it until i get it right i guess :P
if i find out what i was doing wrong i'll post it here :P

thanks for the attempt anyway :)
try to do both: (f6 Build) and (f5 Debug) right after you put the NPC in the NPC's text folder in OldCODB then save/exit and then add your code in the C# Compiler and "MAKE SURE" it doesn't have anything underlined in red or any errors...after you've made sure try the first thing I told you to: 1st. (f6 Build) and then (f5 Debug)...all I got atm but HEY! I'm a starter too so I'm glad you're learning! keep it up! :) :) :D :D
01/23/2010 02:45 Sion~#21
You know the letter 'I' by itself must be capitalized at all time including " I' " (apostrophe I).
01/23/2010 21:32 Nolaner#22
Quote:
Originally Posted by killersub View Post
try to do both: (f6 Build) and (f5 Debug) right after you put the NPC in the NPC's text folder in OldCODB then save/exit and then add your code in the C# Compiler and "MAKE SURE" it doesn't have anything underlined in red or any errors...after you've made sure try the first thing I told you to: 1st. (f6 Build) and then (f5 Debug)...all I got atm but HEY! I'm a starter too so I'm glad you're learning! keep it up! :) :) :D :D
hey thanks alot for the idea killersub i actually got it working, i was always getting these errors in the NPCDialog.cs but the source was running fine, so i never looked into it because i thought it was just one badly coded NPC (plus i didnt wanna touch it incase i ruined the server completely) but i made a backup and just debugged all the errors and bam worked like a charm so thank you and also everyone else that added they're ideas much appreciated :)
01/24/2010 16:40 killersub#23
Quote:
Originally Posted by Nolaner View Post
hey thanks alot for the idea killersub i actually got it working, i was always getting these errors in the NPCDialog.cs but the source was running fine, so i never looked into it because i thought it was just one badly coded NPC (plus i didnt wanna touch it incase i ruined the server completely) but i made a backup and just debugged all the errors and bam worked like a charm so thank you and also everyone else that added they're ideas much appreciated :)
happy to help! :)
01/25/2010 02:34 copz1337#24
Here's a tip; when you copy/paste codes, instead of [ quote ]CODE[ /quote ]

Use: [ code ]CODE[ /code ]

And btw don't use the spaces.

Also, I'd like to talk about your Attribute NPC. You should have a checker so that people don't abuse it and get infinite Attributes then glitch their Chars. I would tell you how but I'm having some problems fixing my own, lol.
01/25/2010 03:44 killersub#25
Quote:
Originally Posted by copz1337 View Post
Here's a tip; when you copy/paste codes, instead of [ quote ]CODE[ /quote ]

Use: [ code ]CODE[ /code ]

And btw don't use the spaces.

Also, I'd like to talk about your Attribute NPC. You should have a checker so that people don't abuse it and get infinite Attributes then glitch their Chars. I would tell you how but I'm having some problems fixing my own, lol.
I'm sorry...Like I said It's my "First" time coding...I would love the help copz1337 if you can...I'll +thanks you if ya help meh :)...thanks in advance
01/25/2010 05:08 pro4never#26
What is it you are trying to do? set a maximum stats that people can upgrade to? or a maximum number of time they can boost their stats via the npc?

Either way is quite simple.


Option 1: Max stats (to avoid glitched chars) simply check the stat being raised before raising it more. If it's above the max level (lets say 300-400 points) it will trigger an else statement describing to the player that this stat can't be boosted and more.

Option 2: Max npc use. Create either a field in your character database/ini file or create a new one to store data for the npc. Create an int for the character (public int BoostedUse = 0; or something similar) and a database function to load/update/save it to database/ini. Then have the npc check that BoostedUse < max amount of uses the npc can have per character. Make sure when using the npc successfully you raise the BoostedUse by 1 and update the database.

Either way would work and would be quite simple to avoid people farming gold/cp for hours and eventually creating chars with thousands of points in vitality making them essentially un kill-able (assuming you have corrected the atrocious attack calculations in lotf and aren't doing insane dmg anymore)
02/19/2010 09:38 jackmacc#27
Lawl Nice Release, Can you release the bit for the NPCs.txt?
02/19/2010 15:26 Secrets-man#28
Quote:
Originally Posted by QuickCo View Post
killersub lol :| what is that? omfg you just copy LostQuest & Buy Atribute npcc !! HAHA you are not codder !! stand DOWN !
Lol. Like He Said.. He just Took someone's codes and fixed them a bit. So, I don't see nothing wrong with that. Unless you can do better than that, you should prove it then, instead of laughing at him <.< At least he tried. And I think that's pretty good already that he fixed them a bit. So it proves that He knows some basics about coding. Just a little respect. You wouldn't like that if I came to you and call you a cheap copy cat.. even if you explained the things as he did. So no reason to flame or make fun of others. Thanks.
02/19/2010 21:59 killersub#29
Quote:
Originally Posted by Secrets-man View Post
Lol. Like He Said.. He just Took someone's codes and fixed them a bit. So, I don't see nothing wrong with that. Unless you can do better than that, you should prove it then, instead of laughing at him <.< At least he tried. And I think that's pretty good already that he fixed them a bit. So it proves that He knows some basics about coding. Just a little respect. You wouldn't like that if I came to you and call you a cheap copy cat.. even if you explained the things as he did. So no reason to flame or make fun of others. Thanks.
I seriously don't blame myself for fixing his grammar-less codes, updating his NPCs,etc...he thinks he can code but makes all npcs like with a bunch of nonsense and errors :) anyways I actually am proud of myself for making newbies even at least 1% happier(hey it's an improvement should I say so myself?) :rtfm: and back to topic please(even for myself) :)
02/19/2010 22:26 Secrets-man#30
Quote:
Originally Posted by killersub View Post
I seriously don't blame myself for fixing his grammar-less codes, updating his NPCs,etc...he thinks he can code but makes all npcs like with a bunch of nonsense and errors :) anyways I actually am proud of myself for making newbies even at least 1% happier(hey it's an improvement should I say so myself?) :rtfm: and back to topic please(even for myself) :)
Lol yeah :P Nothing wrong with that. He's just flaming people for fun, that's how it looks like. But Nice job dude ^^ I've seen a few npc releases and stuff where they got some little typos, but that's fine. So +k Looks pretty cool. :)