AI Scriptiing
IF
Exists([EVILCUTOFF])
HPPercent(Myself,15)
THEN
RESPONSE# 100
RunAwayFrom(LastAttackerOf(Myself))
END
The quaffs a potion string is not vital however it lets you know that he just used a potion.
I am sending you a zip file that has all the display string # 's in it in alpha betical order.
Exists([EVILCUTOFF])
HPPercent(Myself,15)
THEN
RESPONSE# 100
RunAwayFrom(LastAttackerOf(Myself))
END
The quaffs a potion string is not vital however it lets you know that he just used a potion.
I am sending you a zip file that has all the display string # 's in it in alpha betical order.
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
Heres my script will it work?
IF
HPPercentLT(Myself,50)//If my hit points
// are less than 50%
HasItem("Potn52",Myself)//And I have a Potion
// (of extra healing)
THEN
RESPONSE #100
UseItem("Potn52",Myself)//drink the potion
END
IF // if my hitpoints are less than
HPPercentLT(Myself,15)// 15%
THEN
RESPONSE #100 // Run away
RunAwayFrom(LastAttackerOf(Myself),150)
END
IF
See(Enemy)
THEN
RESPONSE #100
EquipMostDamagingMelee
THEN #20
OR(5)
Attack(NearestEnemyTo(Player 1))
Attack(NearestEnemyTo(Player 2))
Attack(NearestEnemyTo(Player 3))
Attack(NearestEnemyTo(Player 4))
Attack(NearestEnemyTo(Player 5))
Attack(NearestEnemyTo(Player 6))
END
And how do i post at bgscripts?
And, how do i nest?
[ 05-23-2001: Message edited by: craig ]
IF
HPPercentLT(Myself,50)//If my hit points
// are less than 50%
HasItem("Potn52",Myself)//And I have a Potion
// (of extra healing)
THEN
RESPONSE #100
UseItem("Potn52",Myself)//drink the potion
END
IF // if my hitpoints are less than
HPPercentLT(Myself,15)// 15%
THEN
RESPONSE #100 // Run away
RunAwayFrom(LastAttackerOf(Myself),150)
END
IF
See(Enemy)
THEN
RESPONSE #100
EquipMostDamagingMelee
THEN #20
OR(5)
Attack(NearestEnemyTo(Player 1))
Attack(NearestEnemyTo(Player 2))
Attack(NearestEnemyTo(Player 3))
Attack(NearestEnemyTo(Player 4))
Attack(NearestEnemyTo(Player 5))
Attack(NearestEnemyTo(Player 6))
END
And how do i post at bgscripts?
And, how do i nest?
[ 05-23-2001: Message edited by: craig ]
Change it to this and it will work: (i compiled it and checked.)
IF
HPPercentLT(Myself,50)//If my hit points
// are less than 50%
HasItem("Potn52",Myself)//And I have a Potion
// (of extra healing)
THEN
RESPONSE #100
UseItem("Potn52",Myself)//drink the potion
END
IF // if my hitpoints are less than
HPPercentLT(Myself,15)// 15%
Exists([EVILCUTOFF])
THEN
RESPONSE #100 // Run away
RunAwayFrom(LastAttackerOf(Myself),150)
END
IF
See(NearestEnemyOf(Myself))
THEN
RESPONSE #50
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Myself))
RESPONSE #25
Attack(NearestEnemyOf(Player1))
RESPONSE #25
Attack(NearestEnemyOf(Player2))
RESPONSE #25
Attack(NearestEnemyOf(Player3))
RESPONSE #25
Attack(NearestEnemyOf(Player4))
RESPONSE #25
Attack(NearestEnemyOf(Player5))
RESPONSE #25
Attack(NearestEnemyOf(Player6))
END
And how do i post at bgscripts?
Join the group and go to Post.
And, how do i nest?
Complex nesting isnt really possible with scripting. Its not like programming. For a good example of the level of nesting you can do look at Sarkyns Scripts in the file section of BG scripts.
Also I tried to send you the file of String reference numbers but It was returned to me because your mailbox could not store a file of that size (its 900kb). It is listed in the system files area of bgscripts under DIALOGTXT.ZIP.
IF
HPPercentLT(Myself,50)//If my hit points
// are less than 50%
HasItem("Potn52",Myself)//And I have a Potion
// (of extra healing)
THEN
RESPONSE #100
UseItem("Potn52",Myself)//drink the potion
END
IF // if my hitpoints are less than
HPPercentLT(Myself,15)// 15%
Exists([EVILCUTOFF])
THEN
RESPONSE #100 // Run away
RunAwayFrom(LastAttackerOf(Myself),150)
END
IF
See(NearestEnemyOf(Myself))
THEN
RESPONSE #50
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Myself))
RESPONSE #25
Attack(NearestEnemyOf(Player1))
RESPONSE #25
Attack(NearestEnemyOf(Player2))
RESPONSE #25
Attack(NearestEnemyOf(Player3))
RESPONSE #25
Attack(NearestEnemyOf(Player4))
RESPONSE #25
Attack(NearestEnemyOf(Player5))
RESPONSE #25
Attack(NearestEnemyOf(Player6))
END
And how do i post at bgscripts?
Join the group and go to Post.
And, how do i nest?
Complex nesting isnt really possible with scripting. Its not like programming. For a good example of the level of nesting you can do look at Sarkyns Scripts in the file section of BG scripts.
Also I tried to send you the file of String reference numbers but It was returned to me because your mailbox could not store a file of that size (its 900kb). It is listed in the system files area of bgscripts under DIALOGTXT.ZIP.
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
- velvetfreak
- Posts: 184
- Joined: Mon May 07, 2001 10:00 pm
- Location: Melbourne, Australia
- Contact:
I can't find the "Post" sign, could you make your own string?I think i know why you can't e-mail me i got !!!50!!! emails mostly from bgscripts(how do im stop this!!!
E.P(Edit Post)
No No i want it to ALWAYS get most damaging melee then do the 16.66666667(or what ever)for which one he protects
[ 05-24-2001: Message edited by: craig ]
E.P(Edit Post)
No No i want it to ALWAYS get most damaging melee then do the 16.66666667(or what ever)for which one he protects
[ 05-24-2001: Message edited by: craig ]
CRAIG ROFLMAO! Go to bgscripts then click on edit member preferences in the right corner and disable emails sent to you...*still laughing*...I like getting the emails you can learn alot from them... but thats me...*snickers* (they filled up your mailbox thats funny)
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
See([EVILCUTOFF])
THEN
RESPONSE #50
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Myself))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player1))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player2))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player3))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player4))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player5))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player6))
END
Try that. Also I will send you the Dialog zip file if you delete some of those *snicker* posts...
(they spammed craigs mailbox)
THEN
RESPONSE #50
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Myself))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player1))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player2))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player3))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player4))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player5))
RESPONSE #25
EquipMostDamagingMelee()
Attack(NearestEnemyOf(Player6))
END
Try that. Also I will send you the Dialog zip file if you delete some of those *snicker* posts...
(they spammed craigs mailbox)
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
- velvetfreak
- Posts: 184
- Joined: Mon May 07, 2001 10:00 pm
- Location: Melbourne, Australia
- Contact:
KR, how do the RESPONSE # numbers work? Is it random between the entries, with higher numbers given a better chance? I thought it must be a percentage given that the typical value is 100 but it seems that this is not so.
The stew thickens over at Yahoo groups. I'm not inclined to comment further until the dust settles, except to say that either backroom deals are being made or someone's making a lot of false claims.
The stew thickens over at Yahoo groups. I'm not inclined to comment further until the dust settles, except to say that either backroom deals are being made or someone's making a lot of false claims.
Check my profile for the Glaicas patch
The response numbers are indeed a percentage however, they can be used different ways.
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100 (occurs 10 % of the time)
Attack enemy 2
Response #100 (occurs 10 % of the time)
Attack enemy 2
Response #100
Attack enemy 1
This is the same as :
Response #80 (occurs 80% of the time)
Attack enemy 1
Response #20 (occurs 20 % of the time)
Attack enemy 2
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100
Attack enemy 1
Response #100 (occurs 10 % of the time)
Attack enemy 2
Response #100 (occurs 10 % of the time)
Attack enemy 2
Response #100
Attack enemy 1
This is the same as :
Response #80 (occurs 80% of the time)
Attack enemy 1
Response #20 (occurs 20 % of the time)
Attack enemy 2
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
It keeps on saing "invalid file name"
I tried to send it to you again and it got returned to me.
I will try again.
I tried to send it to you again and it got returned to me.
I will try again.
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
- velvetfreak
- Posts: 184
- Joined: Mon May 07, 2001 10:00 pm
- Location: Melbourne, Australia
- Contact:
OK, just to make sure I've got this right:
IF
Blah Blah
THEN
RESPONSE #80
Attack(whatever)
END
This would still result in an attack action every time the IF returned true, right? IOW if there are no other RESPONSEs to evaluate it will use the one it's got every time.
IF
Blah Blah
THEN
RESPONSE #80
Attack(whatever)
END
This would still result in an attack action every time the IF returned true, right? IOW if there are no other RESPONSEs to evaluate it will use the one it's got every time.
Check my profile for the Glaicas patch
@KensaiRyu : I have the following problem - I have made Shar-Teel as an NPC, however I wanted to make her more interesting - She wants the challenge with the strongest character in the group. Everything is ok to the some moment : She asks for the challenge. If we don't agree then she just waits for us and we can agree to challege her later. When we agree to fight her she attacks the strongest character as she is supposed to do, however she doesn't start the dialogue when she defeats my character or she is defeated. I have tried many things : SetInterrupt, ClearAllActions, StartDialogInterrupt and many more - nothing works. So my question what is wrong with this script (this is one of many versions) ? (this is her override script)
IF
Global("SharteelFight","GLOBAL",1)
HPPercentLT("Sharte1",50)
THEN
RESPONSE #100
DialogInterrupt(TRUE)
SetInterrupt(FALSE)
SetGlobal("SharteelFight","GLOBAL",2)
SetInterrupt(TRUE)
StartDialog("Sharte1",Player1)
END
IF
Global("SharteelFight","GLOBAL",1)
HPPercentLT(StrongestOf,50)
THEN
RESPONSE #100
SetGlobal("SharteelFight","GLOBAL",3)
Dialog(Player1)
END
IF
Global("SharteelFight","GLOBAL",1)
AttackedBy(StrongestOf,DEFAULT)
THEN
RESPONSE #100
AttackReevaluate(StrongestOf,30)
END
IF
AttackedBy([PC],DEFAULT)
THEN
RESPONSE #100
Enemy()
END
IF
Global("SharteelFight","GLOBAL",1)
HPPercentGT(Myself,74)
HPPercentGT(StrongestOf,49)
See(StrongestOf)
THEN
RESPONSE #100
ActionOverride(StrongestOf,Attack("Sharte1"))
AttackReevaluate(StrongestOf,30)
END
As the basis I used her original script from BG1, but it seems it doesn't work, then I used ppjon.bcs (Irenicus starts dialogue before he escapes from the spellhold after his HP is lower than 20), but it also doesn't work.
Thanks in advance.
IF
Global("SharteelFight","GLOBAL",1)
HPPercentLT("Sharte1",50)
THEN
RESPONSE #100
DialogInterrupt(TRUE)
SetInterrupt(FALSE)
SetGlobal("SharteelFight","GLOBAL",2)
SetInterrupt(TRUE)
StartDialog("Sharte1",Player1)
END
IF
Global("SharteelFight","GLOBAL",1)
HPPercentLT(StrongestOf,50)
THEN
RESPONSE #100
SetGlobal("SharteelFight","GLOBAL",3)
Dialog(Player1)
END
IF
Global("SharteelFight","GLOBAL",1)
AttackedBy(StrongestOf,DEFAULT)
THEN
RESPONSE #100
AttackReevaluate(StrongestOf,30)
END
IF
AttackedBy([PC],DEFAULT)
THEN
RESPONSE #100
Enemy()
END
IF
Global("SharteelFight","GLOBAL",1)
HPPercentGT(Myself,74)
HPPercentGT(StrongestOf,49)
See(StrongestOf)
THEN
RESPONSE #100
ActionOverride(StrongestOf,Attack("Sharte1"))
AttackReevaluate(StrongestOf,30)
END
As the basis I used her original script from BG1, but it seems it doesn't work, then I used ppjon.bcs (Irenicus starts dialogue before he escapes from the spellhold after his HP is lower than 20), but it also doesn't work.
Thanks in advance.
So sayeh
Wise Manveru Telcontar,
The Mighty Wizard from Eregion
The Eregion Wizards
Elen sila Lumenn' Omentielvo
Wise Manveru Telcontar,
The Mighty Wizard from Eregion
The Eregion Wizards
Elen sila Lumenn' Omentielvo
Can you send me a copy of the Npc and scripts, I will take a look at it.I need them to be able to do some testing.
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
_____________________________________________
OK, just to make sure I've got this right:
IF
Blah Blah
THEN
RESPONSE #80
Attack(whatever)
END
This would still result in an attack action every time the IF returned true, right? IOW if there are no other RESPONSEs to evaluate it will use the one it's got every time.
_____________________________________________
Velvetfreak correct.
Manveru im taking a look now...how about I just send you a fixed script when im done.
OK, just to make sure I've got this right:
IF
Blah Blah
THEN
RESPONSE #80
Attack(whatever)
END
This would still result in an attack action every time the IF returned true, right? IOW if there are no other RESPONSEs to evaluate it will use the one it's got every time.
_____________________________________________
Velvetfreak correct.
Manveru im taking a look now...how about I just send you a fixed script when im done.
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]