Jasc Posted April 17, 2013 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 270 Reputation: 20 Joined: 12/10/11 Last Seen: June 28, 2022 Share Posted April 17, 2013 (edited) Hi all you talented source coders out there! script.c /// petskillattack2 <skill id>,<level>,<div>,<rate>,<bonusrate> /// petskillattack2 "<skill name>",<level>,<div>,<rate>,<bonusrate> BUILDIN_FUNC(petskillattack2) { struct pet_data *pd; TBL_PC *sd=script_rid2sd(rain); if(sd==NULL || sd->pd==NULL) return 0; pd=sd->pd; if (pd->a_skill == NULL) pd->a_skill = (struct pet_skill_attack *)aMalloc(sizeof(struct pet_skill_attack)); pd->a_skill->id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); pd->a_skill->lv=script_getnum(st,3); pd->a_skill->div_ = script_getnum(st,4); pd->a_skill->rate=script_getnum(st,5); pd->a_skill->bonusrate=script_getnum(st,6); return 0; } Right now for petskillattack2, it doesn't exceed over 100 for "fixed damage" because it is calling for level Here is the Rathena documentation - http://rathena.org/wiki/Petskillattack Using the documentation has follows, the example script would not work because the "fixed damage" is capped at 100 Does anyone know how to change the arguments in source so it can be higher? I have pasted the source in script.c that it is calling for Help would be appreciated, thanks! Edited April 18, 2013 by Emistry Added [Code]. Quote Link to comment Share on other sites More sharing options...
Cydh Posted April 18, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted April 18, 2013 (edited) about the wiki said about petskillattack2 petskillattack2 15,150,3,50,20; This would give the pet the skill Frost Diver and would cause 150 damage per attack, for 3 attacks. It has a 50% chance to cast, but is increased by 20% if the pet has full intimacy.I think the correct one is This would give the pet the skill Frost Diver and would cause 150 total damage, 50 damage per attack, for 3 attacks. It has a 50% chance to cast, but is increased by 20% if the pet has full intimacy.got from pet_db.txt //petskillattack2 skillid, damage, hits, rate, bonusrate //Same as petskillattack, but the damage and number of hits is fixed //the damage specified is total, not per hit. the damage is capped 100 if: petskillattack2 "LK_SPIRALPIERCE",100,10,100,0;and this is higher as you want?petskillattack2 "LK_SPIRALPIERCE",50000,10,100,0; Edited April 18, 2013 by Cydh Quote Link to comment Share on other sites More sharing options...
Jasc Posted April 18, 2013 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 270 Reputation: 20 Joined: 12/10/11 Last Seen: June 28, 2022 Author Share Posted April 18, 2013 Yah it won't do 50000 fix damage, it is capped at 100, I want it to do more like what you did in second examplw Quote Link to comment Share on other sites More sharing options...
Cydh Posted April 18, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted April 18, 2013 (edited) Yah it won't do 50000 fix damage, it is capped at 100, I want it to do more like what you did in second examplw I did nothing with source. what's svn do u use? I think, we need correct the Wiki. as my first post and also, Frost Driver only hit once. so, that Impossible to get 150 damage by 3 hits Bapho Jr. with Spiral Attack 1000 (100x10 hits) petskillattack2 "LK_SPIRALPIERCE",1000,10,100,20; Bapho Jr. with Spiral Attack 10000 (1000x10 hits) petskillattack2 "LK_SPIRALPIERCE",10000,10,100,20; Bapho Jr. with Frost Driver 10000 (1000x1 hit) petskillattack2 "MG_FROSTDIVER",10000,1,100,20; Bapho Jr. with Frost Driver 10000 (1000x10 hit), you only get 1000 petskillattack2 "MG_FROSTDIVER",10000,10,100,20; Edited April 18, 2013 by Cydh Quote Link to comment Share on other sites More sharing options...
Jasc Posted April 19, 2013 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 270 Reputation: 20 Joined: 12/10/11 Last Seen: June 28, 2022 Author Share Posted April 19, 2013 Yes, thank you Cydh, everything seems to be working now. Lots of things to take into consideration: 1. It was important to take factor into the monsters element, so petskillattack2 does not override any elements even if it is fixed damage 2. Make sure that the mob has proper dex//int for it to do sufficient damage. Without dex, it still abides to casting time etc I believe it works now, thanks Cydh! Quote Link to comment Share on other sites More sharing options...
Question
Jasc
Hi all you talented source coders out there!
script.c
Added [Code].
Link to comment
Share on other sites
4 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.