| Mirage Source http://www.miragesource.net/forums/ |
|
| another question >> http://www.miragesource.net/forums/viewtopic.php?f=201&t=1311 |
Page 1 of 10 |
| Author: | zocheyado [ Mon Feb 05, 2007 5:51 pm ] |
| Post subject: | another question >> |
how do i edit my classes ? i searched the source coulndt find it , whent into data folder and went to classes but dosnt matter what i change it never works any ideas? |
|
| Author: | ShadowLife [ Mon Feb 05, 2007 6:17 pm ] |
| Post subject: | |
if you modify the classes.ini file WHILE the server is running, it doesnt reconize the change. Modify the file, then start the server. changes should be visible then. |
|
| Author: | zocheyado [ Mon Feb 05, 2007 6:22 pm ] |
| Post subject: | |
thanks that worked perfectly |
|
| Author: | Ambientiger [ Tue Feb 06, 2007 5:34 pm ] |
| Post subject: | |
As you say, tnl is controlled by this code in ms. Code: Function GetPlayerNextLevel(ByVal Index As Long) As Long GetPlayerNextLevel = (GetPlayerLevel(Index) + 1) * (GetPlayerSTR(Index) + GetPlayerDEF(Index) + GetPlayerMAGI(Index) + GetPlayerSPEED(Index) + GetPlayerPOINTS(Index)) * 25 End Function In a lot of other sources I've seen the levels are set by the use of an experience/level .ini file using this code instead. Code: Function GetPlayerNextLevel(ByVal Index As Long) As Long GetPlayerNextLevel = Experience(GetPlayerLevel(Index)) End Function Where Experience(GetPlayerLevel(Index)) would be the required exp from the .ini file for a player of that level to reach the next. you can then use it in Sub CheckPlayerLevelUp something like this. Code: Sub CheckPlayerLevelUp(ByVal index As Long)
Dim i As Long Dim d As Long Dim C As Long C = 0 If GetPlayerExp(index) >= GetPlayerNextLevel(index) Then If GetPlayerLevel(index) < MAX_LEVEL Then Do Until GetPlayerExp(index) < GetPlayerNextLevel(index) DoEvents If GetPlayerLevel(index) < MAX_LEVEL Then If GetPlayerExp(index) >= GetPlayerNextLevel(index) Then d = GetPlayerExp(index) - GetPlayerNextLevel(index) Call SetPlayerLevel(index, GetPlayerLevel(index) + 1) i = Int(GetPlayerSPEED(index) / 10) If i < 1 Then i = 1 If i > 3 Then i = 3 Call SetPlayerExp(index, d) C = C + 1 End If End If Loop If C > 1 Then Call GlobalMsg(GetPlayerName(index) & " has gained " & C & " levels!", 6) Else Call GlobalMsg(GetPlayerName(index) & " has gained a level!", 6) End If End If If GetPlayerLevel(index) = MAX_LEVEL Then Call SetPlayerExp(index, Experience(MAX_LEVEL)) End If End If Call SendHP(index) Call SendMP(index) Call SendSP(index) Call SendStats(index) End Sub please note that this isn't a full tutorial on how to do it, you would have to add loading of Experience() into the server and a few other things to get it running, but I hope it gives you some ideas. P.S If you want to change your classes without having to shutdown the server, you can use the 'reload classes' option under the 'Database' menu option on the server. |
|
| Author: | wanai [ Tue May 17, 2022 8:03 am ] |
| Post subject: | Re: another question >> |
Mich |
|
| Author: | wanai [ Tue May 17, 2022 8:04 am ] |
| Post subject: | Re: another question >> |
92.4 |
|
| Author: | wanai [ Tue May 17, 2022 8:05 am ] |
| Post subject: | Re: another question >> |
Repr |
|
| Author: | wanai [ Tue May 17, 2022 8:06 am ] |
| Post subject: | Re: another question >> |
Repr |
|
| Author: | wanai [ Tue May 17, 2022 8:07 am ] |
| Post subject: | Re: another question >> |
Enri |
|
| Author: | wanai [ Tue May 17, 2022 8:09 am ] |
| Post subject: | Re: another question >> |
Laza |
|
| Author: | wanai [ Tue May 17, 2022 8:10 am ] |
| Post subject: | Re: another question >> |
Sidn |
|
| Author: | wanai [ Tue May 17, 2022 8:11 am ] |
| Post subject: | Re: another question >> |
Bega |
|
| Author: | wanai [ Tue May 17, 2022 8:12 am ] |
| Post subject: | Re: another question >> |
Erns |
|
| Author: | wanai [ Tue May 17, 2022 8:13 am ] |
| Post subject: | Re: another question >> |
Terr |
|
| Author: | wanai [ Tue May 17, 2022 8:14 am ] |
| Post subject: | Re: another question >> |
Rabb |
|
| Author: | wanai [ Tue May 17, 2022 8:15 am ] |
| Post subject: | Re: another question >> |
Deko |
|
| Author: | wanai [ Tue May 17, 2022 8:16 am ] |
| Post subject: | Re: another question >> |
Rond |
|
| Author: | wanai [ Tue May 17, 2022 8:17 am ] |
| Post subject: | Re: another question >> |
Geor |
|
| Author: | wanai [ Tue May 17, 2022 8:19 am ] |
| Post subject: | Re: another question >> |
Nigh |
|
| Author: | wanai [ Tue May 17, 2022 8:20 am ] |
| Post subject: | Re: another question >> |
Roto |
|
| Author: | wanai [ Tue May 17, 2022 8:21 am ] |
| Post subject: | Re: another question >> |
John |
|
| Author: | wanai [ Tue May 17, 2022 8:22 am ] |
| Post subject: | Re: another question >> |
Rajn |
|
| Page 1 of 10 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|