Author Topic: Auto buff script  (Read 3017 times)

Offline who_is_daniel

  • Planewalker
  • *****
  • Posts: 58
Auto buff script
« on: January 22, 2006, 01:41:47 PM »
I love it!  It has really increased my enjoyment of the game, not having to spend 5 minutes pre-buffing my characters before every fight; also the artificial intelligence it gives to the characters during the game is great!  I use it on most of my characters in my group.

Thank you Westley Weimer!

Offline Azazello

  • The Anti-Spammer
  • Planewalker
  • *****
  • Posts: 405
  • Gender: Male
    • Azazello’s Music Profile at Last.fm
Post your PIMPED Auto-buff scripts !
« Reply #1 on: January 22, 2006, 08:15:00 PM »
Your post got me thinkin'. I've modified the scripts to (1) remove one or two cheatin' spellcasting, (2) re-organize the spells to "optimize" their durations {admittedly, I may not have the spell order in the best arrangement, thus I'm open to peeps recommendations}.

I'm sure others have modified their scripts. Would love to see how others are using theirs.

Here's my WW-BUFF1.BS:

Code: [Select]
// * MODIFIED - (Solo) Auto-buff script by Westley Weimer, from Solaufein mod
// * ----------------------------------------

IF
ActionListEmpty()
HaveSpell(WIZARD_ARMOR)
CheckStatGT(Myself,6,ARMORCLASS)
THEN
RESPONSE #100
Spell(Myself,WIZARD_ARMOR)
END

IF
ActionListEmpty()
HaveSpell(CLERIC_GOOD_BERRIES)
THEN
RESPONSE #100
Spell(Myself,CLERIC_GOOD_BERRIES)
END

IF
ActionListEmpty()
CheckStatLT(Myself,1,STONESKINS)
HaveSpell(WIZARD_STONE_SKIN)
CheckStatLT(Myself,5,SPELLFAILUREMAGE)
THEN
RESPONSE #100
Spell(Myself,WIZARD_STONE_SKIN)
END

IF
ActionListEmpty()
CheckStatLT(Myself,1,STONESKINS)
HaveSpell(CLERIC_IRONSKIN)
CheckStatLT(Myself,5,SPELLFAILUREPRIEST)
THEN
RESPONSE #100
Spell(Myself,CLERIC_IRONSKIN)
END

IF
CombatCounter(0)
ActionListEmpty()
Class(Myself,THIEF_ALL)
CheckStatGT(Myself,10,TRAPS)
!ModalState(DETECTTRAPS)
// !StateCheck(Myself,STATE_INVISIBLE)
THEN
RESPONSE #100
FindTraps()
END

IF
ActionListEmpty()
CombatCounter(0)
!Detect([EVILCUTOFF])
!See(NearestEnemyOf(Myself))
!HotKey(S)
!HotKey(F)
!HotKey(N)
!HotKey(D)
THEN
RESPONSE #100
NoAction()
END

IF
CombatCounter(0)
See(NearestEnemyOf(Myself))
!InParty(LastSeenBy(Myself))
!Allegiance(LastSeenBy(Myself),GOODCUTOFF)
THEN
RESPONSE #100
StartCombatCounter()
Continue()
END

IF
ActionListEmpty()
HasItem("POTN55",Myself) // Potion of Superior Healing
HPPercentLT(Myself,50)
THEN
RESPONSE #100
UseItem("POTN55",Myself) // Potion of Superior Healing
Continue()
END

IF
ActionListEmpty()
HasItem("POTN52",Myself) // Potion of Extra Healing
HPPercentLT(Myself,70)
THEN
RESPONSE #100
UseItem("POTN52",Myself) // Potion of Extra Healing
Continue()
END

IF
ActionListEmpty()
HasItem("POTN08",Myself) // Potion of Healing
HPPercentLT(Myself,90)
THEN
RESPONSE #100
UseItem("POTN08",Myself) // Potion of Healing
Continue()
END

IF
OR(2)
ActionListEmpty()
ModalState(DETECTTRAPS)
!Allegiance(NearestEnemyOf(Myself),GOODCUTOFF)
OR(4)
See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
See(NearestEnemyOfType([0.0.0.BARD_ALL]))
THEN
RESPONSE #100
AttackReevaluate(LastSeenBy(Myself),30)
END

