Hallo
Ich habe ein kleines Problem mit einem selbst erstellten Script. Es funktioniert zwar und wird vom GECK auch gespeichert,
aber wenn ich ein Item herstelle und es über das Script wieder zerlege erhalte ich zu viel Ausgangsmaterial zurück.
(Script ist im Spoiler)
scn RCPEammopressScript
short nCase1Count
short nCase2Count
short nCase3Count
short nCase4Count
short nCase5Count
short nCase6Count
short nCase7Count
short nCase8Count
short nCase9Count
short nCase10Count
short nCase11Count
short nCaseCut1Count
short nCaseCut2Count
short nCaseCut3Count
short nCaseFullCount
Short nCase1CountValue
Short nCase2CountValue
Short nCase3CountValue
Short nCase4CountValue
Short nCase5CountValue
Short nCase6CountValue
Short nCase7CountValue
Short nCase8CountValue
Short nCase9CountValue
Short nCase10CountValue
short nCase11CountValue
short button
short User
begin OnActivate
set User to GetActionRef
if GetActionRef == Player
showmessage RCPEammopressMass
else
activate
endif
end
Begin GameMode
set Button to GetButtonPressed
if ( button == 1 )
Set nCase1Count to Player.GetItemCount Case10mm;
Set nCase2Count to Player.GetItemCount Case127mm;
Set nCase3Count to Player.GetItemCount Case308;
Set nCase4Count to Player.GetItemCount Case357Magnum;
Set nCase5Count to Player.GetItemCount Case44Magnum;
Set nCase6Count to Player.GetItemCount Case4570Govt;
Set nCase7Count to Player.GetItemCount Case50MG;
Set nCase8Count to Player.GetItemCount Case556mm;
Set nCase9Count to Player.GetItemCount Case5mm;
Set nCase10Count to Player.GetItemCount Case9mm;
Set nCase11Count to Player.GetItemCount NVDLC02Case45Auto;
Set nCase1CountValue to ( nCase1Count * 40 );
Set nCase2CountValue to ( nCase2Count * 40 );
Set nCase3CountValue to ( nCase3Count * 40 );
Set nCase4CountValue to ( nCase4Count * 40 );
Set nCase5CountValue to ( nCase5Count * 40 );
Set nCase6CountValue to ( nCase6Count * 40 );
Set nCase7CountValue to ( nCase7Count * 50 );
Set nCase8CountValue to ( nCase8Count * 40 );
Set nCase9CountValue to ( nCase9Count * 40 );
Set nCase10CountValue to ( nCase10Count * 40 );
Set nCase11CountValue to ( nCase11Count * 40 );
Set nCaseCut1Count To (nCase1CountValue + nCase2CountValue + nCase3CountValue + nCase4CountValue + nCase5CountValue ) ;
Set nCaseCut2Count To (nCase6CountValue + nCase7CountValue + nCase8CountValue + nCase9CountValue + nCase10CountValue ) ;
Set nCaseCut3Count To (nCase11CountValue)
Set nCaseFullCount To (nCaseCut1Count + nCaseCut2Count + nCaseCut3Count)
Player.Removeitem Case10mm nCase1Count;
Player.Removeitem Case127mm nCase2Count;
Player.Removeitem Case308 nCase3Count;
Player.Removeitem Case357Magnum nCase4Count;
Player.Removeitem Case44Magnum nCase5Count;
Player.Removeitem Case4570Govt nCase6Count;
Player.Removeitem Case50MG nCase7Count;
Player.Removeitem Case556mm nCase8Count;
Player.Removeitem Case5mm nCase9Count;
Player.Removeitem Case9mm nCase10Count;
Player.Removeitem NVDLC02Case45Auto nCase11Count;
Player.Additem Lead nCaseFullCount
elseif ( button == 2 )
player.showrecipemenu RCPEammopressRecipes
elseif ( button == 0 )
; nothing
endif
end
Kann mir jemand meinen Fehler zeigen.