PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Fehler im Script?



Blackskyliner
02.04.2007, 21:15
Deutsch:
Hallo :)
Ich habe da grade mal ein Problem und zwar schreibe ich mir grade aus Testzwecken ein Addon, mit welchem das Menschenblut ein Script bekommt, dass es auch was bringt das zu trinken. Ich hab das nun soweit, das ich mir ein Misc Item angelegt habe, welches ich erstmal TestZeuch genannt habe mit dem IDNamen TestBlood und der Offsetadresse 04000CEC
Nur leider schmiert bei jedem mal Oblivion ab, wenn ich das Blut benutze. Es liegt daran das ich das entferne aber ich sehe da keinen Fehler. Mach ich syntaktisch was falsch? Poste ich hier auch im richtigen Forum, wenn jmd. ein besseres Oblivion-Scripting Forum kennt, dann immer her damit, kann auch ruhig in Englisch sein. Hier noch das Script was auf dem Item Liegt:

English:
Hello :)
I´ve a problem... I try to make a functional "Humanblood" potition. I´ve figured out that i cant use OnEquip on a potition so I´ve created a Misc Item named TestBlood with the adress 04000CEC. But when I try to drink the blood Oblivion crash... I think it´s a failure in the removeitem part, but it´s like the example on cs.elderscrolls.com ... So is it my failure? Or is it a bug? Im really new in scripting... slap me with a lash if i´ve done a noob failure. If anyone know a better forum for oblivion scripting plz tell me the adress :).
Here the item script:

scn BloodInABottle

float vamphour;
short vampday;
short ToRemoveVar
Ref MyBloodItemVar;

begin OnEquip
Set PCVampire to 1

;remove any spell from higher states
set MyBloodItemVar to TestBlood
set ToRemoveVar to 1
Player.removeitem MyBloodItemVar ToRemoveVar

Player.removespell Vampirism50
Player.removespell Vampirism50Att
Player.removespell Vampirism50Skills
Player.removespell VampireSeduction
Player.removespell Vampirism75
Player.removespell Vampirism75Att
Player.removespell Vampirism75Skills
Player.removespell VampireReignofTerror
Player.removespell Vampirism100
Player.removespell Vampirism100Att
Player.removespell Vampirism100Skills
Player.removespell VampireEmbraceofShadows

;re-add state 1 spells

Player.addspell Vampirism25
Player.addspell Vampirism25Att
Player.addspell Vampirism25Skills
set vampday to GameDay
set vamphour to GameHour
MessageBox "Euer Hunger auf Blut ist gestillt... für den Augenblick."
END

EDIT:
I use the CS 1.2

DWS
03.04.2007, 09:56
Ich steige da nicht durch. Hast du etwa das obige script auf das item gelegt, welches mit removeitem im script entfernt wird? Falls ja, dann muss das crashen.

Komplexere scripting Fragen würde ich hier stellen:
http://www.bethsoft.com/bgsforums/index.php?showforum=24

Blackskyliner
03.04.2007, 13:13
Ok, werd ich machen.
Jo genau das versuche ich, wie soll man das denn anders machen?

Einen Aktivator beim Benutzen des Items setzen, der bei einem OnActivate Das Item aus dem Inventar entfernt und sich dan selber wieder aus der Welt löscht? (Sofern das überhaupt möglich wäre)

DWS
03.04.2007, 16:43
Einen Weg finden du musst. Ein script sich selbst entfernen nicht kann.