IF
See(NearestEnemyOf(Myself))
OR(2)
ActionListEmpty()
ModalState(DETECTTRAPS)
!Allegiance(LastSeenBy(Myself),GOODCUTOFF)
THEN
RESPONSE #100
AttackReevaluate(NearestEnemyOf(Myself),30)
END

IF
ActionListEmpty()
HasItem("GBERRY7",Myself) // Good Berry
HPPercentLT(Myself,80)
THEN
RESPONSE #100
UseItem("GBERRY7",Myself) // Good Berry
Continue()
END

IF
ActionListEmpty()
HasItem("GBERRY6",Myself) // Good Berry
HPPercentLT(Myself,90)
THEN
RESPONSE #100
UseItem("GBERRY6",Myself) // Good Berry
Continue()
END

IF
ActionListEmpty()
HasItem("GBERRY5",Myself) // Good Berry
HPPercentLT(Myself,95)
THEN
RESPONSE #100
UseItem("GBERRY5",Myself) // Good Berry
Continue()
END

IF
ActionListEmpty()
HasItem("GBERRY4",Myself) // Good Berry
HPPercentLT(Myself,96)
THEN
RESPONSE #100
UseItem("GBERRY4",Myself) // Good Berry
Continue()
END

IF
ActionListEmpty()
HasItem("GBERRY3",Myself) // Good Berry
HPPercentLT(Myself,97)
THEN
RESPONSE #100
UseItem("GBERRY3",Myself) // Good Berry
Continue()
END

IF
ActionListEmpty()
HasItem("GBERRY2",Myself) // Good Berry
HPPercentLT(Myself,98)
THEN
RESPONSE #100
UseItem("GBERRY2",Myself) // Good Berry
Continue()
END

IF
ActionListEmpty()
HasItem("GBERRY",Myself) // Good Berry
HPPercentLT(Myself,99)
THEN
RESPONSE #100
UseItem("GBERRY",Myself) // Good Berry
Continue()
END

IF
ActionListEmpty()
HasItem("POTN17",Myself) // Elixir of Health
HPPercentLT(Myself,70)
THEN
RESPONSE #100
UseItem("POTN17",Myself) // Elixir of Health
Continue()
END

IF
!See(NearestEnemyOf(Myself))
!CombatCounter(0)
ActionListEmpty()
THEN
RESPONSE #100
MoveToObject(Myself)
END

IF
OR(3)
HotKey(S)
HotKey(F)
HotKey(D)
THEN
RESPONSE #100
ForceSpellRES("WESALAC",Myself) // Auto-Buff
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_STRENGTH)
CheckStatLT(Myself,50,STREXTRA)
CheckStatLT(Myself,19,STR)
THEN
RESPONSE #100
Spell(Myself,WIZARD_STRENGTH)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_STRENGTH)
CheckStatLT(Myself,100,STREXTRA)
CheckStatLT(Myself,19,STR)
THEN
RESPONSE #100
Spell(Myself,WIZARD_STRENGTH)
Continue()
END

IF
HotKey(S)
HaveSpell(CLERIC_REMOVE_FEAR)
THEN
RESPONSE #100
Spell(Myself,CLERIC_REMOVE_FEAR)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_RESIST_FEAR)
THEN
RESPONSE #100
Spell(Myself,WIZARD_RESIST_FEAR)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_PROTECTION_FROM_COLD)
THEN
RESPONSE #100
Spell(Myself,WIZARD_PROTECTION_FROM_COLD)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_PROTECTION_FROM_ELECTRICITY)
THEN
RESPONSE #100
Spell(Myself,WIZARD_PROTECTION_FROM_ELECTRICITY)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_PROTECTION_FROM_ACID)
THEN
RESPONSE #100
Spell(Myself,WIZARD_PROTECTION_FROM_ACID)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_PROTECTION_FROM_MAGIC_ENERGY)
THEN
RESPONSE #100
Spell(Myself,WIZARD_PROTECTION_FROM_MAGIC_ENERGY)
Continue()
END

