willunited Posted January 13, 2013 Author Share Posted January 13, 2013 I did it for evolution of classes:Example:Fighter->Warrior->Knight/Puncher(i tried GetPlayerEvolution = 1 And GetPlayerEvolution = 9 but doenst work).```Function GetPlayerEvolution(ByVal index As Long) As LongSelect Case GetPlayerClass(index) Case 1 GetPlayerEvolution = 1 Case 2 GetPlayerEvolution = 2 Case 3 GetPlayerEvolution = 3 Case 4 GetPlayerEvolution = 4 Case 5 GetPlayerEvolution = 5 Case 6 GetPlayerEvolution = 6 Case 7 GetPlayerEvolution = 7 Case 8 GetPlayerEvolution = 8 Case 9 GetPlayerEvolution = 1 And 9 Case 10 GetPlayerEvolution = 2 And 10 Case 11 GetPlayerEvolution = 3 And 11 Case 12 GetPlayerEvolution = 4 And 12 Case 13 GetPlayerEvolution = 5 And 13 Case 14 GetPlayerEvolution = 6 And 14 Case 15 GetPlayerEvolution = 7 And 15 Case 16 GetPlayerEvolution = 8 And 16 Case 17 GetPlayerEvolution = 1 And 9 And 17 Case 18 GetPlayerEvolution = 1 And 9 And 18 Case 19 GetPlayerEvolution = 2 And 10 And 19 Case 20 GetPlayerEvolution = 2 And 10 And 20 Case 21 GetPlayerEvolution = 4 And 12 And 21 Case 22 GetPlayerEvolution = 4 And 12 And 22 Case 23 GetPlayerEvolution = 5 And 13 And 23 Case 24 GetPlayerEvolution = 5 And 13 And 24 Case 25 GetPlayerEvolution = 6 And 14 And 25 Case 26 GetPlayerEvolution = 6 And 14 And 26 Case 27 GetPlayerEvolution = 7 And 15 And 27 Case 28 GetPlayerEvolution = 7 And 15 And 28 Case 29 GetPlayerEvolution = 8 And 16 And 29 Case 30 GetPlayerEvolution = 8 And 16 And 30 Case 31 GetPlayerEvolution = 3 And 11 And 31 Case 32 GetPlayerEvolution = 3 And 11 And 32 End SelectEnd Function```And in UseItem sub:```If Item(itemnum).ClassReq > 0 Then If Not GetPlayerEvolution(index) = Item(itemnum).ClassReq Then PlayerMsg index, "Hidden", BrightRed Exit Sub End If End If``` Link to comment Share on other sites More sharing options...
tslusny Posted January 13, 2013 Share Posted January 13, 2013 EDIT: Nevermind..EDIT2: Why you have 30 classes? ![:o](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/ohmy.png) Link to comment Share on other sites More sharing options...
JohnPony Posted January 13, 2013 Share Posted January 13, 2013 Try ByRef Link to comment Share on other sites More sharing options...
willunited Posted January 13, 2013 Author Share Posted January 13, 2013 > EDIT: Nevermind..> > EDIT2: Why you have 30 classes? ![:o](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/ohmy.png)8 classes,26 is evolution.Edit:ByRef doenst work… Link to comment Share on other sites More sharing options...
Whitepinkbun Posted January 14, 2013 Share Posted January 14, 2013 …. when you call GetPlayerEvolution its asking what you want to equal... Basicaly your telling it to equal two different numbers why would you do this? If you can explain a little more of what your trying to do I might be able to offer a better solution. Link to comment Share on other sites More sharing options...
Whitepinkbun Posted January 14, 2013 Share Posted January 14, 2013 oh I'm an idiot just seen theIf Item(itemnum).ClassReq > 0 ThenIf Not GetPlayerEvolution(index) = Item(itemnum).ClassReq ThenPlayerMsg index, "Hidden", BrightRedExit SubEnd IfEnd IfHow about this ;If Item(itemnum).ClassReq > 0 ThenIf Not GetPlayerEvolution(index) = Item(itemnum).ClassReq or Not GetPlayerEvolution2(index) = Item(itemnum).ClassReq or Not GetPlayerEvolution2(index) = Item(itemnum).ClassReq or ThenPlayerMsg index, "Hidden", BrightRedExit SubEnd IfEnd IfThen do theGetPlayerEvolution sub 3 timeswith the other 2 equaling the other values…..Something to this effect >.> Link to comment Share on other sites More sharing options...
willunited Posted January 14, 2013 Author Share Posted January 14, 2013 Let me explain:Has 3 evolution classes,example:Fighter becomes Warrior,then he becomes puncher or knight (player choice).But if i change my class to Warrior,i can't equip Fighter equipments. Link to comment Share on other sites More sharing options...
Whitepinkbun Posted January 15, 2013 Share Posted January 15, 2013 Well the only solution I can think of is 3 get functions or something like thisIf Item(itemnum).ClassReq > 0 ThenSelect Case Item(itemnum).ClassReqCase 1If GetPlayerClass(index) <> 1 and GetPlayerClass(index) <> 9 and GetPlayerClass(index) <> 17 and GetPlayerClass(index) <> 18 thenPlayerMsg index, "Hidden", BrightRedExit SubEnd IfCase 2If GetPlayerClass(index) <> 2 and GetPlayerClass(index) <> 10 and GetPlayerClass(index) <> 19 and GetPlayerClass(index) <> 20 thenPlayerMsg index, "Hidden", BrightRedExit SubEnd IfCase 3ETC…End SelectEnd IfThis work?Ditch the get evolution function?It would now select which class.req the item has then see if a player is that level or the corresponding evolution levels. It's a bit more typing and I hate using select case but at least it'd work lol. 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