hagefade Posted March 8, 2010 Author Share Posted March 8, 2010 Hey, is there anyway that you can set items to be worn by 2 selected classes? Link to comment Share on other sites More sharing options...
Animaru Posted March 8, 2010 Share Posted March 8, 2010 Only by scripting.If would have to start with something like this ( I think)If class = 1then …..If class = 2then......else*You cant use this lol*Get a second opinion though. ;) Link to comment Share on other sites More sharing options...
Zop Posted March 8, 2010 Share Posted March 8, 2010 Just make it so that only class 1 can obtain the item and make it a bound item...Maybe that'd be easier? Link to comment Share on other sites More sharing options...
Animaru Posted March 8, 2010 Share Posted March 8, 2010 No he means that how you can choose for the item to only be used by 1 class.But he wants to have it that 2 classes can use it. So he needs that kind of script. Yea its confusing. :P Link to comment Share on other sites More sharing options...
hagefade Posted March 8, 2010 Author Share Posted March 8, 2010 I need more help with the code then Animaru, so what do I put and where? Link to comment Share on other sites More sharing options...
MasterBit13 Posted March 8, 2010 Share Posted March 8, 2010 @Animaru:> Only by scripting.> > If would have to start with something like this ( I think)> > If class = 1> then …..> > If class = 2> then......> > else> *You cant use this lol*> > Get a second opinion though. ;)Incorrect.It would be:```If GetPlayerClass=1ElseIf GetPlayerClass=2```OR```If GetPlayerClass > 3```Will allow any class bellow class 3. Link to comment Share on other sites More sharing options...
hagefade Posted March 8, 2010 Author Share Posted March 8, 2010 KK for example if I wanted item 1 to be able to be used by class 8 and 10, how would I do it and where would I put it? Link to comment Share on other sites More sharing options...
MasterBit13 Posted March 9, 2010 Share Posted March 9, 2010 @hagefade:> KK for example if I wanted item 1 to be able to be used by class 8 and 10, how would I do it and where would I put it?Hmm…You would have to swap 8 to 9 and make it:```If GetPlayerClass < 8 then```OR:```If GetPlayerClass=8 andElseIf GetPlayerClass=10 then```It would be in sub onattack or scripted item I believe, not sure though.. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted March 9, 2010 Share Posted March 9, 2010 Actually bit, since it's a function, it would be GetPlayerClass(Index).And it's best to do something like,If GetPlayerClass(Index) = 8 And GetPlayerClass(Index) = 10 Then '…etcEnd IfEither way, there's still no way to actually run a script when a player equips an item (not that I know of), so you won't be able to do that anyway.My solution, which only works with weapons, is to throw this at the top of the OnAttack sub:```Dim weapon_slotDim player_weaponweapon_slot=Int(GetPlayerWeaponSlot(index))player_weapon=Int(GetPlayerInvItemNum(index, weapon_slot))Select Case player_weapon Case 2 'Weapon number '2' is the club If GetPlayerClass(index) <> 0 Then Call PlayerMsg(index, "Only Pwnt can use this club!", 4) Exit Sub End If Case 5 'Weapon number '5' is the wand. If GetPlayerClass(index) <> 1 Then Call PlayerMsg(index, "Only star can use this wand!", 4) Exit Sub End IfEnd Select``` 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