PenUltima Online

It is currently Sun Oct 12, 2008 5:17 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Which script for archery?
PostPosted: Fri Jan 26, 2007 8:00 am 
Offline

Joined: Thu Aug 10, 2006 9:59 am
Posts: 32
Hey!

Which are the scripts and includes used to calculate archery damage? The problem is im trying to take away the tactics bonus from archery but I cannot find the file where this bonus is added. in include/hitscriptinc there is nothing.

I heard this has something to do with the core, it is 095 :p Know any way to take away the tactics bonus?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 26, 2007 10:18 am 
Offline
Distro Developer
User avatar

Joined: Thu Apr 06, 2006 5:11 pm
Posts: 350
Location: Nederland, Texas
What distro are you using?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 26, 2007 11:53 am 
Offline

Joined: Thu Aug 10, 2006 9:59 am
Posts: 32
tekproxy wrote:
What distro are you using?


Running polversion 095 :p


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 27, 2007 6:08 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 146
Location: Illinois, USA
What script base are you running?

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 8:55 am 
Offline

Joined: Thu Aug 10, 2006 9:59 am
Posts: 32
No one know how to fix this? :/ Running Pol095 with a remade zh script release... Cmon guys help me out :p


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 10:44 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 146
Location: Illinois, USA
I have never looked at those combat scripts but I would think it would be someplace in a hitscript or something. Take a look at your archery package and your combat scripts to see how they are connected.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 1:17 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
To be honest, I have looked through the versions of ZH scripts that I have and I cannot find any reference to archery weapons.

My guess is that the ZH scripts you have probably left archery to tyhe core to handle. Now I could be wrong ofcourse but as I recall, the developers removed most if not all attack functions from the core some time ago. If that is the case then you'll hjave to script your own archery hitscript.

WoD scripts had done something similar with archery and it gave me a pain when I was running that scriptset because I wasn't getting any archery hits at all.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 3:06 am 
Offline

Joined: Thu Aug 10, 2006 9:59 am
Posts: 32
Yukiko wrote:
To be honest, I have looked through the versions of ZH scripts that I have and I cannot find any reference to archery weapons.

My guess is that the ZH scripts you have probably left archery to tyhe core to handle. Now I could be wrong ofcourse but as I recall, the developers removed most if not all attack functions from the core some time ago. If that is the case then you'll hjave to script your own archery hitscript.

WoD scripts had done something similar with archery and it gave me a pain when I was running that scriptset because I wasn't getting any archery hits at all.



Actually the zh scripts handle archery unless im mistaken, this is taken from the include file "hitscriptinc" in the scriptversion im trying to fix:


Code:
function ModByDist( attacker, defender, weapon, basedamage )

   if( weapon.attribute == "Archery" )

      basedamage := basedamage *
         ( 2.0 * GetEffectiveSkill( attacker, SKILLID_ARCHERY ) + GetDexterity(attacker) + 55.0 ) /
         ( 270.0 + (( 2.0 * GetEffectiveSkill( attacker, SKILLID_ARCHERY ) + GetDexterity(attacker) ) / 5 ) );


      var dist := Distance( attacker, defender );
      if( (dist <= 1) or (dist > 10) )
         basedamage := basedamage * 0.25;
      endif
      
      if( IsRanger(attacker) )
         basedamage := basedamage * ClasseBonus( attacker, CLASSEID_RANGER ) * 1.5;
      endif

   else

      if( defender.isA(POLCLASS_NPC) )
         basedamage := basedamage * ClasseBonus( attacker, CLASSEID_WARRIOR );
      else
         var level := GetObjProperty( attacker, CLASSEID_WARRIOR );
         if( level )
            level := level - 2;
            if( level >= 1 )
               basedamage := basedamage * ClasseBonusByLevel( level );
            endif
         endif
      endif

   endif

   if( GetObjProperty( attacker, CLASSEID_MAGE ) )
      if( !GetObjProperty( attacker, CLASSEID_WARRIOR ) )
         basedamage := basedamage / ClasseBonus( attacker, CLASSEID_MAGE );
      endif
   endif

   if( GetObjProperty( defender, CLASSEID_MAGE ) )
      if( !GetObjProperty( defender, CLASSEID_WARRIOR ) )
         basedamage := basedamage * ClasseBonus( defender, CLASSEID_MAGE );
      endif
   endif

   return basedamage;

endfunction


One fault in this is the * 1.5 up at when classebonus is calculated for rangers, but thats just a small problem. The biggest problem is that somehow after this is calculated the core takes over and adds tactics bonus. And I cannot see why the core would take over. What I need help with is finding the script or include file that monitors what is calculated in the core, if there even is one. Otherversions of releases I worked with does not let the core handle anything, so it can be done, just that I cannot come up with a way.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl