 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
| Author |
Message |
lokaum
Joined: 25 Dec 2006 Posts: 29
|
Posted: Tue Dec 26, 2006 9:11 am Post subject: |
|
|
shilhook.src
| Code: | use uo;
use os;
use cfgfile;
include "include/random";
include "include/attributes";
include "include/classes";
program shilhook()
print( "Using ShilCheckSkill..." );
return 1;
endprogram
exported Function ShilCheckSkill( who, skillid, difficulty, points )
If( who.IsA(POLCLASS_NPC) && skillid != SKILLID_DETECTINGHIDDEN )
return 1;
Elseif( who.cmdlevel )
return 1;
Elseif( difficulty == 0 )
return 1;
Elseif( difficulty < 0 )
return SkillAsPercentSkillCheck( who, skillid, difficulty, points );
Else
return DifficultySkillCheck( who, skillid, difficulty, points );
Endif
Endfunction
function DifficultySkillCheck( who, skillid, difficulty, points )
var skill := GetEffectiveSkill( who, skillid );
if( skill == 0 )
if( who.IsA(POLCLASS_NPC) )
return 0;
endif
endif
var chance := CInt( skill - difficulty + 20 );
if( chance < 0 )
return 0;
elseif( chance == 0 )
chance := 2;
else
chance := CInt( chance * 2.5 );
if( chance > 120 )
chance := 120;
endif
endif
var check := RandomInt(100);
if( check >= chance )
if( IsSpecialisedIn( who, skillid ) )
check := RandomInt(100);
if( check >= chance )
return 0;
else
points := 0;
endif
else
return 0;
endif
endif
if( !who.isA(POLCLASS_NPC) )
points := CInt( points * CDbl(1.0 - (CDbl(chance) / 100.0)) );
if( points > 0 )
AwardPoints( who, skillid, points );
endif
endif
return 1;
endfunction
function SkillAsPercentSkillCheck( who, skillid, difficulty, points )
var skill := GetEffectiveSkill( who, skillid );
if( skill == 0 )
if( who.IsA(POLCLASS_NPC) )
return 0;
endif
endif
var chance := skill + CInt((difficulty+1) * 15);
if( chance < 2 )
chance := 2;
elseif( chance > 98 )
chance := 98;
endif
var check := RandomInt(100);
if( check >= chance )
if( IsSpecialisedIn( who, skillid ) )
check := RandomInt(100);
if( check >= chance )
if( chance < 10 )
AwardPoints( who, skillid, CInt(points/2) );
endif
return 0;
else
points := 0;
endif
else
if( chance < 10 )
AwardPoints( who, skillid, CInt(points/2) );
endif
return 0;
endif
endif
if( !who.isA(POLCLASS_NPC) )
if( points > 0 )
AwardPoints( who, skillid, points );
endif
endif
return 1;
endfunction
function GetSuccessLevel( who, skillid, success_level )
success_level := CInt( success_level + IsSpecialisedIn( who, skillid ) );
if( success_level <= 0 )
success_level := 1; // it must be a success (just in case)
endif
return success_level;
endfunction |
sorry but i dont know what i need change to keep 165skillcap and 180statscap...
i look for scripts\include\attributes.inc
and i dont found the location that i need change ;/
if you want that i post the attributes.inc here.. talk me.. |
|
 |
|
|
 |
 |
|