Page 1 of 1

Archery>Tactics

Posted: Thu Jan 11, 2007 6:35 am
by lokaum
Hi people

I want that thing:

- Archery damage dont base in Tactics

Where i need change the thing?

Posted: Thu Jan 11, 2007 6:59 am
by SMJ
That's not scripted in POL095. That's handled by the core. If you don't want that to happen, you'll have to handle it in a syshook script.

Posted: Fri Jan 12, 2007 10:46 am
by lokaum
look...

Code: Select all

use uo;
use os;

include "include/skillpoints";
include "include/attributes";

program shilcombat()

	print( "Using ShilcombatAdvancement..." );
	return 1;

endprogram


exported function ShilCombatAdvancement( attacker, weapon, defender )

    If( weapon )
    Var SkillID := FindSkillidByIdentifier(weapon.attribute);
    AwardPoints( attacker, SkillID, 30 );
    Else
    AwardPoints( attacker, 43, 30 );
    Endif

    AwardPoints( attacker, 27, 30 );

endfunction

function FindSkillidByIdentifier(skid)
  var retval;
  case(skid)
    "Wrestling": retval := SKILLID_WRESTLING;
    "Fencing":   retval := SKILLID_FENCING;
    "Swords":    retval := SKILLID_SWORDSMANSHIP;
    "Swordsmanship":    retval := SKILLID_SWORDSMANSHIP;
    "Mace":      retval := SKILLID_MACEFIGHTING;
    "Macefighting":      retval := SKILLID_MACEFIGHTING;
    "Archery":    retval := SKILLID_ARCHERY;
  endcase 
  return retval;
endfunction
if i remove:
"Archery": retval := SKILLID_ARCHERY;

only Tactics up while i macro archery...

i want do inverse... up only archery, but no up tactics...

Posted: Fri Jan 12, 2007 4:16 pm
by SMJ
What you want to do is an exception, right? That narrows it down to either any conditional expression. In this case, you only want to block out one skill; so you use an if-else exception. If you look at client.inc, you'll see that SKILLID_TACTICS := 27. You want to avoid adding skillpoints to SKILLID_TACTICS, so the first part that comes to mind is the line:

Code: Select all

AwardPoints( attacker, 27, 30 );
Thus, the fix is:

Code: Select all

if( SkillID != SKILLID_ARCHERY )
    AwardPoints( attacker, 27, 30 );
endif

Posted: Fri Jan 12, 2007 5:32 pm
by lokaum
Thanks man!!!!!!

Now working... =]

Posted: Fri Jan 12, 2007 9:08 pm
by SMJ
Glad I could help :)