IF
HotKey(S)
HaveSpell(CLERIC_PROTECTION_FROM_EVIL_10_FOOT)
THEN
RESPONSE #100
Spell(Myself,CLERIC_PROTECTION_FROM_EVIL_10_FOOT)
Continue()
END

IF
HotKey(S)
HaveSpell(CLERIC_DEATH_WARD)
THEN
RESPONSE #100
Spell(Myself,CLERIC_DEATH_WARD)
Continue()
END

IF
HotKey(S)
HaveSpell(CLERIC_CHAOTIC_COMMANDS)
THEN
RESPONSE #100
Spell(Myself,CLERIC_CHAOTIC_COMMANDS)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_GHOST_ARMOR)
THEN
RESPONSE #100
Spell(Myself,WIZARD_GHOST_ARMOR)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_SPIRIT_ARMOR)
THEN
RESPONSE #100
Spell(Myself,WIZARD_SPIRIT_ARMOR)
Continue()
END

IF
HotKey(S)
HaveSpell(WIZARD_SHIELD)
THEN
RESPONSE #100
Spell(Myself,WIZARD_SHIELD)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_PROTECTION_FROM_LIGHTNING)
THEN
RESPONSE #100
Spell(Myself,CLERIC_PROTECTION_FROM_LIGHTNING)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_BARKSKIN)
THEN
RESPONSE #100
Spell(Myself,CLERIC_BARKSKIN)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_MIRROR_IMAGE)
THEN
RESPONSE #100
Spell(Myself,WIZARD_MIRROR_IMAGE)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_ARMOR_OF_FAITH)
THEN
RESPONSE #100
Spell(Myself,CLERIC_ARMOR_OF_FAITH)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_PROTECTION_FROM_FIRE)
THEN
RESPONSE #100
Spell(Myself,CLERIC_PROTECTION_FROM_FIRE)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_PROTECTION_FROM_FIRE)
THEN
RESPONSE #100
Spell(Myself,WIZARD_PROTECTION_FROM_FIRE)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_FIRE_SHIELD_BLUE)
THEN
RESPONSE #100
Spell(Myself,WIZARD_FIRE_SHIELD_BLUE)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_FIRE_SHIELD_RED)
THEN
RESPONSE #100
Spell(Myself,WIZARD_FIRE_SHIELD_RED)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_HASTE)
THEN
RESPONSE #100
Spell(Myself,WIZARD_HASTE)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_IMPROVED_HASTE)
THEN
RESPONSE #100
Spell(Myself,WIZARD_IMPROVED_HASTE)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_BLUR)
THEN
RESPONSE #100
Spell(Myself,WIZARD_BLUR)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_AID)
THEN
RESPONSE #100
Spell(Myself,CLERIC_AID)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_RESIST_FIRE)
THEN
RESPONSE #100
Spell(Myself,CLERIC_RESIST_FIRE)
Continue()
END

IF
HotKey(F)
OR(2)
HaveSpell(WIZARD_PROTECTION_FROM_EVIL)
HaveSpell(CLERIC_PROTECT_FROM_EVIL)
THEN
RESPONSE #100
Spell(Myself,WIZARD_PROTECTION_FROM_EVIL)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_DRAW_UPON_HOLY_MIGHT)
THEN
RESPONSE #100
Spell(Myself,CLERIC_DRAW_UPON_HOLY_MIGHT)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_MINOR_SPELL_DEFLECTION)
THEN
RESPONSE #100
Spell(Myself,WIZARD_MINOR_SPELL_DEFLECTION)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_MINOR_SPELL_TURNING)
THEN
RESPONSE #100
Spell(Myself,WIZARD_MINOR_SPELL_TURNING)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_SPELL_SHIELD)
THEN
RESPONSE #100
Spell(Myself,WIZARD_SPELL_SHIELD)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_SPELL_DEFLECTION)
THEN
RESPONSE #100
Spell(Myself,WIZARD_SPELL_DEFLECTION)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_SPELL_TURNING)
THEN
RESPONSE #100
Spell(Myself,WIZARD_SPELL_TURNING)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_SHIELD_OF_THE_ARCHONS)
THEN
RESPONSE #100
Spell(Myself,CLERIC_SHIELD_OF_THE_ARCHONS)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_SPELL_TRAP)
THEN
RESPONSE #100
Spell(Myself,WIZARD_SPELL_TRAP)
Continue()
END

