| Mirage Source http://www.miragesource.net/forums/ |
|
| Changing NPC's Max Stats http://www.miragesource.net/forums/viewtopic.php?f=210&t=3274 |
Page 1 of 2 |
| Author: | Abyss [ Mon Jan 14, 2008 9:44 pm ] |
| Post subject: | Changing NPC's Max Stats |
Hey all, Sigh... I'm even more dumb then I thought I were. As some people may have read, I want to change the scrollbars for an NPC's Strength, Defense, Speed, Magic, Health, EXP Given to a textbox so you can put in whatever number you want. This may be a good thing for other games too since you can make really strong NPC's with it which requires multiple people to be able to kill it. Well, I thought it was a nice idea but I found out that I really suck at coding, so i'm asking very nicely to a good and very kind person if he/she can make a tutorial for me how to do it. So i want the scrollbars changed to textboxes (you can also keep the scrollbars but I want to be able to let the NPC's give more then 32k (max Integer value)Exp or have more then 32k strength. Anyway, A big, very,very big thanks to the one who makes this, also thanks for the people who tried to help me in my other post. |
|
| Author: | Matt2 [ Mon Jan 14, 2008 9:51 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
Abyss wrote: Hey all, Sigh... I'm even more dumb then I thought I were. As some people may have read, I want to change the scrollbars for an NPC's Strength, Defense, Speed, Magic, Health, EXP Given to a textbox so you can put in whatever number you want. This may be a good thing for other games too since you can make really strong NPC's with it which requires multiple people to be able to kill it. Well, I thought it was a nice idea but I found out that I really suck at coding, so i'm asking very nicely to a good and very kind person if he/she can make a tutorial for me how to do it. So i want the scrollbars changed to textboxes (you can also keep the scrollbars but I want to be able to let the NPC's give more then 32k (max Integer value)Exp or have more then 32k strength. Anyway, A big, very,very big thanks to the one who makes this, also thanks for the people who tried to help me in my other post. You can also edit the max that the scrollbar goes up to, rather it in design mode or during run time... But converting them to text boxes shouldn't be that difficult. I suppose I can try to throw something of a tut together. It's really more basic programming than a MSE feature, however... |
|
| Author: | Abyss [ Mon Jan 14, 2008 9:53 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
but the max the scrollbar can is around 32k now because of the integer, and I want it higher Thanks for the help and quick responses, im starting to like this forum |
|
| Author: | Matt2 [ Mon Jan 14, 2008 9:59 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
[Edit] Removed crazy explination. Enjoy the easy to follow tut. If you want to replace it, and use a text box... Lemme open up my MSE... Alright. Delete the scroll bar for Strength[scrlSTR], while in design mode Now, draw a text box where the scroll bar would be. Name it txtSTR. Switch to code view[basically, double click anywhere on any form]. Now, Under Sub NPCEditorOK you want to find this code Code: Npc(EditorIndex).STR = frmNpcEditor.scrlSTR.Value And make it Code: If IsNumeric(frmNPCEditor.txtSTR.Text) Npc(EditorIndex).STR = frmNPCEditor.txtSTR.Text End If Rince and repeat for each scroll bar. If you get any problems, please ask. Man, that tut was easier to write than I thought. Also, I enjoy helping people learn VB. If you actually want to understand what any of that does, don't hesitate to ask. I'm glad you like it here. I hated it until I started PDoA. |
|
| Author: | Abyss [ Mon Jan 14, 2008 10:01 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
Thanks for the help, ill try it out tomorrow and tell you if it worked, Thanks! |
|
| Author: | Lea [ Tue Jan 15, 2008 1:20 am ] |
| Post subject: | Re: Changing NPC's Max Stats |
Make sure you check bounds. If the strength variable is a byte, and the user types in 1000, it will crash the game. |
|
| Author: | Matt2 [ Tue Jan 15, 2008 1:22 am ] |
| Post subject: | Re: Changing NPC's Max Stats |
I assumed he'd change the variables after all the advice. xD Go change them to longs. |
|
| Author: | Abyss [ Tue Jan 15, 2008 10:48 am ] |
| Post subject: | Re: Changing NPC's Max Stats |
thanks, and I already guessed that they should be longs |
|
| Author: | Abyss [ Tue Jan 15, 2008 10:59 am ] |
| Post subject: | Re: Changing NPC's Max Stats |
[CUT] Matt wrote: [Edit] Now, Under Sub NPCEditorOK you want to find this code Code: Npc(EditorIndex).STR = frmNpcEditor.scrlSTR.Value [CUT] :S I can't find Sub NPCEditorOk, and I also can't find the code. Maybe it's because i'm using Elysium? But thanks for the help. |
|
| Author: | Lea [ Tue Jan 15, 2008 1:20 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
Double click on the slider bar you want to change. That should get you right there. |
|
| Author: | Abyss [ Tue Jan 15, 2008 1:29 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
I get this: Code: Private Sub scrlSTR_Change()
lblSTR.Caption = STR(scrlSTR.Value) End Sub |
|
| Author: | Matt2 [ Tue Jan 15, 2008 1:35 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
Double click on the Save Command Button, and let's see what you get there. This is a support forum for MSE, not Elysium, just to let you know... |
|
| Author: | Abyss [ Tue Jan 15, 2008 1:43 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
i'll download MS then, I can't find any of those things you're saying thanks for the help, but maybe I have to find another hobby Oh, what version of MS should I use? |
|
| Author: | Matt2 [ Tue Jan 15, 2008 1:46 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
I would recomment 3.03, no licensed BS. But we don't support that. However, if you asked a question about 3.03, no one would know, unless it's something MSE changed. xD If you want, I can be your programmer. I have nothing better to do, and since I know the language, I don't mind working with Elysium. PM me for details. For some reason, you like to avoid PMing me. xD |
|
| Author: | Abyss [ Tue Jan 15, 2008 1:52 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
Oh great, thanks, ill PM you then |
|
| Author: | Lea [ Tue Jan 15, 2008 2:56 pm ] |
| Post subject: | Re: Changing NPC's Max Stats |
Elysium must pull the value from the scroll bar when you hit OK. So search the name of the scroll bar, and replace it with the appropriate code for a text box. |
|
| Page 1 of 2 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|