|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
|
Critical Hit System
Author: Sailor E-Mail: sailor@gesparts.org Details: This package allows you to have a completed critical hit system. Every mobile has %5 base critical chance and there are "critical chance increase" items (like hit chance increase it is a attribute). Total critical chance is %(5+itembonuses)..Item's bonus is capped at 15. So for example i have a shield with %3 critical chance increase and a bracelet with %4 critical chance increase. I have total %5+3+4=%12 chance to stike critical. Criticals also work with spells. Critical chance increase items can be dropped by monsters or crafted by runic tools, enhanced like other attributes (damage increase etc.) Ah i almost forget, critical strikes add %100 damage bonus but that doesn't mean doubling the damage. The %100 damage bonus will added to other bonusses like skill bonusses or damage inc item bonusses. If a player have a %150 total damage bonus, he will have %250 bonus when strikes critical. I hope you find this document useful. INSTALLATION: -Extract the files to your Scripts/custom directory -Find your old scripts (AOS.cs, BaseWeapon.cs, BaseArmor.cs, BaseClothing.cs, BaseJewel.cs, Spell.cs, BaseRunicTools.cs) and backup&delete them. VERSION INFO: v1.1: Critical strike chance is now affected by luck. Luck/100 will be added to players critical strike chance. NOTES: Feel free to use, modify and fix the scripts. I will take no responsibility if these scripts causes damages. (I don't think it can cause problems but who knows ) If you find a bug please post here, i will help as much as i can.Last edited by sailor; 01-28-2006 at 05:10 PM. |
|
|
|
|
#2 (permalink) |
|
Forum Master
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,261
|
This seems like a GREAT script. Suggestion: make luck attribute to the critical strikes, either in congruency with the new property on wearables or instead of the new property (Critical Chance).
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 37
Posts: 3,509
|
Nice job! Good to see that you got this figured out
I will give it try.
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment. Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse." My Customs:
|
|
|
|
|
#6 (permalink) | |
|
Forum Expert
|
Quote:
![]()
__________________
![]() They only give you two choices; be a rebel or a slave (So what you do?) So I rebel Like a ulser in the belly of the beast stayin true to it -- the coup/dead prez |
|
|
|
|
|
#9 (permalink) |
|
Forum Master
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,261
|
Another idea!
In a game I play (Warcraft 3), when a critical hit is made, the damage shows above the unit's head in a special color. Perhaps you could make it show above the players' head "*Critical Strike*" (PublicOverheadMessage) or something to that effect... |
|
|
|
|
#14 (permalink) |
|
Newbie
Join Date: Apr 2004
Age: 34
Posts: 77
|
I got the message working above player. But what I would like to see is it appear above the monster you attacked. I have tried several ways with no luck. Here is the one I made that makes it appear above players head.
Code:
//critical hit attack bonus here
int baseCritChance = 5;
if (baseCritChance + critChanceBonus > Utility.Random(100) && m_Caster.Combatant != null && damage > 0)
{
m_Caster.LocalOverheadMessage( MessageType.Emote, 0x3F, true,
"* CRITICAL *" );
damageBonus += 100;
}
Code:
if (baseCritChance + critChanceBonus > Utility.Random(100) && attacker.Combatant != null && damage > 0)
{
attacker.LocalOverheadMessage( MessageType.Emote, 0x3F, true,
"* CRITICAL *" );
damageBonus += 100;
}
|
|
|
|
|
#15 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Location: Germany (american though)
Age: 33
Posts: 957
|
very nice. I have modified it a bit so that the crit hits are not useable against players.
PvM = players can crit monsters MvM = monsters can crit monsters MvP = monsters can not crit players PvP = players can not crit players that way I dont get a hatemail asking why some dorko with a great weapon is crit-instakilling people ![]() |
|
|
|
|
#17 (permalink) |
|
Join Date: May 2003
Posts: 303
|
I am seeing one small problem with this...
To test this, I set critical to 50 on a player via [props just as a test to determine if the system is working in game. Player A attacks Monster A. In keeping both status bars up for both Player and Mob. I have the critical mod added so it displays overhead. It's saying the player has a critical hit yet no HP are taken from the monster (a miss). Same with archery, player given Critical Hit, but no damage done and arrow misses and falls to the ground. Any idea why? Is there a check in the system to make sure critical can only be given on an actual hit? |
|
|
|
|
#18 (permalink) |
|
Newbie
|
warduke, i thought about your code but i could only find m_caster.Combatant .. but that would be no good idead when casting area effect spells. or what will happen when i select a person instead of previous target? will caster.Combatant switch to the new target before this check? So i couldn't find a good solution.
anvil, making items critical chance increase props 50 will make no difference, it will be capped. you can give 10000 luck to have (10000/100=100) %100 chance to strike critical. but you are right there is a problem, even crafting an item, it can say Critical Strike! I couldn't solve it; i searched in my scripts directory but i coulnd't find any lines which uses the function that i modified (except spells and weapon hit thing). maybe there can be a core function or something else? i tried to add a check if attacker has a combatant to prevent this bug, but still you can get wrong "Critical Strike!" messages when you have a combatant and making something else than fighting. any suggestions will be fine for me ![]() |
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|