IF
HotKey(F)
HaveSpell(3103)
THEN
RESPONSE #100
Spell(Myself,3103)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_DEFENSIVE_HARMONY)
THEN
RESPONSE #100
Spell(Myself,CLERIC_DEFENSIVE_HARMONY)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_BLESS)
THEN
RESPONSE #100
Spell(Myself,CLERIC_BLESS)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_NEGATIVE_PLANE_PROTECTION)
THEN
RESPONSE #100
Spell(Myself,CLERIC_NEGATIVE_PLANE_PROTECTION)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_REGENERATE)
THEN
RESPONSE #100
Spell(Myself,CLERIC_REGENERATE)
Continue()
END

IF
HotKey(F)
THEN
RESPONSE #100
Spell(Myself,4721)
Continue()
END

IF
HotKey(F)
HaveSpell(CLERIC_CHANT)
THEN
RESPONSE #100
Spell(Myself,CLERIC_CHANT)
Continue()
END

IF
HotKey(F)
HaveSpell(WIZARD_IMPROVED_INVISIBILITY)
THEN
RESPONSE #100
Spell(Myself,WIZARD_IMPROVED_INVISIBILITY)
Continue()
END

IF
HotKey(N)
HaveSpell(WIZARD_MELF_METEOR)
THEN
RESPONSE #100
Spell(Myself,WIZARD_MELF_METEOR)
END

IF
HotKey(D)
HaveSpell(CLERIC_FREE_ACTION)
THEN
RESPONSE #100
Spell(Myself,CLERIC_FREE_ACTION)
Continue()
END
« Last Edit: July 16, 2007, 11:20:02 PM by Azazello »
Community Contributions
Level 1 NPCs * gMinion: expanded TP2 for MegaInstalls * PSM (PSQM): expanded scripts for Melanthium * non-detectable Cloak of Non-Detection ?? * Weimer's-Tactics: revised TP2 for MegaInstalls
========================================
"Deception has many faces. Truth...has only one."

Offline who_is_daniel

  • Planewalker
  • *****
  • Posts: 58
Re: Auto buff script
« Reply #2 on: January 23, 2006, 10:50:20 PM »
Whats diffrent from that the original and yours?  (I dont know anything about scripting)

Offline Azazello

  • The Anti-Spammer
  • Planewalker
  • *****
  • Posts: 405
  • Gender: Male
    • Azazello’s Music Profile at Last.fm
Re: Auto buff script
« Reply #3 on: January 23, 2006, 11:30:00 PM »
- Added ARMOR spell that wizard will automatically cast when the older one wears off
- Added more healing potions to drink, using different damage percentages (added Tutu names for some potions)
- Re-arranged spell buffs

This isn't really modding. Just modified the script in Near Infinity. Anyone can do it, even youse!!
Community Contributions
Level 1 NPCs * gMinion: expanded TP2 for MegaInstalls * PSM (PSQM): expanded scripts for Melanthium * non-detectable Cloak of Non-Detection ?? * Weimer's-Tactics: revised TP2 for MegaInstalls
========================================
"Deception has many faces. Truth...has only one."

Offline who_is_daniel

  • Planewalker
  • *****
  • Posts: 58
Re: Auto buff script
« Reply #4 on: February 07, 2006, 04:05:54 PM »
May I have a copy of your script?

Offline Azazello

  • The Anti-Spammer
  • Planewalker
  • *****
  • Posts: 405
  • Gender: Male
    • Azazello’s Music Profile at Last.fm
Re: Auto buff script
« Reply #5 on: February 08, 2006, 12:23:24 AM »
-- Look for WW-BUFF1.BS in your Scripts directory; make a copy and save it somewhere.
-- Open up Near Infinity, click on WW-BUFF1.BS, copy the text above into it - be sure to overwrite all the existing text
-- save file, close NI. Viola!



Community Contributions
Level 1 NPCs * gMinion: expanded TP2 for MegaInstalls * PSM (PSQM): expanded scripts for Melanthium * non-detectable Cloak of Non-Detection ?? * Weimer's-Tactics: revised TP2 for MegaInstalls
========================================
"Deception has many faces. Truth...has only one."

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: