Hi people
I want that thing:
- Archery damage dont base in Tactics
Where i need change the thing?
Archery>Tactics
look...
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...
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"Archery": retval := SKILLID_ARCHERY;
only Tactics up while i macro archery...
i want do inverse... up only archery, but no up tactics...
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:
Thus, the fix is:
Code: Select all
AwardPoints( attacker, 27, 30 );Code: Select all
if( SkillID != SKILLID_ARCHERY )
AwardPoints( attacker, 27, 30 );
endif