Jump to content
  • 0

petskillattack2


Jasc

Question


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

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 by Emistry
Added [Code].
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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 by Cydh
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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.  /hmm

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;
post-5421-0-22026000-1366326746_thumb.jpg

Bapho Jr. with Spiral Attack 10000 (1000x10 hits)

 

petskillattack2 "LK_SPIRALPIERCE",10000,10,100,20;
post-5421-0-06774400-1366326763_thumb.jpg

Bapho Jr. with Frost Driver 10000 (1000x1 hit)

petskillattack2 "MG_FROSTDIVER",10000,1,100,20;
post-5421-0-07518900-1366326954_thumb.jpg

 

 

Bapho Jr. with Frost Driver 10000 (1000x10 hit), you  only get 1000

petskillattack2 "MG_FROSTDIVER",10000,10,100,20;
post-5421-0-70776300-1366326939_thumb.jpg Edited by Cydh
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...