lexkymbeth Posted August 4, 2014 Author Share Posted August 4, 2014 **Server & Client**in **Private Type PlayerRec** add```ExpMultiplier as LongExpMultiplierTime as Long```in **Private Type ItemRec** add```addExpMultiplier As LongaddExpMultiplierTime As Long```**Server**in **Sub ServerLoop** dim```Dim LastUpdateExpMod As Long```in **Sub ServerLoop** after the if statement **If Tick > LastUpdateSavePlayers Then**```If Tick > LastUpdateExpMod Then UpdateExpMod LastUpdateExpMod = GetTickCount + 60000End If```in **modServerLoop** add```Private Sub UpdateExpMod()Dim i As Long For i = 1 To Player_HighIndex If IsPlaying(i) Then If Player(i).ExpMultiplierTime > 0 Then Player(i).ExpMultiplierTime = Player(i).ExpMultiplierTime - 1 End If End If NextEnd Sub```in **sub GivePlayerEXP** add after **' give the exp**```If Player(index).ExpMultiplierTime > 0 Then exp = exp * Player(index).ExpMultiplierEnd If```in **sub UseItem** add after the if statement **If Item(itemnum).AddEXP > 0 Then**```If Item(itemnum).addExpMultiplierTime > 0 Then Player(index).ExpMultiplierTime = Item(itemnum).addExpMultiplierTime Player(index).ExpMultiplier = Item(itemnum).addExpMultiplier SendActionMsg GetPlayerMap(index), "x" & Item(itemnum).addExpMultiplier & " EXP", White, ACTIONMSG_SCROLL, GetPlayerX(index) * 32, GetPlayerY(index) * 32End If```**Client**in **frmEditor_Item** in frame **fraVitals **create two labels (lblExpTime "Multiplier Time: 0", lblExpMultiplier "Exp Multiplier: 0") and two scrlbars (scrlMultiplierTime,scrlMultiplier)![](http://puu.sh/aEWbm/821e0f7982.png)x2 click **scrlMultiplierTime** input```' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler lblExpTime.Caption = "Multiplier Time: " & scrlMultiplierTime.Value Item(EditorIndex).addExpMultiplierTime = scrlMultiplierTime.Value ' Error handler Exit Suberrorhandler: HandleError "scrlMultiplierTime_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub```x2 click **scrlMultiplier** input``` ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler lblExpMultiplier.Caption = "Exp Multiplier: " & scrlMultiplier.Value Item(EditorIndex).addExpMultiplier = scrlMultiplier.Value ' Error handler Exit Suberrorhandler: HandleError "scrlMultiplier_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub```In **sub ItemEditorInit** in the if statement **If frmEditor_Item.cmbType.ListIndex = ITEM_TYPE_CONSUME Then** under **frmEditor_Item.chkInstant.Value = .instaCast** add```frmEditor_Item.scrlMultiplier.Value = .addExpMultiplierfrmEditor_Item.scrlMultiplierTime.Value = .addExpMultiplierTime```**I may have forgot something, I coded the additions then did the tutorial if something is missing and it's not working please post something!** Link to comment Share on other sites More sharing options...
Nogutek Posted August 4, 2014 Share Posted August 4, 2014 Interesting. Definitely will use. Thanks! Link to comment Share on other sites More sharing options...
Officer Johnson Posted August 4, 2014 Share Posted August 4, 2014 > Interesting. Definitely will use. Thanks!yes it is really useful i asked him to make the tutorial he did a great job on it :) definetly useful depending on your game Link to comment Share on other sites More sharing options...
Officer Johnson Posted August 5, 2014 Share Posted August 5, 2014 Ok bugs: when u go to edit it in item editor after build, as soon as u change exp multiplier from 0 to 1 label changes to multiplier time and when u set it to 1 min and consume it, it lasts like 5 secs Link to comment Share on other sites More sharing options...
PVJsquad Posted August 5, 2014 Share Posted August 5, 2014 cool system , but can you describe what the system for? Link to comment Share on other sites More sharing options...
lexkymbeth Posted August 5, 2014 Author Share Posted August 5, 2014 > Ok bugs: when u go to edit it in item editor after build, as soon as u change exp multiplier from 0 to 1 label changes to multiplier time and when u set it to 1 min and consume it, it lasts like 5 secs1m = 60000ms so it ticks every one minute it should not last 5 seconds```If Tick > LastUpdateExpMod Then UpdateExpMod LastUpdateExpMod = GetTickCount + 60000End If```Only ticks every 60000msDid you change this number?–---------------------------------------------------------Once you create the item and consume it, it gives you an exp buff for a set amount of time and a set amount of multiplier. Link to comment Share on other sites More sharing options...
Officer Johnson Posted August 6, 2014 Share Posted August 6, 2014 > 1m = 60000ms so it ticks every one minute it should not last 5 seconds> > > > ```> If Tick > LastUpdateExpMod Then> UpdateExpMod> LastUpdateExpMod = GetTickCount + 60000> End If> > ```> Only ticks every 60000ms> > Did you change this number?> > –---------------------------------------------------------> > Once you create the item and consume it, it gives you an exp buff for a set amount of time and a set amount of multiplier.well ill retry tutorial and let you know how it turns out! Link to comment Share on other sites More sharing options...
Colonello Posted August 6, 2014 Share Posted August 6, 2014 This looks awesome. :o I may use this because it looks like something that would be great for game promotions or holiday events. Link to comment Share on other sites More sharing options...
Officer Johnson Posted August 6, 2014 Share Posted August 6, 2014 > This looks awesome. :o I may use this because it looks like something that would be great for game promotions or holiday eventslol yea hehe :) i tested again lex still not working Link to comment Share on other sites More sharing options...
Officer Johnson Posted August 8, 2014 Share Posted August 8, 2014 Ok I found the bug and here's the fix this is what it looks like without fix ' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerlblExpMultiplier.Caption = "Multiplier Time: " & scrlMultiplier.ValueItem(EditorIndex).addExpMultiplier = scrlMultiplier.Value' Error handlerExit Suberrorhandler:HandleError "scrlMultiplier_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubWhere it says lblExpMultiplier.Caption= multiplier time just change multiplier time to Exp Multiplier compile and it will work perfect thank you lex for base you just made a simple mistake no worries lol Link to comment Share on other sites More sharing options...
IFX Posted January 13, 2015 Share Posted January 13, 2015 So what exactly does this do? give you an item that goes away after a while that gives you an exp multiplier? I like the concept. Maybe could add in some form of cool animation when it runs out. Idk. Totally going to use this though. Link to comment Share on other sites More sharing options...
lexkymbeth Posted January 13, 2015 Author Share Posted January 13, 2015 I have no idea, I forgot that I even made this O.o Pretty sure that you use the item and it gives you a time period of x amount of EXP Link to comment Share on other sites More sharing options...
IFX Posted January 14, 2015 Share Posted January 14, 2015 HAHA. well if the page is so dead that not even the author remembers it I may as well not bother… Link to comment Share on other sites More sharing options...
lexkymbeth Posted January 20, 2015 Author Share Posted January 20, 2015 Well thats up to you. It works, nothing wrong with it! 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