Zamin Posted August 26, 2009 Author Share Posted August 26, 2009 Hello,If your reading this, that means you opened my topic and agreed to help me. So thanks, before we even begin. :)OK, I installed unnown's gender edits, both of them:http://www.touchofdeathforums.com/smf/index.php/topic,31620.0.htmlhttp://www.touchofdeathforums.com/smf/index.php/topic,31622.0.htmlThose work fine, props to unnown. Now what I want to do is when I roll my mouse over an equipment, along with all the information, I want it to list which gender can equip the equipment. A picture will give a better idea:![](http://i6.photobucket.com/albums/y220/Zamin/gender.jpg)As you can see in the image, in the 'Requirements' category, there is aditional information. 'Gender: Male'. Basically what I want to do (also refer to pic again) is using unnown's edit, display the gender of the equipment.So what have I done? I added the gender lable (called: descGender) in frmMirage right under Speed:![](http://i6.photobucket.com/albums/y220/Zamin/gender2.jpg)Also, from what I understand (and i'm normally wrong). The code must go under```Private Sub picInv_MouseMove```under the line```desc.Caption = Trim$(Item(GetPlayerInvItemNum(MyIndex, d + 1)).desc)```The code that I came up with (which DOES NOT work) is:```'GenderDim genIf Item(ItemNum).Gender = 1 Then gen = "Male"ElseIf Item(ItemNum).Gender = 2 Then gen = "Female"End IfdescGender.Caption = gen```When I compile, I get an error that 'ItemNum' does not exist.Please help me on this. I need a working script. I think I am on the right track. No?If you read the entire post and are unable to help me, thanks for taking your time. If you are about to post, I hope your right.-Thanks again Link to comment Share on other sites More sharing options...
kris_hole Posted August 26, 2009 Share Posted August 26, 2009 change all theItem(ItemNum).GendertoItem(GetPlayerInvItemNum(MyIndex, d + 1)).genderand tell m what happens Link to comment Share on other sites More sharing options...
Zamin Posted August 26, 2009 Author Share Posted August 26, 2009 Hello,OK. 1 step closer. The cleint compiled into exe and I ran the game. When i roll the mouse over, it doesn't show me anything in the Gender bar. Not even the term 'Gender' which I made on the menu.Perhaps I did something wrong while making the gender lable? But I think i know how to make a lable, lol. I made sure that it's called descGender so I it's not the lable. :(-Thanks Link to comment Share on other sites More sharing options...
kris_hole Posted August 26, 2009 Share Posted August 26, 2009 dim gen as string Link to comment Share on other sites More sharing options...
Zamin Posted August 26, 2009 Author Share Posted August 26, 2009 Nope, still the same problem :(EDIT: This is what it gives me:![](http://i6.photobucket.com/albums/y220/Zamin/gender3.jpg) Link to comment Share on other sites More sharing options...
kris_hole Posted August 26, 2009 Share Posted August 26, 2009 before then if gender = 1 then stuffjust before thatgo msgbox(item(blah).gender)tell me what it says? if you have a males then it may say 0 not 1 Link to comment Share on other sites More sharing options...
Zamin Posted August 26, 2009 Author Share Posted August 26, 2009 @[THE-KRIS:> link=topic=50929.msg532434#msg532434 date=1251330233]> before then if gender = 1 then stuff> > just before that> > go msgbox(item(blah).gender)> > tell me what it says? if you have a males then it may say 0 not 1It highlights 'blah' and saysVariable not found.I am sure male=1 and female=2 becuase unnown coded it like that. For sure. Link to comment Share on other sites More sharing options...
kris_hole Posted August 26, 2009 Share Posted August 26, 2009 okay replace item(blah).gender with Item(GetPlayerInvItemNum(MyIndex, d + 1)).gender:P Link to comment Share on other sites More sharing options...
Zamin Posted August 26, 2009 Author Share Posted August 26, 2009 It gives me this error while it highlights '.Gender'```Compile error:Expected Sub, Function, of Property```Do you want me to put sub before 'Item….'?EDIT: Adding sub/function before 'Item...' doesn't work Link to comment Share on other sites More sharing options...
kris_hole Posted August 27, 2009 Share Posted August 27, 2009 sub?post what you got the code so far XD Link to comment Share on other sites More sharing options...
Zamin Posted August 27, 2009 Author Share Posted August 27, 2009 'Gender Dim gen As String Item(GetPlayerInvItemNum(MyIndex, d + 1)).Gender If Item(GetPlayerInvItemNum(MyIndex, d + 1)).Gender = 1 Then gen = "Male" ElseIf Item(GetPlayerInvItemNum(MyIndex, d + 1)).Gender = 2 Then gen = "Female" End If descGender.Caption = gensorry, didn't indent properly Link to comment Share on other sites More sharing options...
kris_hole Posted August 27, 2009 Share Posted August 27, 2009 so whered you put msgbox? Link to comment Share on other sites More sharing options...
Zamin Posted August 27, 2009 Author Share Posted August 27, 2009 @[THE-KRIS:> link=topic=50929.msg532447#msg532447 date=1251331846]> so whered you put msgbox?Sorry for late reply, right after```Dim gen as string```You told me to put this```Item(GetPlayerInvItemNum(MyIndex, d + 1)).Gender```Here:@[THE-KRIS:> link=topic=50929.msg532438#msg532438 date=1251330924]> okay replace item(blah).gender with Item(GetPlayerInvItemNum(MyIndex, d + 1)).gender> :PEDIT: LOL, my bad. I deleted 'msgbox' Link to comment Share on other sites More sharing options...
Zamin Posted August 27, 2009 Author Share Posted August 27, 2009 OK, I checked, It prompts me '0'Sry for dble post.Note that I have two weapons, a sword and a dagger. Male can wear sword, and only female can wear dagger. It gave me '0' for both items. This means that this '0' represents the sprite (or whatever) gender, not weapon gender. Right? Link to comment Share on other sites More sharing options...
kris_hole Posted August 27, 2009 Share Posted August 27, 2009 so male = 0 and female = 1, just change it from 1 to 2, and 0 to 1 Link to comment Share on other sites More sharing options...
Zamin Posted August 27, 2009 Author Share Posted August 27, 2009 @[THE-KRIS:> link=topic=50929.msg532455#msg532455 date=1251332884]> so male = 0 and female = 1, just change it from 1 to 2, and 0 to 1Ok, as mentioned above, I have two items. 1 fit for male only and 1 fit for female only.It worked, but when I scroll my mouse, it gives me 'Male' for both. I am not good in scripting for sure, but for sure I think that this is checking the character gender, not weapon gender. Link to comment Share on other sites More sharing options...
SawQuart Posted August 27, 2009 Share Posted August 27, 2009 Whats wrong with gays!? Link to comment Share on other sites More sharing options...
Zamin Posted August 27, 2009 Author Share Posted August 27, 2009 LOL! Please! If you can help then please tell me how. This stupid thing is so stupid. I just need to fix one line, and thats it. lol. Unnown's code is so complicated. Link to comment Share on other sites More sharing options...
SawQuart Posted August 27, 2009 Share Posted August 27, 2009 You could just make a gender skill right? Wouldnt that be much easier? You improve it by being married for certain amounts of time. Link to comment Share on other sites More sharing options...
Zamin Posted August 27, 2009 Author Share Posted August 27, 2009 @[SawQuart:> Jungletoe link=topic=50929.msg532525#msg532525 date=1251347957]> You could just make a gender skill right? Wouldnt that be much easier? You improve it by being married for certain amounts of time.No no no, this has nothign to do with getting married xD. Not right now at least. I installed both of unnown's scripts, listed on top post. His posts allows you to have a gender system which actually works and then weapons with gender restrictions.So now the problem is that I am trying to list what gender this equipment can wear in the Requirements Menu. You know what you scroll your mouse over an item and you get its stats. Well, I just want to add in that stat menu that which gender can equip this item.If too confusing, I posted in main post with images and stuff.Please help, very desperate :(-Thanks in advance Link to comment Share on other sites More sharing options...
SawQuart Posted August 27, 2009 Share Posted August 27, 2009 Dont you use:getplayergender instead of player gender? I'm new to sadscript so IDK for sure… Link to comment Share on other sites More sharing options...
Zamin Posted August 27, 2009 Author Share Posted August 27, 2009 Yes, thats the problem, getplayergender will get the player's gender. But I want the gender for the weapon, which is different. This is what unnown coded. I just hope he comes online and gives me a hand with this. Link to comment Share on other sites More sharing options...
Kimimaru Posted August 27, 2009 Share Posted August 27, 2009 I saw that Male was equal to 1 and Female was equal to 2 on unnown's topic. Link to comment Share on other sites More sharing options...
Zamin Posted August 27, 2009 Author Share Posted August 27, 2009 @Kimimaru:> I saw that Male was equal to 1 and Female was equal to 2 on unnown's topic.Yes, thats what i'm trying to get. But I can't find the command to call those saved values. I know they are being used in the client side in the frmItemeditor, but I dunno how to get it to Mirage and use it. If this makes any sense at all. Link to comment Share on other sites More sharing options...
kris_hole Posted August 27, 2009 Share Posted August 27, 2009 hmm… did you change the 1's ans 2's to 0 and 1, like 0 = male and 1 = female, thats how sex works in eclipse, not 1 and 2 but 0 and 1.so like```'GenderDim genIf Item(ItemNum).Gender = 0 Then gen = "Male"ElseIf Item(ItemNum).Gender = 1 Then gen = "Female"End IfdescGender.Caption = gen``` 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