Just wondering if this script will work
#1
Posted 17 December 2004 - 10:57 AM
InParty(Myself)
CurrentXP("3960000")
!HasItem("khosy")
THEN
RESPONSE #100
CreateItem("khosy")
END
Will this work in order to give my NPC, Kido, at 28th level (he is a Jester) his own special holy symbol? Or do I need to change something? It needs to get his own symbol like a Cleric does even though he is not a Cleric.
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#2
Posted 17 December 2004 - 11:30 AM
Yikari, monk NPC
Shed's Mods - Three time TeamBG Contest winner!
The Jerry Zinger Show
ShedPlant.net
#3
Posted 17 December 2004 - 11:54 AM
IF XPGT(Myself,3960000) Global("Globalname","LOCALS",0) THEN RESPONSE #100 CreateItem("khosy") SetGlobal("Globalname","LOCALS",1) END
That should work. I dumped the InParty trigger since I don't think it's really necessary, and I swapped out the hasitem trigger for a local variable to prevent the block from repeating itself.
#4
Posted 18 December 2004 - 08:57 AM
XPGT(O:Object*,I:XP) should work better, and I'd put in a little local variable to keep the script from triggering more than once. The way it is now, it'll trigger multiple times if the NPC loses the item at any point. Try this:
IF XPGT(Myself,3960000) Global("Globalname","LOCALS",0) THEN RESPONSE #100 CreateItem("khosy") SetGlobal("Globalname","LOCALS",1) END
That should work. I dumped the InParty trigger since I don't think it's really necessary, and I swapped out the hasitem trigger for a local variable to prevent the block from repeating itself.
I wonder if this totally gives me what I really want. I put it below the script as a side note, but apparently not clear enough. I want my NPC to get the item if he levels to level 28. The xp needed for this is 3960000.
Is it perhaps possible to do this:
IF LevelGT(Myself,27) Global("Globalname","LOCALS",0) THEN RESPONSE #100 CreateItem("khosy") SetGlobal("Globalname","LOCALS",1) END
I doubt it cause I never saw 'LevelGT' before as a variable, but you kind of get the idea I hope
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#5
Posted 18 December 2004 - 09:38 AM
Level(O:Object*,I:Level*)
The only problem with that is that if the NPC gets more than one level at a time (like if you leave your group killing that Fire Giant spawn in Saradush) it might not trigger. LevelGT is probably the best to use.
#6
Posted 08 January 2005 - 08:21 AM
IF LevelGT(Myself,27) Global("gotkhosy","LOCALS",0) THEN RESPONSE #100 CreateItem("khosy") SetGlobal("gotkhosy","LOCALS",1) END
This is now the code and the only thing that goes wrong
Compiling 1 script ...
[Kido/scripts/getkhosy.baf] PARSE ERROR at line 6 column 19-19
Near Text: )
Not enough arguments to [CreateItem]. Recovering.
Extending game scripts ...
Extending game scripts ...
Copying 1 file ...
Copying 1 file ...
Copying 1 file ...
Copying and patching 1 file ...
Copying and patching 1 file ...
Copying and patching 1 file ...
Copying and patching 1 file ...
Appending game text ...
Appending game text ...
Appending game text ...
Appending game text ...
SUCCESSFULLY INSTALLED [Kido the Jester (Requires Throne of Bhaal)]
Press ENTER to exit.
Does it need to become something like this:
IF LevelGT(Myself,27) Global("gotkhosy","LOCALS",0) THEN RESPONSE #100 CreateItemOn("DKido","khosy") SetGlobal("gotkhosy","LOCALS",1) END
DKido being the deathvariable
Edited by Deathsangel, 08 January 2005 - 08:24 AM.
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#7
Posted 08 January 2005 - 08:24 AM
CreateItem(S:ResRef*,I:Usage1*,I:Usage2*,I:Usage3*)
I.e. CreateItem("khosy",0,0,0)
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#8
Posted 08 January 2005 - 09:58 AM
I am looking at the item page of IESDP, but I do not see it there
Edited by Deathsangel, 08 January 2005 - 10:03 AM.
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#9
Posted 08 January 2005 - 10:01 AM
So, if you'd want to create 40 arrows, you'd script: CreateItem("arow01",40,0,0).
http://iesdp.gibberlings3.net
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#10
Posted 08 January 2005 - 10:07 AM
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#11
Posted 08 January 2005 - 10:25 AM
IF LevelGT(Myself,27) Global("gotkhosy","LOCALS",0) THEN RESPONSE #100 CreateItem("khosy",1,0,0) SetGlobal("gotkhosy","LOCALS",1) END
Current code. Installation goes great, but if I let Kido go over level 28 he doesn't get his item. This is the piece of the .tp2 that has this script in it to be installed.
COMPILE ~Kido/d/KidoJ25.d~ COMPILE ~Kido/scripts/kido.baf~ COMPILE ~Kido/scripts/getkhosy.baf~ EXTEND_BOTTOM ~Ar0510.bcs~ ~Kido/scripts/Ar0510.baf~ EXTEND_TOP ~Ar6200.bcs~ ~Kido/scripts/Kidobio.baf~ COPY ~Kido\audio~ ~override~
My first idea was to put ~override~ behinde kido.baf & getkhosy.baf as that might make them work, but that goes horribly wrong with 4 mistakes in the installation. If I can see it right problems with stores. I can't post it as it to high up, before it dissappers of the screen and you can't stop the install and you can't scroll now can you?
What is wrong with the script or the installation by the .tp2
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#12
Posted 08 January 2005 - 10:42 AM
EXTEND_BOTTOM ~Ar0510.bcs~ ~Kido/scripts/Ar0510.baf~
Does it work if you use EXTEND_TOP instead?
#13
Posted 08 January 2005 - 10:55 AM
I'm talking about getkhosy.baf
Just looked and I can CLUA the item and it works then, but that is it.
I also leveled up Viconia, but I saw that you then get a sentence in which it is said you get a holy symbol + you see a visual effect. Can anyone tell me the name of the file in which this is scripted. Cause it is actaully what I really want for Kido, even though he is a Jester.
Edited by Deathsangel, 08 January 2005 - 11:05 AM.
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#14
Posted 08 January 2005 - 11:31 AM
That is another script, which has nothing to do with the item. And that script(Ar0510.baf) is his spawnscript, so to speak, and that most certainly works
I'm talking about getkhosy.baf
Just looked and I can CLUA the item and it works then, but that is it.
I also leveled up Viconia, but I saw that you then get a sentence in which it is said you get a holy symbol + you see a visual effect. Can anyone tell me the name of the file in which this is scripted. Cause it is actaully what I really want for Kido, even though he is a Jester.
Where is getkhosy.bcs assigned? Is there a file anywhere that calls it?
#15
Posted 08 January 2005 - 11:53 AM
Any idea how I can make it look like an Cleric level up by the way?
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#16
Posted 08 January 2005 - 12:16 PM
So, you'll need to assign the kido.bcs to the override script of Kido.cre, and I'd add the block from getkhosy.baf to the top of Kido.baf.
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#17
Posted 08 January 2005 - 12:47 PM
The .baf's should not be assigned anywhere, since they're just uncomplied versions of bcs'. .bcs-versions, though, need to be assigned to a creature, to an area or appended to baldur.bcs, in order to get them to work.
So, you'll need to assign the kido.bcs to the override script of Kido.cre, and I'd add the block from getkhosy.baf to the top of Kido.baf.
Kido.baf is assigned to Kido.cre file. This is the present override script
IF LevelGT(Myself,27) Global("gotkhosy","LOCALS",0) THEN RESPONSE #100 CreateItem("khosy",1,0,0) SetGlobal("gotkhosy","LOCALS",1) END IF InParty(Myself) See("Qualye") Global("KidoQuayle","LOCALS",0) THEN RESPONSE #100 StartDialogueNoSet("Quayle") SetGlobal("KidoQuayle","LOCALS",1) END
I changed the last part which originally comes from you SConrad. However in game the interjection does not run.
This is the KidoJ file that is linked to it:
CHAIN IF ~See("Quayle") Global("KidoQuayle","LOCALS",0) InParty("Aerie") See("Aerie")~ THEN KIDOJ quayle1 ~Oh jeez, you... you're Quayle! You... you are one of the smartest illusionists one can meet! I mean, I have heard of you in many a tale. You are perhaps not a bard, but an illusionist comes close to a bard, and... and you can also summon the powers of the divine! I, too, once gave some thought to becoming a Cleric, but I already had such a good voice and had attuned myself so much with it, that I couldn't bring myself to do it.~ DO ~SetGlobal("KidoQuayle","LOCALS",1)~ == QUAYLE ~I am glad that someone appreciates my intellect, but I have changed quite a bit thanks to my dear Aerie.~ == KIDOJ ~You can't be serious! Have you changed, because of her? She is nothing more than a sniffling, whining little child.~ = ~How could you bring down one of the best adventurers that ever were?! You... you wingless Avariel!~ == AERIEJ ~You... you should be ashamed of yourself. It is not nice to remind me of my present state. If it were not for Uncle Quayle, I would not have known what to do.~ == KIDOJ ~All the better! You probably wouldn't have been here!~ == QUAYLE ~That is enough! You will not shout at my beloved Aerie, nor will you cause her grief. Get out of my sight at once!~ == KIDOJ ~Oh, fiddlesticks! He has really turned soft. I hate it when that happens.~ EXIT CHAIN IF ~See("Quayle") Global("KidoQuayle","LOCALS",0) !InParty("Aerie")~ THEN KIDOJ quayle1 ~Oh jeez, you... you're Quayle! You... you are one of the smartest illusionists one can meet! I mean, I have heard of you in many a tale. You are perhaps not a bard, but an illusionist comes close to a bard, and... and you can also summon the powers of the divine! I, too, once gave some thought to becoming a Cleric, but I already had such a good voice and had attuned myself so much with it, that I couldn't bring myself to do it.~ DO ~SetGlobal("KidoQuayle","LOCALS",1)~ == QUAYLE ~I am glad that someone appreciates my intellect, but I have changed quite a bit thanks to my dear Aerie. I don't do that kind of adventuring stuff anymore.~ == KIDOJ ~Oh, fiddlesticks!~ EXIT
[edit] I have just looked with the new scripting, but the item still isn't created. Neither, the interjections comes up
Edited by Deathsangel, 08 January 2005 - 01:02 PM.
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#18
Posted 08 January 2005 - 02:55 PM
Yes, I can see you changed it. Now, remove the SetGlobal you added. The dialogue won't start if you don't. Otherwise, always set globals first in a script.
And you still don't need that many conditions in the dialogue when you already check them with your script.
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#19
Posted 09 January 2005 - 04:32 AM
Sorry for the confusion I did assign Kido.bcs script to the cre file. I forgot that I need to have a save from before I picked him up in order to let that script work. Which I find somewhat annoying.
It did not run due to a typo See("Qualye") must be See("Quayle"). Only then another problem remains. Only this is not neccessary to discuss here. My debugsters and I are working on it.
Will remove the conditions
Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.
Sentences marking (my) life:
Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams
(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable
~~ I love it, and I am humbled! Yay! ~~
#20
Posted 09 January 2005 - 08:22 AM
Yes, it does give problems.Well my debugger is just testing the scripts and adding that one global does not give problems.
From the script:
SetGlobal("KidoQuayle","LOCALS",1)
From the dialogue:
IF ~Global("KidoQuayle","LOCALS",0)~
The dialogue won't start if you don't remove the SetGlobal.
Certainly not all of them, I hope.Will remove the conditions
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner