stydianx Posted November 14, 2012 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Share Posted November 14, 2012 i was thinking if there is a NPC that lets have a skill of another job. for example, i am a super novice, i want to acquire the skill "FALCON MASTERY", im going to go to an NPC that assigns a quest in order for me to acquire the skill that i wanted. it also let's me look on a list of skills (complete list of skills from all jobs.) and lets me choose from there. if there is already an existing script like there, please link it to me, cause i cant find one Quote Link to comment Share on other sites More sharing options...
Dastgir Posted November 14, 2012 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 331 Reputation: 63 Joined: 11/29/11 Last Seen: Saturday at 10:21 AM Share Posted November 14, 2012 (edited) *skill <skill id>,<level>{,<flag>}; *skill "<skill name>",<level>{,<flag>}; *addtoskill <skill id>,<level>{,<flag>}; *addtoskill "<skill name>",<level>{,<flag>}; These commands will give the invoking character a specified skill. This is also used for item scripts. Level is obvious. Skill id is the ID number of the skill in question as per 'db/(pre-)re/skill_db.txt'. It is not known for certain whether this can be used to give a character a monster's skill, but you're welcome to try with the numbers given in 'db/(pre-)re/mob_skill_db.txt'. Flag is 0 if the skill is given permanently (will get written with the character data) or 1 if it is temporary (will be lost eventually, this is meant for card item scripts usage.). The flag parameter is optional, and defaults to 1 in 'skill' and to 2 in 'addtoskill'. Flag 2 means that the level parameter is to be interpreted as a stackable additional bonus to the skill level. If the character did not have that skill previously, they will now at 0+the level given. // This will permanently give the character Stone Throw (TF_THROWSTONE,152), at // level 1. skill 152,1,0; So at end of quest just put this skill <skillid>,<level>,0; Edited November 14, 2012 by Dastgir Pojee Quote Link to comment Share on other sites More sharing options...
Vach Posted November 14, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 326 Reputation: 19 Joined: 09/27/12 Last Seen: February 27, 2021 Share Posted November 14, 2012 (edited) This is impossible within the current structure of the skill database(s). In order for a class to have a skill, it needs to be in that particular classes' skill tree, configured in the lua files, and you need to be sure that class has access to its requirements. The last one becomes an issue with something like a passive skill for a weapon that class can't use. Class == Job. =P There is a script command to give skills, but it won't function properly if it isn't in their skill list. Edited November 14, 2012 by Vach Quote Link to comment Share on other sites More sharing options...
Dastgir Posted November 14, 2012 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 331 Reputation: 63 Joined: 11/29/11 Last Seen: Saturday at 10:21 AM Share Posted November 14, 2012 (edited) This is impossible within the current structure of the skill database(s). In order for a class to have a skill, it needs to be in that particular classes' skill tree, configured in the lua files, and you need to be sure that class has access to its requirements. The last one becomes an issue with something like a passive skill for a weapon that class can't use. Class == Job. =P There is a script command to give skills, but it won't function properly if it isn't in their skill list. As I think it should work fine, if we do that "skill" function, the newly added skill by script goes to misc tab in skill tree view. Edited November 14, 2012 by Dastgir Pojee Quote Link to comment Share on other sites More sharing options...
Vach Posted November 14, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 326 Reputation: 19 Joined: 09/27/12 Last Seen: February 27, 2021 Share Posted November 14, 2012 It does, but in my opinion this will become undesireable without a large amount of control functions. Without being labeled as platinum skills, these skills could become free skill points if a skill resetter on your server. Also, if they are skills the class actually has then your NPC could easily either do nothing or grant additional points that that character would be considered to "have", again if a reset were to ever happen (or a stored build, such as Emistry's script). You'd have to have a large amount of class checks going on for each skill via the NPC, and write a variable that prevents resetting and ensures the skill isn't taken already and/or otherwise ever available for that job path. I would recommend using items for something like this, because then the server knows in advance those skills are truly (misc) and you have way more control. This is just my opinion. Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted November 14, 2012 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted November 14, 2012 Or maybe you just bound the skill into an item or card, so it'll look like Creamy card (teleport lv 1).. Quote Link to comment Share on other sites More sharing options...
Vach Posted November 14, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 326 Reputation: 19 Joined: 09/27/12 Last Seen: February 27, 2021 Share Posted November 14, 2012 Or maybe you just bound the skill into an item or card, so it'll look like Creamy card (teleport lv 1).. Yea, that's essentially what I was thinking/saying. This provides a lot more control then the script command. Quote Link to comment Share on other sites More sharing options...
stydianx Posted November 14, 2012 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Author Share Posted November 14, 2012 (edited) yes vash! i can feel you... but i don't know how to make a script like that.. EDIT: a script that will bound the skills to the item would be really nice, but the item needs to be bound to the character as well, so it can't be used by other players. Edited November 14, 2012 by stydianx Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 14, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted November 14, 2012 yes vash! i can feel you... but i don't know how to make a script like that.. EDIT: a script that will bound the skills to the item would be really nice, but the item needs to be bound to the character as well, so it can't be used by other players. make use of this file.... trunk/db/re/item_trade.txt Quote Link to comment Share on other sites More sharing options...
Vach Posted November 14, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 326 Reputation: 19 Joined: 09/27/12 Last Seen: February 27, 2021 Share Posted November 14, 2012 Also, there is an account bound item mod in the downloads section. I use it and it's great - I even have a special set of functions I programmed for it. I can't find it at the moment but let me kniw if you need ut later and I'll get everything together. 1 Quote Link to comment Share on other sites More sharing options...
stydianx Posted November 14, 2012 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Author Share Posted November 14, 2012 (edited) okay so im going to try this out first EDIT: oh wait.. there still no script to try out. XD still waiting for this Edited November 14, 2012 by stydianx Quote Link to comment Share on other sites More sharing options...
Vach Posted November 16, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 326 Reputation: 19 Joined: 09/27/12 Last Seen: February 27, 2021 Share Posted November 16, 2012 Account bound items is located here: http://rathena.org/board/files/file/2558-account-bound-items/ My function is as follows: function<TAB>script<TAB>GetBoundItem<TAB>{ // Gives the player a bound item but checks if its stackable and just does regular give item // if it is. // One Arg (zero), the item ID. set .@ItemType,getiteminfo(getarg(0),2); if (.@ItemType == 0 || .@ItemType == 2 || .@ItemType == 3 || .@ItemType == 6 || .@ItemType == 7 || .@ItemType == 8 || .@ItemType == 10 || .@ItemType == 11 || .@ItemType == 18) { getitem getarg(0),1; } else { getitembound getarg(0),1; } return; } Quote Link to comment Share on other sites More sharing options...
stydianx Posted November 16, 2012 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Author Share Posted November 16, 2012 (edited) Account bound items is located here: http://rathena.org/b...nt-bound-items/ My function is as follows: function<TAB>script<TAB>GetBoundItem<TAB>{ // Gives the player a bound item but checks if its stackable and just does regular give item // if it is. // One Arg (zero), the item ID. set .@ItemType,getiteminfo(getarg(0),2); if (.@ItemType == 0 || .@ItemType == 2 || .@ItemType == 3 || .@ItemType == 6 || .@ItemType == 7 || .@ItemType == 8 || .@ItemType == 10 || .@ItemType == 11 || .@ItemType == 18) { getitem getarg(0),1; } else { getitembound getarg(0),1; } return; } does this give other class's job? foes this give other jobs skills? Edited November 16, 2012 by stydianx Quote Link to comment Share on other sites More sharing options...
Vach Posted November 16, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 326 Reputation: 19 Joined: 09/27/12 Last Seen: February 27, 2021 Share Posted November 16, 2012 lol no this is the account bound items you were asking about. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 16, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted November 16, 2012 (edited) global function - getskillname source modification - OnPCStatCalcEvent_16923.patch prontera,155,184,5 script kjdshfsk 100,{ input .@skill_id, 1, 8240; if ( !getstrlen( getd("$@skillname"+ .@skill_id +"$") ) ) { mes "invalid skill"; close; } if ( getskilllv( .@skill_id ) ) { mes "you already learned this skill"; close; } else if ( @num_skill_learned > 10 ) { // maximum mes "you can't take any more new skills"; close; } skill .@skill_id, 1; learn_skill$ = learn_skill$ + .@skill_id +"#"; @num_skill_id[ @num_skill_learned ] = .@skill_id; @num_skill_learned++; close; OnPCStatCalcEvent: for ( .@i = 0; .@i < @num_skill_learned; .@i++ ) skill @num_skill_id[.@i], 1; end; OnPCLoginEvent: explode .@skill_id$, learn_skill$, "#"; @num_skill_learned = getarraysize( .@skill_id$ ); for ( .@i = 0; .@i < @num_skill_learned; .@i++ ) { skill atoi( .@skill_id$[.@i] ), 1; @num_skill_id[.@i] = atoi( .@skill_id$[.@i] ); } end; } I tested with skill ID 74 on a dancer, seems like not working ... not sure ... somebody else try ? Edited November 16, 2012 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Akinari Posted November 17, 2012 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 247 Reputation: 207 Joined: 10/23/12 Last Seen: March 2, 2022 Share Posted November 17, 2012 There's no way, that I can think of, to pick out the kind of information you'd need for the skills at the moment. You would need to modify the skill table in the SQL to accept a new value, type of skill whether permanent or other, and add them to the data structure called in the appropriate places in the source. From there mod the resetskill; command to only reset for permanent skills and give back the correct amount of skill points. This seems like the most robust way to complete this task. Quote Link to comment Share on other sites More sharing options...
Dastgir Posted November 17, 2012 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 331 Reputation: 63 Joined: 11/29/11 Last Seen: Saturday at 10:21 AM Share Posted November 17, 2012 Script:GiveSkill.txt Usage: put GiveSkill(<skillid>,<level>); in the reward to get the skill CheckSkillPC(<number>); for not allowing more than <number> skills. I have included test script for gm in which you can pm npc:GiveSkillPC with message "DROP" to Drop table. "CREATE" to create table, "<skillid>#<level>" to get that level It by defaults put the sql table ,(OnInit Label). Tested and Working. Thanks. I have already given the script @TopicStarter, but he doesn't seem to know how to use it. Quote Link to comment Share on other sites More sharing options...
malufett Posted November 17, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted November 17, 2012 this can be easily done in src..and I'll show you some easy way.. make used of this variable in your npc set NEW_SKILL, skill_id; set NEW_SKILL_LV, skill_lv and force the character to relog.. but after that add this line in pc.c under 'pc_reg_received' then recompile if ( (i = pc_readglobalreg(sd,"NEW_SKILL")) > 0 ) { int lv = pc_readglobalreg(sd,"NEW_SKILL_LV") sd->status.skill[i].id = sd->cloneskill_id; if( lv > 0 ) sd->status.skill[i].lv = lv; else sd->status.skill[i].lv = 1; sd->status.skill[i].flag = SKILL_FLAG_TEMPORARY; } enjoy.. NB. not yet tested..and please check what will happen if you equip an item with same skill cause I used 'SKILL_FLAG_TEMPORARY' 1 Quote Link to comment Share on other sites More sharing options...
Question
stydianx
i was thinking if there is a NPC that lets have a skill of another job.
for example, i am a super novice, i want to acquire the skill "FALCON MASTERY", im going to go to an NPC that
assigns a quest in order for me to acquire the skill that i wanted.
it also let's me look on a list of skills (complete list of skills from all jobs.) and lets me choose from there.
if there is already an existing script like there, please link it to me, cause i cant find one
Link to comment
Share on other sites
17 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.