Mirage Posted December 19, 2011 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 217 Reputation: 18 Joined: 11/20/11 Last Seen: March 25, 2014 Share Posted December 19, 2011 Alright. So I am having issues with changing to trans classes. The Problem is a Novice can instantly change to a trans class. I'm trying to make it so you have to be the 2nd class before you can go trans. switch(select("Lord Knight:Paladin:High Wizard:Professor:Sniper:Clown:Gypsy:High Priest:Champion:Whitesmith:Creator:Assassin Cross:Stalker:Close")) { case 1: if(readparam(Class) == Job_Knight) goto L_JbError; specialeffect2 402; jobchange 4008; set JobLevel,1; close; Quote Link to comment Share on other sites More sharing options...
plankt Posted December 20, 2011 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 130 Reputation: 43 Joined: 12/11/11 Last Seen: July 16, 2017 Share Posted December 20, 2011 What you want to check is if the user NOT equals the correct job, then go to L_JbError which I guess will tell a "you're not allowed to..." message: if(readparam(Class) != Job_Knight) goto L_JbError; Quote Link to comment Share on other sites More sharing options...
Mirage Posted December 20, 2011 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 217 Reputation: 18 Joined: 11/20/11 Last Seen: March 25, 2014 Author Share Posted December 20, 2011 (edited) Thanks, for your help. No offense intended but, that didn't work. if(readparam(Class) < Job_Knight) goto L_JbError; That worked, its a stupid childish way of doing it but. It works -.- Edited December 20, 2011 by Mirage Quote Link to comment Share on other sites More sharing options...
plankt Posted December 20, 2011 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 130 Reputation: 43 Joined: 12/11/11 Last Seen: July 16, 2017 Share Posted December 20, 2011 What you do with that check: (readparam(Class) < Job_Knight) Is that you allow all values over (including) 'Job_Knight' which is 7. That means that you will be able to change to Lord Knight if your job is above or equal to 7, say 'Job_Priest' which is 8, 'Job_Wizard' which is 9, and so on.. Quote Link to comment Share on other sites More sharing options...
Mirage Posted December 20, 2011 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 217 Reputation: 18 Joined: 11/20/11 Last Seen: March 25, 2014 Author Share Posted December 20, 2011 Damn, your right. -__- The " (class) != Job_Knight) didnt work x.x Quote Link to comment Share on other sites More sharing options...
plankt Posted December 20, 2011 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 130 Reputation: 43 Joined: 12/11/11 Last Seen: July 16, 2017 Share Posted December 20, 2011 That depends on what you want to check for, and what you mean with didn't work? What jobs did/didn't work to change from? Lets take 'case 1' which is Lord Knight. I'm guessing only Knight should be able to do that change. Knight has the class number (according to 'dbconst.txt') 7 or 'Job_Knight'. If we check the users class, when the user is not Job_Knight, we want to jump to L_JbError User not Job_Knight -> Jump to L_JbError if(Class != Job_Knight) goto L_JbError; Quote Link to comment Share on other sites More sharing options...
Mirage Posted December 20, 2011 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 217 Reputation: 18 Joined: 11/20/11 Last Seen: March 25, 2014 Author Share Posted December 20, 2011 if(Class != Job_Knight) goto L_JbError; This doesn't work. Knight does not change to Lord Knight case 1: if(readparam(Class) != Job_Knight) goto L_JbError; specialeffect2 402; jobchange 4008; set JobLevel,1; close; Quote Link to comment Share on other sites More sharing options...
Emistry Posted December 20, 2011 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 minute ago Share Posted December 20, 2011 i though should be like this ? if( Class != Job_Knight ) goto L_JbError; your readparam ....didnt return the Class ID / "Name" because...the parameter value didnt match... the Class will return your Current Class ID . if you are Novice..it will return the Novice Class ID readparam( <parameter> ) : This function will return the basic stats of an invoking character, referred to by the parameter number. Instead of a number, you can use a parameter name if it is defined in "db/const.txt". Job ID Lists : Job_Novice 0 Job_Swordman 1 Job_Mage 2 Job_Archer 3 Job_Acolyte 4 Job_Merchant 5 Job_Thief 6 Job_Knight 7 Job_Priest 8 Job_Wizard 9 Job_Blacksmith 10 Job_Hunter 11 Job_Assassin 12 Job_Knight2 13 Job_Crusader 14 Job_Monk 15 Job_Sage 16 Job_Rogue 17 Job_Alchem 18 Job_Alchemist 18 Job_Bard 19 Job_Dancer 20 Job_Crusader2 21 Job_Wedding 22 Job_SuperNovice 23 Job_Gunslinger 24 Job_Ninja 25 Job_Xmas 26 Job_Novice_High 4001 Job_Swordman_High 4002 Job_Mage_High 4003 Job_Archer_High 4004 Job_Acolyte_High 4005 Job_Merchant_High 4006 Job_Thief_High 4007 Job_Lord_Knight 4008 Job_High_Priest 4009 Job_High_Wizard 4010 Job_Whitesmith 4011 Job_Sniper 4012 Job_Assassin_Cross 4013 Job_Lord_Knight2 4014 Job_Paladin 4015 Job_Champion 4016 Job_Professor 4017 Job_Stalker 4018 Job_Creator 4019 Job_Clown 4020 Job_Gypsy 4021 Job_Paladin2 4022 Job_Baby 4023 Job_Baby_Swordman 4024 Job_Baby_Mage 4025 Job_Baby_Archer 4026 Job_Baby_Acolyte 4027 Job_Baby_Merchant 4028 Job_Baby_Thief 4029 Job_Baby_Knight 4030 Job_Baby_Priest 4031 Job_Baby_Wizard 4032 Job_Baby_Blacksmith 4033 Job_Baby_Hunter 4034 Job_Baby_Assassin 4035 Job_Baby_Knight2 4036 Job_Baby_Crusader 4037 Job_Baby_Monk 4038 Job_Baby_Sage 4039 Job_Baby_Rogue 4040 Job_Baby_Alchem 4041 Job_Baby_Alchemist 4041 Job_Baby_Bard 4042 Job_Baby_Dancer 4043 Job_Baby_Crusader2 4044 Job_Super_Baby 4045 Job_Taekwon 4046 Job_Star_Gladiator 4047 Job_Star_Gladiator2 4048 Job_Soul_Linker 4049 Quote Link to comment Share on other sites More sharing options...
LCDTheOG Posted December 21, 2011 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 223 Reputation: 36 Joined: 12/13/11 Last Seen: February 1 Share Posted December 21, 2011 u could also use upper o.o, to check if they are be like if (Upper > 1){ changejob etc....}; Quote Link to comment Share on other sites More sharing options...
Question
Mirage
Alright. So I am having issues with changing to trans classes.
The Problem is a Novice can instantly change to a trans class. I'm trying to make it so you have to be the 2nd class before you can go trans.
Link to comment
Share on other sites
8 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.