Author Topic: Random Buff Script for Shiek2005  (Read 311 times)

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Random Buff Script for Shiek2005
« on: August 11, 2011, 03:00:54 am »


               #include "x0_i0_stringlib"
const int nMinDelay = 30;
 string sSpellArray =           "380,"+  /*   Battle_Mastery_Spell  */
                                "381,"+  /*   Divine_Strength  */
                                "382,"+  /*   Divine_Protection  */
                                "383,"+  /*   Negative_Plane_Avatar  */
                                "384,"+  /*   Divine_Trickery  */
                                "385,"+  /*   Rogues_Cunning  */
                                "622,"+  /*   DC_Divine_Wrath  */
                                "639,"+  /*   Epic_Mage_Armor  */
                                "554,"+  /*   Ioun_Stone_Dusty_Rose  */
                                "555,"+  /*   Ioun_Stone_Pale_Blue  */
                                "556,"+  /*   Ioun_Stone_Scarlet_Blue  */
                                "557,"+  /*   Ioun_Stone_Blue  */
                                "558,"+  /*   Ioun_Stone_Deep_Red  */
                                "559,"+  /*   Ioun_Stone_Pink  */
                                "560,"+  /*   Ioun_Stone_Pink_Green  */
                                "695,"+  /*   Epic_Warding  */
                                "741,"+  /*   Psionic_Inertial_Barrier  */
                                "774,"+  /*   Deflecting_Force  */
                                "412,"+  /*   Aura_Fear_Dragon  */
                                "561,"+  /*   Whirlwind  */
                                "641,"+  /*   DWDEF_Defensive_Stance  */
                                "642,"+  /*   Mighty_Rage  */
                                "645,"+  /*   Improved_Whirlwind  */
                                "411,"+  /*   Bards_Song  */
                                "644,"+  /*   Curse_Song  */
                                "562,"+  /*   AuraOfGlory_X2  */
                                "647,"+  /*   Epic_Blinding_speed  */
                                "799,"+  /*   Vampire_Invisibility  */
                                "637,"+  /*   Mummy_Dust  */
                                "638,"+  /*   Dragon_Knight  */
                                "42,"+  /*   Divine_Power  */
                                "121,"+  /*   Ethereal_Visage  */
                                "184,"+  /*   Tensers_Transformation  */
                                "456,"+  /*   Expeditious_Retreat  */
                                "477,"+  /*   SHADOW_EVADE  */
                                "22,"+  /*   Cloak_of_Chaos  */
                                "84,"+  /*   Holy_Aura  */
                                "187,"+  /*   Unholy_Aura  */
                                "47,"+  /*   Elemental_Shield  */
                                "65,"+  /*   Globe_of_Invulnerability  */
                                "73,"+  /*   Greater_Spell_Mantle  */
                                "74,"+  /*   Greater_Stoneskin  */
                                "99,"+  /*   Lesser_Spell_Mantle  */
                                "119,"+  /*   Minor_Globe_of_Invulnerability  */
                                "120,"+  /*   Ghostly_Visage  */
                                "134,"+  /*   Premonition  */
                                "160,"+  /*   Shadow_Shield  */
                                "169,"+  /*   Spell_Mantle  */
                                "369,"+  /*   Energy_Buffer  */
                                "441,"+  /*   Wounding_Whispers  */
                                "519,"+  /*   Death_Armor  */
                                "524,"+  /*   Mestils_Acid_Sheath  */
                                "605,"+  /*   ASGhostlyVisage  */
                                "417,"+  /*   Shield  */
                                "418,"+  /*   Entropic_Shield  */
                                "452,"+  /*   Magic_Fang  */
                                "453,"+  /*   Greater_Magic_Fang  */
                                "48,"+  /*   Elemental_Swarm  */
                                "195,"+  /*   AURA_BLINDING  */
                                "196,"+  /*   Aura_Cold  */
                                "197,"+  /*   Aura_Electricity  */
                                "198,"+  /*   Aura_Fear  */
                                "199,"+  /*   Aura_Fire  */
                                "200,"+  /*   Aura_Menace  */
                                "201,"+  /*   Aura_Protection  */
                                "202,"+  /*   Aura_Stun  */
                                "203,"+  /*   Aura_Unearthly_Visage  */
                                "204,"+  /*   Aura_Unnatural  */
                                "307,"+  /*   BARBARIAN_RAGE  */
                                "804,"+  /*   Aura_HorrificAppearance  */
                                "311,"+  /*   Empty_Body  */
                                "414,"+  /*   Divine_Favor  */
                                "415,"+  /*   True_Strike  */
                                "429,"+  /*   AuraOfGlory  */
                                "478,"+  /*   TYMORAS_SMILE  */
                                "365,"+  /*   Ultravision  */
                                "525,"+  /*   Monstrous_Regeneration  */
                                "535,"+  /*   Blade_Thirst  */
                                "536,"+  /*   Deafening_Clang  */
                                "537,"+  /*   Bless_Weapon  */
                                "538,"+  /*   Holy_Sword  */
                                "539,"+  /*   Keen_Edge  */
                                "541,"+  /*   Blackstaff  */
                                "542,"+  /*   Flame_Weapon  */
                                "544,"+  /*   Magic_Weapon  */
                                "545,"+  /*   Greater_Magic_Weapon  */
                                "546,"+  /*   Magic_Vestment  */
                                "548,"+  /*   Darkfire  */
                                "85,"+  /*   Holy_Sword  */
                                "7,"+  /*   Bless_Weapon  */
                                "68,"+  /*   Greater_Magic_Weapon  */
                                "108,"+  /*   Magic_Vestment  */
                                "109,"+  /*   Magic_Weapon  */
                                "353,"+  /*   GR_SHADOW_CON_Minor_Globe  */
                                "351,"+  /*   GR_SHADOW_CON_Ghostly_Visage  */
                                "247,"+  /*   Ferocity_1  */
                                "248,"+  /*   Ferocity_2  */
                                "249,"+  /*   Ferocity_3  */
                                "273,"+  /*   Intensity_1  */
                                "274,"+  /*   Intensity_2  */
                                "275,"+  /*   Intensity_3  */
                                "299,"+  /*   Rage_3  */
                                "300,"+  /*   Rage_4  */
                                "301,"+  /*   Rage_5  */
                                "374,"+  /*   Regenerate  */
                                "125,"+  /*   Negative_Energy_Protection  */
                                "3,"+  /*   Barkskin  */
                                "50,"+  /*   Endure_Elements  */
                                "102,"+  /*   Mage_Armor  */
                                "137,"+  /*   Protection_from_Elements  */
                                "150,"+  /*   Resist_Elements  */
                                "168,"+  /*   Spell_Resistance  */
                                "172,"+  /*   Stoneskin  */
                                "450,"+  /*   Shield_of_Faith  */
                                "527,"+  /*   Stone_Bones  */
                                "342,"+  /*   SHADES_Stoneskin  */
                                "347,"+  /*   SHADOW_CON_Mage_Armor  */
                                "138,"+  /*   Protection_from_Evil  */
                                "139,"+  /*   Protection_from_Good  */
                                "186,"+  /*   True_Seeing  */
                                "103,"+  /*   Magic_Circle_against_Chaos  */
                                "104,"+  /*   Magic_Circle_against_Evil  */
                                "105,"+  /*   Magic_Circle_against_Good  */
                                "106,"+  /*   Magic_Circle_against_Law  */
                                "1,"+  /*   Aid  */
                                "9,"+  /*   Bulls_Strength  */
                                "13,"+  /*   Cats_Grace  */
                                "38,"+  /*   Death_Ward  */
                                "49,"+  /*   Endurance  */
                                "78,"+  /*   Haste  */
                                "88,"+  /*   Improved_Invisibility  */
                                "90,"+  /*   Invisibility  */
                                "95,"+  /*   Lesser_Mind_Blank  */
                                "151,"+  /*   Resistance  */
                                "154,"+  /*   Sanctuary  */
                                "189,"+  /*   Virtue  */
                                "354,"+  /*   Eagle_Splendor  */
                                "355,"+  /*   Owls_Wisdom  */
                                "356,"+  /*   Foxs_Cunning  */
                                "357,"+  /*   Greater_Eagle_Splendor  */
                                "358,"+  /*   Greater_Owls_Wisdom  */
                                "359,"+  /*   Greater_Foxs_Cunning  */
                                "360,"+  /*   Greater_Bulls_Strength  */
                                "361,"+  /*   Greater_Cats_Grace  */
                                "362,"+  /*   Greater_Endurance  */
                                "438,"+  /*   Owls_Insight  */
                                "458,"+  /*   Displacement  */
                                "481,"+  /*   Cats_Grace  */
                                "482,"+  /*   Eagle_Splendor  */
                                "483,"+  /*   Invisibility  */
                                "486,"+  /*   Stone_to_flesh  */
                                "522,"+  /*   Ironguts  */
                                "563,"+  /*   Haste_Slow_X2  */
                                "607,"+  /*   ASInvisibility  */
                                "608,"+  /*   ASImprovedInvisibility  */
                                "614,"+  /*   BK_BullsStrength  */
                                "346,"+  /*   SHADOW_CON_Inivsibility  */
                                "2,"+  /*   Animate_Dead  */
                                "29,"+  /*   Create_Greater_Undead  */
                                "30,"+  /*   Create_Undead  */
                                "63,"+  /*   Gate  */
                                "123,"+  /*   Mordenkainens_Sword  */
                                "174,"+  /*   Summon_Creature_I  */
                                "175,"+  /*   Summon_Creature_II  */
                                "176,"+  /*   Summon_Creature_III  */
                                "177,"+  /*   Summon_Creature_IV  */
                                "178,"+  /*   Summon_Creature_IX  */
              
               
               

               


                     Modifié par Lightfoot8, 11 août 2011 - 02:10 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Random Buff Script for Shiek2005
