Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 01-28-2006, 08:42 AM   #1 (permalink)
Newbie
 
Join Date: Jan 2006
Location: Turkey
Age: 22
Posts: 35
Send a message via MSN to sailor
Default Critical Hit System

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.
Attached Files
File Type: zip Critical System 1.1.zip (46.6 KB, 349 views)

Last edited by sailor; 01-28-2006 at 05:10 PM.
sailor is offline  
Old 01-28-2006, 01:15 PM   #2 (permalink)
Forum Master
 
Joeku's Avatar
 
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,261
Default

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).
Joeku is offline  
Old 01-28-2006, 05:11 PM   #3 (permalink)
Newbie
 
Join Date: Jan 2006
Location: Turkey
Age: 22
Posts: 35
Send a message via MSN to sailor
Default

thanks for the idea!!
Now in version 1.1: Critical strike chance is now affected by luck. Luck/100 will be added to players critical strike chance.
sailor is offline  
Old 01-28-2006, 06:46 PM   #4 (permalink)
Forum Expert
 
Lucid Nagual's Avatar
 
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 37
Posts: 3,509
Thumbs up sailor

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:
Lucid Nagual is offline  
Old 01-29-2006, 04:24 AM   #5 (permalink)
Account Terminated
 
Join Date: Jan 2006
Posts: 50
Default

lol sounds like something out of pokemon "That attack was a critical Hit!"
noob2 is offline  
Old 01-29-2006, 04:54 AM   #6 (permalink)
Forum Expert
 
orpheus's Avatar
 
Join Date: Jan 2004
Age: 29
Posts: 353
Send a message via AIM to orpheus Send a message via MSN to orpheus
Default

Quote:
Originally Posted by noob2
lol sounds like something out of pokemon "That attack was a critical Hit!"
actually its basically in just about every rpg... D&D... d20 + d20 = critical hit
__________________


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
orpheus is offline  
Old 01-29-2006, 06:45 AM   #7 (permalink)
Forum Expert
 
Join Date: May 2005
Location: United Kingdom
Age: 17
Posts: 255
Send a message via MSN to Swerve_jnr
Default

loverly script, well done this is great!
Swerve_jnr is offline  
Old 01-29-2006, 06:49 AM   #8 (permalink)
 
Join Date: Dec 2004
Location: Sweden
Posts: 117
Default

Sounds like a awsome script, its great to have this in uo. thx
__________________
|
|
| Xibalba - The gates of Hell
|
|_________________________
Tobbe371 is offline  
Old 01-29-2006, 10:40 AM   #9 (permalink)
Forum Master
 
Joeku's Avatar
 
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,261
Default

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...
Joeku is offline  
Old 01-29-2006, 12:25 PM   #10 (permalink)
Newbie
 
Join Date: Nov 2003
Age: 28
Posts: 23
Default

WOW amazing! You rock man! You are my new God!
Last week I start a project like this and well, no need now!
Thanks for sharing!
Ludovic is offline  
Old 01-29-2006, 04:00 PM   #11 (permalink)
Newbie
 
Join Date: Jan 2006
Location: Turkey
Age: 22
Posts: 35
Send a message via MSN to sailor
Default

good idea joeku, will try to do that
sailor is offline  
Old 01-29-2006, 07:20 PM   #12 (permalink)
Forum Expert
 
Seven's Avatar
 
Join Date: Dec 2004
Location: Tomah, WI
Age: 19
Posts: 1,326
Default

This system only works on AOS then?

I just noticed we needed to edit the AOS.cs file.
__________________
We have cookies... (Looking for Server Raters/News Reporters)
[ www . ryst . net ]
Seven is offline  
Old 01-29-2006, 07:30 PM   #13 (permalink)
Newbie
 
Join Date: Jan 2006
Location: Turkey
Age: 22
Posts: 35
Send a message via MSN to sailor
Default

yeah, i added a AosAttribute to weapons, shield etc.. and Luck is alse important which means you need AOS enabled.
i dont think to make a pre aos version, but it can be done with a few changes.
sailor is offline  
Old 02-08-2006, 12:58 AM   #14 (permalink)
Newbie
 
warduke's Avatar
 
Join Date: Apr 2004
Age: 34
Posts: 77
Default message above players head.

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;
            }
and for weapons

Code:
            if (baseCritChance + critChanceBonus > Utility.Random(100) && attacker.Combatant != null && damage > 0)
            {
		attacker.LocalOverheadMessage( MessageType.Emote, 0x3F, true,
		"* CRITICAL *" );
                damageBonus += 100;
            }
Not sure how to add to the monster but this is better then the journal message.
warduke is offline  
Old 02-10-2006, 09:36 AM   #15 (permalink)
Forum Expert
 
Join Date: Oct 2002
Location: Germany (american though)
Age: 33
Posts: 957
Default

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
Jarrod is offline  
Old 02-11-2006, 12:07 AM   #16 (permalink)
Newbie
 
warduke's Avatar
 
Join Date: Apr 2004
Age: 34
Posts: 77
Default Love the crits!

My sever is so PVP balanced that crits are one of the only ways players have a chance at killing each other. I love the CRITS!
warduke is offline  
Old 02-15-2006, 10:48 AM   #17 (permalink)
 
Join Date: May 2003
Posts: 303
Default

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?
Anvil is offline  
Old 02-18-2006, 04:27 PM   #18 (permalink)
Newbie
 
Join Date: Jan 2006
Location: Turkey
Age: 22
Posts: 35
Send a message via MSN to sailor
Default

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
sailor is offline  
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5