|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
|
i wanna do a power hour thing for my shard
when i use command [ph in game skill gains will be faster.. Code:
//here is gainrates 4 each skill
//for instance .15 would be a 15% chance to gain in the particular skill
SkillInfo.Table[0].GainFactor = .11;// Alchemy = 0,
SkillInfo.Table[1].GainFactor = .11;// Anatomy = 1,
SkillInfo.Table[2].GainFactor = .11;// AnimalLore = 2,
SkillInfo.Table[3].GainFactor = .11;// ItemID = 3,
SkillInfo.Table[4].GainFactor = .11;// ArmsLore = 4,
SkillInfo.Table[5].GainFactor = .11;// Parry = 5,
SkillInfo.Table[6].GainFactor = .11;// Begging = 6,
SkillInfo.Table[7].GainFactor = .11;// Blacksmith = 7,
SkillInfo.Table[8].GainFactor = .11;// Fletching = 8,
SkillInfo.Table[9].GainFactor = .11;// Peacemaking = 9,
SkillInfo.Table[10].GainFactor = .11;// Camping = 10,
SkillInfo.Table[11].GainFactor = .11;// Carpentry = 11,
SkillInfo.Table[12].GainFactor = .11;// Cartography = 12,
SkillInfo.Table[13].GainFactor = .11;// Cooking = 13,
SkillInfo.Table[14].GainFactor = .11;// DetectHidden = 14,
SkillInfo.Table[15].GainFactor = .11;// Discordance = 15,
SkillInfo.Table[16].GainFactor = .11;// EvalInt = 16,
SkillInfo.Table[17].GainFactor = .11;// Healing = 17,
SkillInfo.Table[18].GainFactor = .11;// Fishing = 18,
SkillInfo.Table[19].GainFactor = .11;// Forensics = 19,
SkillInfo.Table[20].GainFactor = .11;// Herding = 20,
SkillInfo.Table[21].GainFactor = .11;// Hiding = 21,
SkillInfo.Table[22].GainFactor = .11;// Provocation = 22,
SkillInfo.Table[23].GainFactor = .11;// Inscribe = 23,
SkillInfo.Table[24].GainFactor = .11;// Lockpicking = 24,
SkillInfo.Table[25].GainFactor = .11;// Magery = 25,
SkillInfo.Table[26].GainFactor = .11;// MagicResist = 26,
SkillInfo.Table[27].GainFactor = .11;// Tactics = 27,
SkillInfo.Table[28].GainFactor = .11;// Snooping = 28,
SkillInfo.Table[29].GainFactor = .11;// Musicianship = 29,
SkillInfo.Table[30].GainFactor = .11;// Poisoning = 30
SkillInfo.Table[31].GainFactor = .11;// Archery = 31
SkillInfo.Table[32].GainFactor = .11;// SpiritSpeak = 32
SkillInfo.Table[33].GainFactor = .11;// Stealing = 33
SkillInfo.Table[34].GainFactor = .11;// Tailoring = 34
SkillInfo.Table[35].GainFactor = .11;// AnimalTaming = 35
SkillInfo.Table[36].GainFactor = .11;// TasteID = 36
SkillInfo.Table[37].GainFactor = .11;// Tinkering = 37
SkillInfo.Table[38].GainFactor = .11;// Tracking = 38
SkillInfo.Table[39].GainFactor = .11;// Veterinary = 39
SkillInfo.Table[40].GainFactor = .11;// Swords = 40
SkillInfo.Table[41].GainFactor = .11;// Macing = 41
SkillInfo.Table[42].GainFactor = .11;// Fencing = 42
SkillInfo.Table[43].GainFactor = .11;// Wrestling = 43
SkillInfo.Table[44].GainFactor = .11;// Lumberjacking = 44
SkillInfo.Table[45].GainFactor = .11;// Mining = 45
SkillInfo.Table[46].GainFactor = .11;// Meditation = 46
SkillInfo.Table[47].GainFactor = .11;// Stealth = 47
SkillInfo.Table[48].GainFactor = .11;// RemoveTrap = 48
SkillInfo.Table[49].GainFactor = .11;// Necromancy = 49
SkillInfo.Table[50].GainFactor = .11;// Focus = 50
SkillInfo.Table[51].GainFactor = .11;// Chivalry = 51
|
|
|
|
|
|
#3 (permalink) |
|
Forum Master
|
you would have to define some place a global variable of "PowerHour" and have it be a bool
and your command to set that variable to true or not (could possibly make it in skillcheck itself, but might want to have other uses for it also, bonus experience gains, etc) then can do your list very easy: Code:
for ( int i = 0; i <= 51; ++i ) SkillInfo.Table[0].GainFactor = (bool ? PowerHour 0.16, 0.11); and to show how to do a simple compare to see which number to use but the method below does it for ALL skills you have set up to use based on your expansion: (ML, SE, AOS, etc) Code:
for ( int i = 0; i < PowerScroll.Skills.Length; ++i ) SkillInfo.Table[0].GainFactor = (bool ? PowerHour 0.16, 0.11);
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) Last edited by Lord_Greywolf; 08-25-2008 at 02:11 PM. |
|
|
|
|
|
#4 (permalink) |
|
Forum Novice
|
If the gainFactor is the same for all skills why don't modify it in CheckSkill method?
Code:
gc *= skill.Info.GainFactor; // Original code Code:
gc = ( PowerHour ? gc * .11 : gc * skill.Info.GainFactor ); |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|