« Reply #1 on: August 11, 2011, 03:09:45 am »


                                               "179,"+  /*   Summon_Creature_V  */
                                "180,"+  /*   Summon_Creature_VI  */
                                "181,"+  /*   Summon_Creature_VII  */
                                "182,"+  /*   Summon_Creature_VIII  */
                                "303,"+  /*   Summon_Slaad  */
                                "304,"+  /*   Summon_Tanarri  */
                                "378,"+  /*   Summon_Mephit  */
                                "379,"+  /*   Summon_Celestial  */
                                "533,"+  /*   Black_Blade_of_Disaster  */
                                "534,"+  /*   Shelgarns_Persistent_Blade  */
                                "564,"+  /*   Summon_Shadow_X2  */
                                "609,"+  /*   BGCreateDead  */
                                "623,"+  /*   PM_Animate_Dead  */
                                "624,"+  /*   PM_Summon_Undead  */
                                "627,"+  /*   PM_Summon_Greater_Undead  */
                                "701,"+  /*   Summon_Baatezu  */
                                "170,"+  /*   Sphere_of_Chaos  */
                                "69,"+  /*   Greater_Planar_Binding  */
                                "96,"+  /*   Lesser_Planar_Binding  */
                                "128,"+  /*   Planar_Binding  */
                                "451,"+  /*   Planar_Ally  */
                                "141,"+  /*   Protection_from_Spells  */
                                "532,"+  /*   Vine_Mine_Camouflage  */
                                "113,"+  /*   Mass_Haste  */
                                "133,"+  /*   Prayer  */
                                "372,"+  /*   Aura_of_Vitality  */
                                "6,"+  /*   Bless  */
                                "117,"+  /*   Mind_Blank  */
                                "444,"+  /*   Undeaths_Eternal_Foe  */
                                "449,"+  /*   Bane  */
                                "455,"+  /*   Mass_Camoflage  */
                                "62";  /*   Freedom_of_Movement  */
 

