I have a boss-monster I want to have a powerful weapon that I cannot loot. However, I want him/her to have an inventory item that I can loot. The sword in question already has a decent script for if the sword falls on the ground, but I need it also to get removed from inventory should I be able to loot it. Here is what I have so far:
ScriptName FirelickSword1
short HasFS
Begin OnActivate
If IsActionRef Player == 1
MessageBox "The weapon crumbles to dust in your hands."
Disable
Else
Activate
EndIf
End
Begin OnAdd Player
If Player.GetItemCount flamesword1 <= 1
If hasFS == 0
Set HasFS to 1
endif
endif
End
Begin GameMode
If Player.GetItemCount flamesword1 >= 1
If HasFS == 1
Player.RemoveItem flamesword1 1
MessageBox "The weapon crumbles to dust in your hands."
Set HasFS to 0
endif
endif
End
This script crashes me to desktop every time. I have tried it without the 'player.removeitem flamesword1 1' and it works perfectly. so the culpret is the remove item, I just dont know what I am doing wrong. Is it becasue the 'player' variable is not more defined?
If anyone has an answer to this, please let me know. Thanks.
Sticz
Sticz
Member Since 28 Aug 2004Offline Last Active Apr 14 2009 03:47 AM
Community Stats
- Group Member
- Active Posts 385
- Profile Views 8880
- Member Title Monkey - In the time of Chimpanzees
- Age 50 years old
- Birthday June 10, 1974
-
Gender
Male
-
Location
In the Village Idiot's House- DeSoto, MO.
-
Interests
The ramifications of introducing cheese-wiz to active bacteria cultures.
User Tools
Friends
Sticz hasn't added any friends yet.
Latest Visitors
Topics I've Started
Inventory Issues
21 September 2008 - 01:15 AM
Non-conflicting body mesh
24 July 2008 - 10:45 AM
I have tried several meshes for better female's but none I have seen really match up will with the default body pieces on the vanilla armors. Does anyone know of a body replacement that link's up really well? I have tried BAB, Roberts Female, Eshme and exnem's, any other suggestions?
I have also tried the 'topless' mod for the vanilla body, its rather... lacking... as far as texturing and such.
Thanks,
Sticz
I have also tried the 'topless' mod for the vanilla body, its rather... lacking... as far as texturing and such.
Thanks,
Sticz
Scripting Difficulties
21 July 2008 - 07:37 AM
Hello all,
I am getting into scripting with Oblivion, now that I had finally become a Journeyman with it in the IE games. I am running into problems finding good examples in the game itself. I have a teleportation spell that works wonders (though if I learn more about scripting I will make it so that quests won't be broken). My primary concern now is that I would like to have options on where to teleport to. Here is what I have:
ScriptName ManorHouseSCRIPT
; This is the script that runs when using the Teleport spell
int iButton
Begin ScriptEffectStart
; Open messagebox for selecting desired Teleport destination.
MessageBox "Do you wish to travel to Wayside Manor?", "Yes", "No"
End
Begin GameMode
set iButton to GetButtonPressed
; did the player press a button?
if iButton > -1
; depending of the button that was pressed in the messagebox, Teleport to a guildhall.
playSound DRSOblivionGateOpen
if iButton == 0
player.MoveTo MANNORHOUSEGATEREF
endif
endif
End
This works fine and there are no hitches. However, I would also like to add menues as various quests get completed. So that once I am master of the Thieves Guild, I can teleport directly to the guild. And the same with the Mages guild, Fighters guild and dark brotherhood. What I am lacking is an order to put the pieces together in. I am pretty sure that my variables/globals need to be in this first line.
Begin ScriptEffectStart
; Open messagebox for selecting desired Teleport destination.
MessageBox "Do you wish to travel to Wayside Manor?", "Yes", "No"
End
I am a little slow in this, but here goes
Begin ScriptEffectStart
if myVar1 == 1 && myVar2 == 1 && myVar2 == 5
; Open messagebox for selecting desired Teleport destination.
MessageBox "Do you wish to travel to Wayside Manor?", "Yes", "No"
ElseIf
if myVar1 == 1 && myVar2 == 1 || myVar2 == 5
; Open messagebox for selecting desired Teleport destination.
MessageBox "Where do you want to Travel?", "The Manor", "The Sanctuary", "Fighters Guild", "Dareloth's Home"
Else
MessageBox "Do you wish to close this menu?", "Yes", "No"
End
What I am really looking for is how to identify the quest stages for the main factions in the game. I also need to know how to specifically target a range in that questline so that I can target the time when, for instance, I get the key to the thieves guild. Pouring through all of the code/scripts in the game has gotten me more confused than anything. I appreciate the help, thanks.
Sticz
I am getting into scripting with Oblivion, now that I had finally become a Journeyman with it in the IE games. I am running into problems finding good examples in the game itself. I have a teleportation spell that works wonders (though if I learn more about scripting I will make it so that quests won't be broken). My primary concern now is that I would like to have options on where to teleport to. Here is what I have:
ScriptName ManorHouseSCRIPT
; This is the script that runs when using the Teleport spell
int iButton
Begin ScriptEffectStart
; Open messagebox for selecting desired Teleport destination.
MessageBox "Do you wish to travel to Wayside Manor?", "Yes", "No"
End
Begin GameMode
set iButton to GetButtonPressed
; did the player press a button?
if iButton > -1
; depending of the button that was pressed in the messagebox, Teleport to a guildhall.
playSound DRSOblivionGateOpen
if iButton == 0
player.MoveTo MANNORHOUSEGATEREF
endif
endif
End
This works fine and there are no hitches. However, I would also like to add menues as various quests get completed. So that once I am master of the Thieves Guild, I can teleport directly to the guild. And the same with the Mages guild, Fighters guild and dark brotherhood. What I am lacking is an order to put the pieces together in. I am pretty sure that my variables/globals need to be in this first line.
Begin ScriptEffectStart
; Open messagebox for selecting desired Teleport destination.
MessageBox "Do you wish to travel to Wayside Manor?", "Yes", "No"
End
I am a little slow in this, but here goes
Begin ScriptEffectStart
if myVar1 == 1 && myVar2 == 1 && myVar2 == 5
; Open messagebox for selecting desired Teleport destination.
MessageBox "Do you wish to travel to Wayside Manor?", "Yes", "No"
ElseIf
if myVar1 == 1 && myVar2 == 1 || myVar2 == 5
; Open messagebox for selecting desired Teleport destination.
MessageBox "Where do you want to Travel?", "The Manor", "The Sanctuary", "Fighters Guild", "Dareloth's Home"
Else
MessageBox "Do you wish to close this menu?", "Yes", "No"
End
What I am really looking for is how to identify the quest stages for the main factions in the game. I also need to know how to specifically target a range in that questline so that I can target the time when, for instance, I get the key to the thieves guild. Pouring through all of the code/scripts in the game has gotten me more confused than anything. I appreciate the help, thanks.
Sticz
Making Static Items
19 July 2008 - 03:15 PM
I am looking to change some things that always get knocked off of tables and such from movable to static. Does anyone here have ideas as to how to do this? I have checked the Wiki, but found nothing specific to my problem. I looked at the settings on nifskope, and found nothing I can decipher.
Is this something I need to us a modeling editor for?
Thanks,
Sticz
Is this something I need to us a modeling editor for?
Thanks,
Sticz
City Guard Sccripting: Two things
03 October 2007 - 06:18 AM
I was playing around with some new meshes (I only have one mod that I add things to constantly, it keeps my game cleaner) and came across an Exenm low-cut set for city guards. Is there a way to have the guards scripted to change gender during their rest cycle? I would want them to change back and forth so one day/night they are male, the next they are female. Since they have generic names the only way that I would notice the change would be if I went to watch them all go to sleep. Is this possible and would there be any conflicts (I.E. the would continuously change gender during sleep or it would interrupt their rest cycle)
Secconldy, I want the guards to attempt an arrest only if my bounty is say, under 1500 septims, otherwise they would just start attacking. How would I script that in to their reactions? Would that be a dialog issue or a active script issue. I would also not want them to start attacking due to the Gray Fox Cowl.
I am very used to scripting for Baldur's Gate, so I am new at TES scripting, though the premises are very similar.
Thanks for any and all help in this matter.
Sticz
Secconldy, I want the guards to attempt an arrest only if my bounty is say, under 1500 septims, otherwise they would just start attacking. How would I script that in to their reactions? Would that be a dialog issue or a active script issue. I would also not want them to start attacking due to the Gray Fox Cowl.
I am very used to scripting for Baldur's Gate, so I am new at TES scripting, though the premises are very similar.
Thanks for any and all help in this matter.
Sticz
- Spellhold Studios
- → Viewing Profile: Topics: Sticz
- Guidelines