Regan
Timeworn
Ancient
Must Try Harder
Posts: 2,382
|
Post by Regan on Dec 2, 2004 9:10:55 GMT -5
Yet another probably simple problem: I'd like to remove all intervention scrolls from the player's inventory using a script. This is how far I've got (stop sblack personing, it's my first mildly complicated script)
Short AIscrollcount Short DIscrollcount Set AIscrollcount to ( "player" -> GetItemCount, "sc_almsiviintervention" ) Set DIscrollcount to ( "player" -> GetItemCount, "sc_divineintervention" ) player->removeitem "sc_almsiviintervention", AIscrollcount player->removeitem "sc_divineintervention", DIscrollcount
Can I use the variables like this? I can't find any examples, uses in GBG's Scripting for Dummies.
This script is a run-once affair, and not attached to anything.
EDIT: It should say stop "gnireggins" backwards but seems to have been politically corrected!
|
|
|
Post by Calislahn on Dec 2, 2004 9:14:53 GMT -5
Oooh not sure, the scripting guru round here is Slategrey and he's not been well lately so isn't on much Have you tried it? i find if it can't be done it usually says there's an error when you try saving. Edit: i wondered what that meant, i thought it was a weird typo ;D
|
|
Regan
Timeworn
Ancient
Must Try Harder
Posts: 2,382
|
Post by Regan on Dec 2, 2004 9:19:41 GMT -5
I saved it earlier with no problems but now it says "Line 91 function reference object "sc_almsiviintervention" not found" ! That's stock MW, how can it not find it? Grrr I'll try making a separate scrpit just for this function. P.S. Yes, It's spelled correctly. I've treble checked.
|
|
Regan
Timeworn
Ancient
Must Try Harder
Posts: 2,382
|
Post by Regan on Dec 2, 2004 9:51:45 GMT -5
Well, despite saying it wouldn't run, it came up with no error messages in-game. It said 'scroll etc. has been removed from your inventory' but it didn't actually do anything, they were still there. I hope this makes it clearer for any passing scripting gurus thinking of offering advice!
|
|
|
Post by Bravo 1 on Dec 2, 2004 10:42:05 GMT -5
Regan, for a script to actually take action onto an object, that object has to be ingame; levelled lists and such do not count...is there an almsivi scroll sitting in the game anywhere (does it have a number other than zero? ...is it in an actual cell?)
I'm no scripting guru, but I have seen that error before...though this might not be it, its worth a try...right?
|
|
|
Post by Calislahn on Dec 2, 2004 10:51:31 GMT -5
Er that's Regan not Slate bravo
|
|
|
Post by Bravo 1 on Dec 2, 2004 10:52:56 GMT -5
...well...well...sorry Regan! (I was thinking because you'd mentioned slate! )
|
|
Regan
Timeworn
Ancient
Must Try Harder
Posts: 2,382
|
Post by Regan on Dec 2, 2004 11:51:36 GMT -5
I admit I'm not entirely sure what you mean, Bravo. What I'm trying to do is remove all intervention scrolls from the players inventory, it must be really simple but my scripting expertise is limited to forced equip armour and activators. As this is a global script it just runs once, maybe my syntax is defective. I'll get on with some dialogue in the meantime.
|
|
|
Post by Mebyon on Dec 2, 2004 12:50:32 GMT -5
Two things:
1. What a pain these gooody-goody checkers are! I'm going to try some, what they may call pergoritives, to see what comes out: black person, perv, homosexual, minoritry, bastard, cornishmen, females, ilsam, arabs. I've got bored!
2. There's a mod called Strip for Me which removes every item of clothing from a NPC. I'll go look for the script that drives it, I expect that it'll do the trick. Be back in a mo!
|
|
|
Post by Calislahn on Dec 2, 2004 12:53:17 GMT -5
Who'd have thought your oggling the ladies would be useful I've noticed at esf they keep saying spotted owl, there's even a spotted owl emoticon, i have no idea what that is meant to mean
|
|
|
Post by Mebyon on Dec 2, 2004 12:57:47 GMT -5
Well, well. Only 'n i g g e r s' are picked up. So it's OK to be a Cornish arab homosexual. As long as you aren't black like my friend Fabian who calls himself "The only 'n i g g e r' jew that he knows"! What a sad world we live in when you can't use the English that you were born with without some little tit deciding what English you can use.
|
|
|
Post by Mebyon on Dec 2, 2004 12:59:26 GMT -5
Stop posting Cali! I'm supposed to be looking for a script! Spotted Owl? Someone will tell us I've njo doubt!
|
|
|
Post by Mebyon on Dec 2, 2004 13:06:06 GMT -5
OK Back to topic:
Here's what I found:
<Snip> (as it's HUGE!)
short clothes_item_count
;gloves
set clothes_item_count to GetItemCount, "common_glove_left_01" if ( clothes_item_count != 0 ) Drop, "common_glove_left_01", clothes_item_count endif
set clothes_item_count to GetItemCount, "expensive_glove_left_01" if ( clothes_item_count != 0 ) Drop, "expensive_glove_left_01", clothes_item_count endif
<end snip>
You need to list every item of clothing, scroll, whatever but it works. Witness the number of pompous naked people I have wandering around!
|
|
|
Post by Calislahn on Dec 2, 2004 13:09:49 GMT -5
Can i post again now
|
|
|
Post by Mebyon on Dec 2, 2004 13:13:16 GMT -5
The world is your greasy mollusk m'dear!
|
|