void main()
{
  object oPC = GetLastUsedBy();

  int iMinPerHour = FloatToInt(HoursToSeconds(1)/60);
  int nTStamp =    GetTimeHour()
                 + (GetCalendarDay()-1) * 24
                 + (GetCalendarMonth()-1) * 672
                 +  GetCalendarYear() * 8064;
      nTStamp = nTStamp* iMinPerHour +  GetTimeMinute();

   if ( GetLocalInt(oPC,"tStamp") > nTStamp ) return;

   SetLocalInt(oPC,"tStamp", nTStamp + nMinDelay);
  
   int nRndSpell = Random(GetNumberTokens(sSpellArray, ","));
   nRndSpell = StringToInt(GetTokenByPosition(sSpellArray, ",", nRndSpell));

   string  sCastType = Get2DAString("spells","TargetType",nRndSpell);
   //SpeakString(" Random buff is " + Get2DAString("spells","Label",nRndSpell));

   AssignCommand(oPC,ClearAllActions(TRUE));

   if ( sCastType == "0x2C" ||sCastType == "0x2E" ) // cast at the ground
        AssignCommand(oPC, ActionCastSpellAtLocation(nRndSpell,
                                                    GetLocation(oPC),
                                                    METAMAGIC_ANY,
                                                    TRUE,
                                                    PROJECTILE_PATH_TYPE_DEFAULT,
                                                    TRUE));

   else // cast on the PC or self.
      AssignCommand(oPC, ActionCastSpellAtObject(nRndSpell,
                                                  oPC,
                                                  METAMAGIC_ANY,
                                                  TRUE,
                                                  0,
                                                  PROJECTILE_PATH_TYPE_DEFAULT,
                                                  TRUE));
}
               
               

               


                     Modifié par Lightfoot8, 11 août 2011 - 02:11 .
                     
                  


            

Legacy_Shiek2005

  • Full Member
  • ***
  • Posts: 179
  • Karma: +0/-0
Random Buff Script for Shiek2005
« Reply #2 on: August 11, 2011, 04:54:13 am »


               Cheers mate, much appreciated '<img'>