Elijah23 Posted January 14, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Thursday at 02:33 PM Share Posted January 14, 2012 (edited) Hi! So I'm using a Job Change scroll.. Here's the script I'm using.. function script F_ChooseJob { SetArray(.@JobIDs[0], 4060, 4073, 4061, 4074, 4062, ((Sex) ? 4075 : 4076), 4063, 4077, 4064, 4078, 4065, 4079, 24, 25, 4046, 4047, 4049); Set(.@n$, "[Job Master]"); While(1) { Mes(.@n$); Mes("Please choose your desired job."); For(Set(.@i, 0); .@i < GetArraySize(.@JobIDs); Set(.@i, .@i + 1)) Set(.@MenuString$, .@MenuString$ + ((.@i) ? ":" : "") + JobName(.@JobIDs[.@i]) + ((.@i == GetArraySize(.@JobIDs) - 1) ? ":Close" : "")); Set(.@Menu ,Select(.@MenuString$) - 1); If(.@Menu >= GetArraySize(.@JobIDs)) Close(); Else { Next(); Mes(.@n$); Mes("Are you sure that you wish to become " + JobName(.@JobIDs[.@Menu]) + "?"); If(Select("Yes:No") == 2) Next(); // back to job selection Else { Next(); JobChange(Job_Novice_High, 1); ResetLvl(1); Set(JobLevel, 10); Switch(.@Menu) { case 0: jobchange 4002; set JobLevel, 50; jobchange 4008; set JobLevel, 70; jobchange 4060; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 1: jobchange 4002; set JobLevel, 50; jobchange 4015; set JobLevel, 70; jobchange 4073; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 2: jobchange 4003; set JobLevel, 50; jobchange 4010; set JobLevel, 70; jobchange 4061; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 3: jobchange 4003; set JobLevel, 50; jobchange 4017; set JobLevel, 70; jobchange 4074; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 4: jobchange 4004; set JobLevel, 50; jobchange 4012; set JobLevel, 70; jobchange 4062; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 5: jobchange 4004; set JobLevel, 50; if(Sex == 0) jobchange 4021; else jobchange 4020; set JobLevel, 70; if(Sex == 0) jobchange 4076; else jobchange 4075; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 6: jobchange 4005; set JobLevel, 50; jobchange 4009; set JobLevel, 70; jobchange 4063; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 7: jobchange 4005; set JobLevel, 50; jobchange 4016; set JobLevel, 70; jobchange 4077; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 8: jobchange 4006; set JobLevel, 50; jobchange 4011; set JobLevel, 70; jobchange 4064; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 9: jobchange 4006; set JobLevel, 50; jobchange 4017; set JobLevel, 70; jobchange 4078; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 10: jobchange 4007; set JobLevel, 50; jobchange 4013; set JobLevel, 70; jobchange 4065; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 11: jobchange 4007; set JobLevel, 50; jobchange 4018; set JobLevel, 70; jobchange 4079; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 12: set StatusPoint,StatusPoint - 52; jobchange 24; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 13: set StatusPoint,StatusPoint - 52; jobchange 25; set BaseLevel, 150; set JobLevel, 70; PercentHeal(100, 100); close; case 14: set StatusPoint,StatusPoint - 52; jobchange 4046; set BaseLevel, 150; set JobLevel, 50; PercentHeal(100, 100); close; case 15: set StatusPoint,StatusPoint - 52; jobchange 4046; set JobLevel, 50; jobchange 4047; set BaseLevel, 150; set JobLevel, 50; PercentHeal(100, 100); close; case 16: set StatusPoint,StatusPoint - 52; jobchange 4046; set JobLevel, 50; jobchange 4049; set BaseLevel, 150; set JobLevel, 50; PercentHeal(100, 100); close; } } } } } Item DB: 12626,Job_Change_Scroll,Job Change Scroll,2,,,10,,,, ,0xFFFFFFFF,7,2,,,,,,{ CallFunc("F_ChooseJob"); },{},{} So this is functional, If i add If( Class != 0 ) end; It's working for novice only, but i want to add a message that he/she can't use the scroll because he/she is not a novice... And the scroll will not be consumed... Edited January 14, 2012 by wakoko321 Quote Link to comment Share on other sites More sharing options...
Rikimaru Posted January 14, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 658 Reputation: 57 Joined: 11/20/11 Last Seen: July 1, 2017 Share Posted January 14, 2012 (edited) Then you have to change it to : if( Class == 0) end; If you have if( Class != 0) end; it ends if the Class is higher than novice,like Thief or Swordsman or all the other classes. So just change it to if( Class == 0) end; Edited January 14, 2012 by Rikimaru Quote Link to comment Share on other sites More sharing options...
llchrisll Posted January 14, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted January 14, 2012 (edited) Then you have to change it to : if( Class == 0) end; If you have if( Class != 0) end; it ends if the Class is higher than novice,like Thief or Swordsman or all the other classes. So just change it to if( Class == 0) end; Completely wrong -.-, Now every class EXCEPT novice can use the scroll. The code wakoko321 used was correct already Also something different was asked, learn to read more accurately :I. @Topic: I don't really know a good way except showing the message and give the item again like this { if(Class > 0) { dispbottom "This Scroll can only be used by an Novice."; getitem 12626,1; end; } else CallFunc("F_ChooseJob"); },{},{} Well you also could do it via the Item Job Requirement field : Job Change Scroll,2,,,10,,,, ,0xFFFFFFFF,7,2,,, Into 0x00000001 for Novice & S.Novice only ^^ Dunno what message will be printed then, maybe something like "This item can't be used" or like that. Regards, Chris Edited January 14, 2012 by llchrisll Quote Link to comment Share on other sites More sharing options...
Rikimaru Posted January 14, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 658 Reputation: 57 Joined: 11/20/11 Last Seen: July 1, 2017 Share Posted January 14, 2012 Oh yea,I should read more carefully,sorry chris and wakoko ... Quote Link to comment Share on other sites More sharing options...
llchrisll Posted January 14, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted January 14, 2012 Btw don't take that as insult please, I didn't intendent to do so. So I'm sorry, if I have offended you somehow . Regards, Chris Quote Link to comment Share on other sites More sharing options...
Rikimaru Posted January 14, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 658 Reputation: 57 Joined: 11/20/11 Last Seen: July 1, 2017 Share Posted January 14, 2012 That was no problem for me,I should read more carefully. That's all . Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 14, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Thursday at 02:33 PM Author Share Posted January 14, 2012 Thank you for your answers.. I tried both of your suggestions Chris... { if(Class > 0) { dispbottom "This Scroll can only be used by an Novice."; getitem 12626,1; end; } else CallFunc("F_ChooseJob"); },{},{} This is working fine although the unconsumable part is not what I want to happen.. Guess it can't be helped to add that... with regards to.... Into 0x00000001 for Novice & S.Novice only ^^ It does not show any message at all, you will not just able to use it.. Anyways, thanks.. Quote Link to comment Share on other sites More sharing options...
llchrisll Posted January 15, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted January 15, 2012 Well you also could try Item Type 11: Type: 0 Healing item. 2 Usable item. 3 Etc item 4 Weapon 5 Armor/Garment/Boots/Headgear 6 Card 7 Pet egg 8 Pet equipment 10 Ammo (Arrows/Bullets/etc) 11 Usable with delayed consumption (item is lost from inventory after selecting a target, for use with skills and pet lures) 18 Another delayed consume that requires user confirmation before using item. Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 15, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Thursday at 02:33 PM Author Share Posted January 15, 2012 Actually what i tried is Item Type 18, the one with the warning message with opening or not.. I''m finding a way if there's a way to edit that message or make another item type which shows the message i want... Quote Link to comment Share on other sites More sharing options...
llchrisll Posted January 15, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted January 15, 2012 Actually what i tried is Item Type 18, the one with the warning message with opening or not.. I''m finding a way if there's a way to edit that message or make another item type which shows the message i want... for a New item Type an src edit would be required as far as I know Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 16, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Thursday at 02:33 PM Author Share Posted January 16, 2012 Actually what i tried is Item Type 18, the one with the warning message with opening or not.. I''m finding a way if there's a way to edit that message or make another item type which shows the message i want... for a New item Type an src edit would be required as far as I know yeah already knew that.. And I also noticed that the message is from msgstringtable.txt Still looking on how to it.. anyway, thanks to your help.. Quote Link to comment Share on other sites More sharing options...
Question
Elijah23
Hi! So I'm using a Job Change scroll..
Here's the script I'm using..
Item DB:
So this is functional,
If i add
It's working for novice only, but i want to add a message that he/she can't use the scroll because he/she is not a novice... And the scroll will not be consumed...
Edited by wakoko321Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.