wo liegt der fehler in diesem script???
func void PC_Sleep(var int t)
{
AI_StopProcessInfos (self);
PLAYER_MOBSI_PRODUCTION = MOBSI_NONE;
self.aivar[AIV_INVINCIBLE] = FALSE;
if (Wld_IsTime (0, 0, t, 0))
{
Wld_SetTime (t, 0);
}
else
{
t = t + 24;
Wld_SetTime (t, 0);
};
Wld_StopEffect ("DEMENTOR_FX");
if (SC_IsObsessed == TRUE)
{
PrintScreen (PRINT_SleepOverObsessed, -1, -1, FONT_Screen, 2);
PrintScreen (PRINT_SleepOver, -1, -1, FONT_Screen, 2);
hero.attribute[ATR_HITPOINTS] = hero.attribute[ATR_HITPOINTS_MAX];
hero.attribute[ATR_MANA] = hero.attribute[ATR_MANA_MAX];
};
PrintGlobals (PD_ITEM_MOBSI);
Npc_SendPassivePerc (hero, PERC_ASSESSENTERROOM, NULL, hero);
if (WANNARESPAWN == TRUE)
{
RespawnGlobal (TRUE);
RespawnGlobal2 (TRUE);
};
};
{ if (wannarespawn== False)
RespawnGlobal (FALSE);
RespawnGlobal2 (FALSE);
};
};
func void sleepabit_s1()
{
var C_Npc her;
var C_Npc rock;
her = Hlp_GetNpc (PC_Hero);
rock = Hlp_GetNpc (PC_Rockefeller);
if ((Hlp_GetInstanceID (self) == Hlp_GetInstanceID (her)) || (Hlp_GetInstanceID (self) == Hlp_GetInstanceID (rock)))
{
self.aivar[AIV_INVINCIBLE] = TRUE;
PLAYER_MOBSI_PRODUCTION = MOBSI_SleepAbit;
AI_ProcessInfos (her);
if (SC_IsObsessed == TRUE)
{
Wld_PlayEffect ("DEMENTOR_FX", hero, hero, 0, 0, 0, FALSE);
};
};
};
instance PC_NoSleep(C_Info)
{
npc = PC_Hero;
nr = 999;
condition = PC_NoSleep_Condition;
information = PC_NoSleep_Info;
important = 0;
permanent = 1;
description = Dialog_Ende;
};
func int PC_NoSleep_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SleepAbit)
{
return 1;
};
};
func void PC_NoSleep_Info()
{
AI_StopProcessInfos (self);
Wld_StopEffect ("DEMENTOR_FX");
self.aivar[AIV_INVINCIBLE] = FALSE;
PLAYER_MOBSI_PRODUCTION = MOBSI_NONE;
};
instance PC_SleepTime_Morning(C_Info)
{
npc = PC_Hero;
condition = PC_SleepTime_Morning_Condition;
information = PC_SleepTime_Morning_Info;
important = 0;
permanent = 1;
description = "Bis zum nächsten Abend schlafen";
};
func int PC_SleepTime_Morning_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SleepAbit)
{
return 1;
};
};
func void PC_SleepTime_Morning_Info()
{
PC_Sleep (20);
if (WANNARESPAWN == TRUE)
{
RespawnGlobal ();
RespawnGlobal2 ();
RM_GETDAY_BETT = Wld_GetDay ();
}
else if (RM_GETDAY_BETT <= (Wld_GetDay () - 1))
{
RespawnGlobal ();
RespawnGlobal2 ();
RM_GETDAY_BETT = Wld_GetDay ();
};
};
};
instance PC_SleepTime_Noon(C_Info)
{
npc = PC_Hero;
condition = PC_SleepTime_Noon_Condition;
information = PC_SleepTime_Noon_Info;
important = 0;
permanent = 1;
description = "Bis Mitternacht schlafen";
};
func int PC_SleepTime_Noon_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SleepAbit)
{
return 1;
};
};
func void PC_SleepTime_Noon_Info()
{
PC_Sleep (0);
if (WANNARESPAWN == TRUE)
{
RespawnGlobal ();
RespawnGlobal2 ();
RM_GETDAY_BETT = Wld_GetDay ();
}
else if (RM_GETDAY_BETT <= (Wld_GetDay () - 1))
{ RespawnGlobal ();
RespawnGlobal2 ();
RM_GETDAY_BETT = Wld_GetDay ();
};
};
};
instance PC_SleepTime_Evening(C_Info)
{
npc = PC_Hero;
condition = PC_SleepTime_Evening_Condition;
information = PC_SleepTime_Evening_Info;
important = 0;
permanent = 1;
description = "Bis zum nächsten Morgen schlafen";
};
func int PC_SleepTime_Evening_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SleepAbit)
{
return 1;
};
};
func void PC_SleepTime_Evening_Info()
{
PC_Sleep (6);
if (WANNARESPAWN == TRUE)
{
RespawnGlobal ();
RespawnGlobal2 ();
RM_GETDAY_BETT = Wld_GetDay ();
}
else if (RM_GETDAY_BETT <= (Wld_GetDay () - 1))
{
RespawnGlobal ();
RespawnGlobal2 ();
RM_GETDAY_BETT = Wld_GetDay ();
};
};
};
instance PC_SleepTime_Midnight(C_Info)
{
npc = PC_Hero;
condition = PC_SleepTime_Midnight_Condition;
information = PC_SleepTime_Midnight_Info;
important = 0;
permanent = 1;
description = "Bis Mittag schlafen";
};
func int PC_SleepTime_Midnight_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SleepAbit)
{
return 1;
};
};
func void PC_SleepTime_Midnight_Info()
{
PC_Sleep (12);
if (WANNARESPAWN == TRUE)
{
RespawnGlobal ();
RespawnGlobal2 ();
RM_GETDAY_BETT = Wld_GetDay ();
}
else if (RM_GETDAY_BETT <= (Wld_GetDay () - 1))
{RespawnGlobal ();
RespawnGlobal2 ();
RM_GETDAY_BETT = Wld_GetDay ();
};
};
};
Sag du es uns
Was ist denn das Problem?
Was genau steht in der Fehlermeldung / zSpy?
//****************************
// PC_Sleep
//****************************
func void PC_Sleep (var int t)
{
AI_StopProcessInfos(self); // [SK] ->muss hier stehen um das update zu gewährleisten
PLAYER_MOBSI_PRODUCTION = MOBSI_NONE;
self.aivar[AIV_INVINCIBLE]=FALSE;
if (Wld_IsTime(00,00,t,00))
{
Wld_SetTime (t,00);
}
else
{
t = t + 24;
Wld_SetTime (t,00);
};
Wld_StopEffect("DEMENTOR_FX");
// FIXME_Nico: dauert zu lange um es vernuenftig zu machen.
// Wld_PlayEffect ("SLEEP_BLEND", hero, hero, 0, 0, 0, FALSE);
if (SC_IsObsessed == TRUE)
{
PrintScreen (PRINT_SleepOverObsessed, -1,-1,FONT_Screen,2);
}
else
{
PrintScreen (PRINT_SleepOver, -1,-1,FONT_Screen,2);
hero.attribute[ATR_HITPOINTS] = hero.attribute[ATR_HITPOINTS_MAX];
hero.attribute[ATR_MANA] = hero.attribute[ATR_MANA_MAX];
};
//-------- AssessEnterRoom-Wahrnehmung versenden --------
PrintGlobals (PD_ITEM_MOBSI);
Npc_SendPassivePerc (hero, PERC_ASSESSENTERROOM, NULL, hero); //...damit der Spieler dieses Feature nicht zum Hütteplündern ausnutzt!
};
func void SLEEPABIT_S1 ()
{
var C_NPC her; her = Hlp_GetNpc(PC_Hero);
var C_NPC rock; rock = Hlp_GetNpc(PC_Rockefeller);
//***ALT** if (Hlp_GetInstanceID (self)== Hlp_GetInstanceID (Hero)) // MH: geändert, damit kontrollierte NSCs nicht schlafen können!
if ( (Hlp_GetInstanceID(self)==Hlp_GetInstanceID(her))||(Hlp_GetInstanceID(self)==Hlp _GetInstanceID(rock)) )
{
self.aivar[AIV_INVINCIBLE]=TRUE;
PLAYER_MOBSI_PRODUCTION = MOBSI_SLEEPABIT;
Ai_ProcessInfos (her);
if (SC_IsObsessed == TRUE)
{
Wld_PlayEffect("DEMENTOR_FX", hero, hero, 0, 0, 0, FALSE );
};
};
};
//-------------------- Gar nicht schlafen -------------------------
INSTANCE PC_NoSleep (c_Info)
{
npc = PC_Hero;
nr = 999;
condition = PC_NoSleep_Condition;
information = PC_NoSleep_Info;
important = 0;
permanent = 1;
description = DIALOG_ENDE;
};
FUNC INT PC_NoSleep_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1;
};
};
func VOID PC_NoSleep_Info()
{
AI_StopProcessInfos (self);
Wld_StopEffect("DEMENTOR_FX");
self.aivar[AIV_INVINCIBLE]=FALSE;
PLAYER_MOBSI_PRODUCTION = MOBSI_NONE;
};
//---------------------- morgens --------------------------------------
INSTANCE PC_SleepTime_Morning (C_INFO)
{
npc = PC_Hero;
condition = PC_SleepTime_Morning_Condition;
information = PC_SleepTime_Morning_Info;
important = 0;
permanent = 1;
description = "Bis zum nächsten Morgen schlafen";
};
FUNC INT PC_SleepTime_Morning_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1;
};
};
func void PC_SleepTime_Morning_Info ()
{
PC_Sleep (8);
if (WANNA_RESPAWN == TRUE)
Respawn_Global ();
Wld_GetDay ();
};
//--------------------- mittags -----------------------------------------
INSTANCE PC_SleepTime_Noon (C_INFO)
{
npc = PC_Hero;
condition = PC_SleepTime_Noon_Condition;
information = PC_SleepTime_Noon_Info;
important = 0;
permanent = 1;
description = "Bis Mittags schlafen";
};
FUNC INT PC_SleepTime_Noon_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1;
};
};
func void PC_SleepTime_Noon_Info ()
{
PC_Sleep (12);
if (WANNA_RESPAWN == TRUE)
Respawn_Global ();
Wld_GetDay ();
};
};
//---------------------- abend --------------------------------------
INSTANCE PC_SleepTime_Evening (C_INFO)
{
npc = PC_Hero;
condition = PC_SleepTime_Evening_Condition;
information = PC_SleepTime_Evening_Info;
important = 0;
permanent = 1;
description = "Bis zum nächsten Abend schlafen";
};
FUNC INT PC_SleepTime_Evening_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1;
};
};
func void PC_SleepTime_Evening_Info ()
{
PC_Sleep (20);
if (WANNA_RESPAWN == TRUE)
Respawn_Global ();
Wld_GetDay ();
};
};
//------------------------ nacht -----------------------------------------
instance PC_SleepTime_Midnight (C_INFO)
{
npc = PC_Hero;
condition = PC_SleepTime_Midnight_Condition;
information = PC_SleepTime_Midnight_Info;
important = 0;
permanent = 1;
description = "Bis Mitternacht schlafen";
};
FUNC INT PC_SleepTime_Midnight_Condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1;
};
};
func VOID PC_SleepTime_Midnight_Info()
{
PC_Sleep (0);
if (WANNA_RESPAWN == TRUE)
Respawn_Global ();
Wld_GetDay ();
};
};
habe es noch so versucht und er zeigt mir bei der fehlermeldung eine { Klammer an
in der z spy zDSK 0 Files simulouse00:12 Info: 8 X: Device supports mode - (w*h*bpp) 1768*992*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 8 X: Device supports mode - (w*h*bpp) 1920*1080*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 8 X: Device supports mode - (w*h*bpp) 1920*1200*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 8 X: Device supports mode - (w*h*bpp) 1920*1440*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 8 X: Device supports mode - (w*h*bpp) 2048*1536*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 8 X: Device supports mode - (w*h*bpp) 2560*1440*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 8 X: Device supports mode - (w*h*bpp) 2560*1600*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 8 X: Device supports mode - (w*h*bpp) 3840*2160*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 8 X: Device supports mode - (w*h*bpp) 1360*850*16 .... <zRndD3D_Init.cpp,#180>
00:12 Info: 5 X: XD3D_SetDevice: Switching to windowed on same device ... .... <zError.cpp,#465>
00:12 Info: 5 X: XD3D_ClearDevice: Releasing old mode ... .... <zError.cpp,#465>
00:12 Info: 5 X: Start to save textures (lightmaps) ... .... <zError.cpp,#465>
00:12 Info: 5 X: Number of saved textures:0 .... <zError.cpp,#465>
00:12 Info: 5 X: zCDXTCCache_D3D :: ClearCache: Surfaces to clear - 0 .... <zRndD3D_DxtcCache.cpp,#177>
00:12 Info: 5 X: Destroy all vertexbuffers. .... <zError.cpp,#465>
00:12 Info: 5 X: zCDXTCCache_D3D :: ClearCache: Surfaces to clear - 0 .... <zRndD3D_DxtcCache.cpp,#177>
00:12 Info: 5 X: XD3D_InitPort: 3840 x 2160 x 32(device:0 mode:0) .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPerDX: D3DXInitialize done .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPerDX: Found NVIDIA GeForce GTX 960 \ Microsoft Direct3D Hardware Transform and Lighting acceleration capable device .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPerDX: Switching to NVIDIA GeForce GTX 960 \ Microsoft Direct3D Hardware Transform and Lighting acceleration capable device .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPerDX: Hardware TnL supported. .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_TestCapabilities: Device has passed capability tests. .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: szDriver=nvldumd.dll .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: szDescription=NVIDIA GeForce GTX 960 .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: wProduct=0 .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: wVersion=0 .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: wSubVersion=0 .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: wBuild=0 .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: dwVendorId=4318 .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: dwDeviceId=5121 .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: dwSubSysId=2236420163 .... <zError.cpp,#465>
00:13 Info: 5 X: D3D Device-Info: dwRevision=161 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Store RGB Format .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Store RGB Format .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Store RGB Format .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Store RGB Format .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Device supports DXT1 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Device supports DXT2 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Device supports DXT3 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Device supports DXT4 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_EnumTextureCallback: Device supports DXT5 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: Maximal texture width -> 16384 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: Maximal texture height -> 16384 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: Alpha testing supported .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: no w-buffering .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: Color-Buffer depth:32 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: Z-Buffer depth:32 .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: caps - windowed mode possible .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: caps - gamma correction enabled .... <zRndD3D_Init.cpp,#852>
00:13 Info: 5 X: XD3D_InitPort: caps - total videomem:4294901760 .... <zRndD3D_Init.cpp,#879>
00:13 Info: 5 X: XD3D_InitPort: caps - free videomem:4228481024 .... <zRndD3D_Init.cpp,#880>
00:13 Info: 5 X: XD3D_InitPort: caps - w-based fog supported .... <zError.cpp,#465>
00:13 Info: 8 X: Vid_SetGammaCorrection: .... <zRndD3D_Vid.cpp,#668>
00:13 Info: 8 X: Contrast -> 0.5 .... <zRndD3D_Vid.cpp,#669>
00:13 Info: 8 X: Gamma -> 0.5 .... <zRndD3D_Vid.cpp,#670>
00:13 Info: 8 X: Brightness -> 0.5 .... <zRndD3D_Vid.cpp,#671>
00:13 Info: 5 X: XD3D_InitPort: Start to rebuild vertexbuffers ... .... <zError.cpp,#465>
00:13 Info: 5 X: XD3D_InitPort: Vertexbuffers rebuild done. .... <zError.cpp,#465>
00:13 Info: 5 X: Start to rebuild saved textures (lightmaps) ... .... <zError.cpp,#465>
00:13 Info: 5 X: Number of rebuild textures:0 .... <zError.cpp,#465>
00:13 Info: 5 X: Vid_SetScreenMode: Switched to windowed mode ... .... <zRndD3D_Vid.cpp,#580>
00:13 Info: 5 X: Vid_SetScreenMode: No changes ... .... <zRndD3D_Vid.cpp,#559>
00:13 Info: 8 C: WM_CANCELMODE received .... <zWin32.cpp,#1728>
00:13 Info: 8 C: WM_ACTIVATE received .... <zWin32.cpp,#1720>
00:17 Info: 8 C: WM_ACTIVATE received .... <zWin32.cpp,#1720>
00:17 Info: 1 B: VFILE: Deinitializing filesystem (VDFS) .... <zDisk_Vdfs.cpp,#619>
00:17 Info: 2 B: zDSK: 0 files were simultanously open! .... <zDisk_Vdfs.cpp,#625>
Benutze bitte den Forums-Code [*code] [*/code] (ohne *) so scrollt man sich ja einen Wolf
Folgendes habe ich gefunden, ohne mir jetzt das script genauer anzuschauen.
Code:
//-------- AssessEnterRoom-Wahrnehmung versenden --------
PrintGlobals (PD_ITEM_MOBSI);
Npc_SendPassivePerc (hero , PERC_ASSESSENTERROOM, NULL, hero ); //...damit der Spieler dieses Feature nicht zum Hütteplündern ausnutzt!
};
Code:
//***ALT** if (Hlp_GetInstanceID (self)== Hlp_GetInstanceID (Hero)) // MH: geändert, damit kontrollierte NSCs nicht schlafen können!
if ( (Hlp_GetInstanceID (self )==Hlp_GetInstanceID (her))||(Hlp_GetInstanceID (self )==Hlp _GetInstanceID (rock)) )
{
self .aivar[AIV_INVINCIBLE]=TRUE ;
PLAYER_MOBSI_PRODUCTION = MOBSI_SLEEPABIT;
Ai_ProcessInfos (her);
};
Code:
func void PC_SleepTime_Noon_Info ()
{
PC_Sleep (12 );
if (WANNA_RESPAWN == TRUE ) {
Respawn_Global ();
Wld_GetDay ();
};
};
Code:
if (SC_IsObsessed == TRUE )
{
Wld_PlayEffect ("DEMENTOR_FX" , hero , hero , 0 , 0 , 0 , FALSE );
};
};
};
Code:
func void PC_SleepTime_Evening_Info ()
{
PC_Sleep (20 );
if (WANNA_RESPAWN == TRUE ) {
Respawn_Global ();
Wld_GetDay ();
};
};
Code:
func VOID PC_SleepTime_Midnight_Info ()
{
PC_Sleep (0 );
if (WANNA_RESPAWN == TRUE ) {
Respawn_Global ();
Wld_GetDay ();
};
};
Das ist erstmal alles was mir jetzt so auffällt. Du solltest dir angewöhnen den Code Sauber zu schreiben, hier ein bsp:
Aus:
Code:
if (SC_IsObsessed == TRUE )
{
PrintScreen (PRINT_SleepOverObsessed, -1 ,-1 ,FONT_Screen,2 );
}
else
{
PrintScreen (PRINT_SleepOver, -1 ,-1 ,FONT_Screen,2 );
hero .attribute[ATR_HITPOINTS] = hero .attribute[ATR_HITPOINTS_MAX];
hero .attribute[ATR_MANA] = hero .attribute[ATR_MANA_MAX];
};
Wird:
Code:
if (SC_IsObsessed == TRUE ) {
PrintScreen (PRINT_SleepOverObsessed, -1 ,-1 ,FONT_Screen,2 );
} else {
PrintScreen (PRINT_SleepOver, -1 ,-1 ,FONT_Screen,2 );
hero .attribute[ATR_HITPOINTS] = hero .attribute[ATR_HITPOINTS_MAX];
hero .attribute[ATR_MANA] = hero .attribute[ATR_MANA_MAX];
};
Ist doch besser oder? Falls du wissen willst, wie ich das alles eingefärbt habe, der gute Kirides hat da ein schönes Tool gebastelt: https://kirides.github.io/daedalus2bbcode/
Als Editor kann ich dir Notepad++ empfehlen, das färbt das alles automatisch für bessere Lesbarkeit ein.
Geändert von neocromicon (19.02.2021 um 17:31 Uhr)
You have already been helped above.
Spoiler:(zum lesen bitte Text markieren) My God, make it in the CODE tag
Error in the SLEEPABIT_S1, PC_SleepTime_Morning_Info, PC_SleepTime_Noon_Info, PC_SleepTime_Evening_Info, PC_SleepTime_Midnight_Info script
Code:
func void SLEEPABIT_S1 (){
var C_NPC her; her = Hlp_GetNpc(PC_Hero);
var C_NPC rock; rock = Hlp_GetNpc(PC_Rockefeller);
//***ALT** if (Hlp_GetInstanceID (self)== Hlp_GetInstanceID (Hero)) // MH: geдndert, damit kontrollierte NSCs nicht schlafen kцnnen!
if ( (Hlp_GetInstanceID(self )==Hlp_GetInstanceID(her))||(Hlp_GetInstanceID(self )==Hlp_GetInstanceID(rock)) )
{
self.aivar[AIV_INVINCIBLE]=TRUE;
PLAYER_MOBSI_PRODUCTION = MOBSI_SLEEPABIT;
Ai_ProcessInfos (her);
if (SC_IsObsessed == TRUE)
{
Wld_PlayEffect("DEMENTOR_FX" , hero , hero , 0 , 0 , 0 , FALSE );
};
};
};
Where are the
curly brackets? And in all other places
Bad
Code:
func void PC_SleepTime_Morning_Info (){
PC_Sleep (8 );
if (WANNA_RESPAWN == TRUE)
Respawn_Global ();
Wld_GetDay ();
};
Good
Code:
func void PC_SleepTime_Morning_Info (){
PC_Sleep (8 );
if (WANNA_RESPAWN == TRUE)
{
Respawn_Global ();
Wld_GetDay ();
};
};
At the very end, what did you attach extra };
Code:
func VOID PC_SleepTime_Midnight_Info(){
PC_Sleep (0) ;
if (WANNA_RESPAWN == TRUE)
Respawn_Global ();
Wld_GetDay ();
};
};//delete this curly brackets
Geändert von N1kX (19.02.2021 um 17:28 Uhr)
es funktioniert noch nicht
wie kann ich diesen respawn befehl am einfachsten einbauen ???
Spoiler:(zum lesen bitte Text markieren) //**************************** // PC_Sleep
//****************************
// PC_Sleep
//****************************
func void PC_Sleep (var int t)
{
AI_StopProcessInfos (self ); // [SK] ->muss hier stehen um das update zu gewährleisten
PLAYER_MOBSI_PRODUCTION = MOBSI_NONE;
self .aivar[AIV_INVINCIBLE]=FALSE ;
if (Wld_IsTime (00 ,00 ,t,00 ))
{
Wld_SetTime (t,00 );
}
else
{
t = t + 24 ;
Wld_SetTime (t,00 );
};
Wld_StopEffect ("DEMENTOR_FX" );
// FIXME_Nico: dauert zu lange um es vernuenftig zu machen.
// Wld_PlayEffect ("SLEEP_BLEND", hero, hero, 0, 0, 0, FALSE);
if (SC_IsObsessed == TRUE )
{
PrintScreen (PRINT_SleepOverObsessed, -1 ,-1 ,FONT_Screen,2 );
}
else
{
PrintScreen (PRINT_SleepOver, -1 ,-1 ,FONT_Screen,2 );
hero .attribute[ATR_HITPOINTS] = hero .attribute[ATR_HITPOINTS_MAX];
hero .attribute[ATR_MANA] = hero .attribute[ATR_MANA_MAX];
};
//-------- AssessEnterRoom-Wahrnehmung versenden --------
PrintGlobals (PD_ITEM_MOBSI);
Npc_SendPassivePerc (hero , PERC_ASSESSENTERROOM, NULL, hero ); //...damit der Spieler dieses Feature nicht zum Hütteplündern ausnutzt!
};
func void SLEEPABIT_S1 (){
var C_NPC her; her = Hlp_GetNpc (PC_Hero);
var C_NPC rock; rock = Hlp_GetNpc (PC_Rockefeller);
//***ALT** if (Hlp_GetInstanceID (self)== Hlp_GetInstanceID (Hero)) // MH: ge?ndert, damit kontrollierte NSCs nicht schlafen k?nnen!
if ( (Hlp_GetInstanceID (self )==Hlp_GetInstanceID (her))||(Hlp_GetInstanceID (self )==Hlp_GetInstanceID (rock)) )
{
self .aivar[AIV_INVINCIBLE]=TRUE ;
PLAYER_MOBSI_PRODUCTION = MOBSI_SLEEPABIT;
Ai_ProcessInfos (her);
if (SC_IsObsessed == TRUE )
{
Wld_PlayEffect ("DEMENTOR_FX" , hero , hero , 0 , 0 , 0 , FALSE );
};
};
};
//-------------------- Gar nicht schlafen -------------------------
INSTANCE PC_NoSleep (c_Info )
{
npc = PC_Hero;
nr = 999 ;
condition = PC_NoSleep_Condition;
information = PC_NoSleep_Info;
important = 0 ;
permanent = 1 ;
description = DIALOG_ENDE;
};
FUNC INT PC_NoSleep_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1 ;
};
};
func VOID PC_NoSleep_Info ()
{
AI_StopProcessInfos (self );
Wld_StopEffect ("DEMENTOR_FX" );
self .aivar[AIV_INVINCIBLE]=FALSE ;
PLAYER_MOBSI_PRODUCTION = MOBSI_NONE;
};
//---------------------- morgens --------------------------------------
INSTANCE PC_SleepTime_Morning (C_INFO )
{
npc = PC_Hero;
condition = PC_SleepTime_Morning_Condition;
information = PC_SleepTime_Morning_Info;
important = 0 ;
permanent = 1 ;
description = "Bis zum nächsten Morgen schlafen" ;
};
FUNC INT PC_SleepTime_Morning_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1 ;
};
};
func void PC_SleepTime_Morning_Info ()
PC_Sleep (8 );
};
//--------------------- mittags -----------------------------------------
INSTANCE PC_SleepTime_Noon (C_INFO )
{
npc = PC_Hero;
condition = PC_SleepTime_Noon_Condition;
information = PC_SleepTime_Noon_Info;
important = 0 ;
permanent = 1 ;
description = "Bis Mittags schlafen" ;
};
FUNC INT PC_SleepTime_Noon_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1 ;
};
};
func void PC_SleepTime_Noon_Info ()
{
PC_Sleep (12 );
if (WANNA_RESPAWN == TRUE )
Respawn_Global ();
Wld_GetDay ();
};
//---------------------- abend --------------------------------------
INSTANCE PC_SleepTime_Evening (C_INFO )
{
npc = PC_Hero;
condition = PC_SleepTime_Evening_Condition;
information = PC_SleepTime_Evening_Info;
important = 0 ;
permanent = 1 ;
description = "Bis zum nächsten Abend schlafen" ;
};
FUNC INT PC_SleepTime_Evening_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1 ;
};
};
func void PC_SleepTime_Evening_Info ()
{
PC_Sleep (20 );
};
//------------------------ nacht -----------------------------------------
instance PC_SleepTime_Midnight (C_INFO )
{
npc = PC_Hero;
condition = PC_SleepTime_Midnight_Condition;
information = PC_SleepTime_Midnight_Info;
important = 0 ;
permanent = 1 ;
description = "Bis Mitternacht schlafen" ;
};
FUNC INT PC_SleepTime_Midnight_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT)
{
return 1 ;
};
};
func VOID PC_SleepTime_Midnight_Info ()
{
PC_Sleep (0 );
};
Ich stelle die Frage mal so :
Möchtest du, wenn du z.B. schlafen gehst,
dass die Monster nachgespawnt werden?
Oder bist du auf etwas anderes aus?
Der Senlax war's
ein Modder-Krüppel schlecht hin
Ich habe mal das notiert was mir direkt aufgefallen ist
Ein If-Statement ohne entsprechende Klammern
Spoiler:(zum lesen bitte Text markieren)
Code:
//****************************
//****************************
// PC_Sleep
//****************************
func void PC_Sleep (var int t)
{
AI_StopProcessInfos (self ); // [SK] ->muss hier stehen um das update zu gewährleisten
PLAYER_MOBSI_PRODUCTION = MOBSI_NONE;
self .aivar[AIV_INVINCIBLE]=FALSE ;
if (Wld_IsTime (00 ,00 ,t,00 )) {
Wld_SetTime (t,00 );
} else {
t = t + 24 ;
Wld_SetTime (t,00 );
};
Wld_StopEffect ("DEMENTOR_FX" );
// FIXME_Nico: dauert zu lange um es vernuenftig zu machen.
// Wld_PlayEffect ("SLEEP_BLEND", hero, hero, 0, 0, 0, FALSE);
if (SC_IsObsessed == TRUE ) {
PrintScreen (PRINT_SleepOverObsessed, -1 ,-1 ,FONT_Screen,2 );
} else {
PrintScreen (PRINT_SleepOver, -1 ,-1 ,FONT_Screen,2 );
hero .attribute[ATR_HITPOINTS] = hero .attribute[ATR_HITPOINTS_MAX];
hero .attribute[ATR_MANA] = hero .attribute[ATR_MANA_MAX];
};
//-------- AssessEnterRoom-Wahrnehmung versenden --------
PrintGlobals (PD_ITEM_MOBSI);
Npc_SendPassivePerc (hero , PERC_ASSESSENTERROOM, NULL, hero ); //...damit der Spieler dieses Feature nicht zum Hütteplündern ausnutzt!
};
func void SLEEPABIT_S1 (){
var C_NPC her; her = Hlp_GetNpc (PC_Hero);
var C_NPC rock; rock = Hlp_GetNpc (PC_Rockefeller);
//***ALT** if (Hlp_GetInstanceID (self)== Hlp_GetInstanceID (Hero)) // MH: ge?ndert, damit kontrollierte NSCs nicht schlafen k?nnen!
if ((Hlp_GetInstanceID (self )==Hlp_GetInstanceID (her))
|| (Hlp_GetInstanceID (self )==Hlp_GetInstanceID (rock)))
{
self .aivar[AIV_INVINCIBLE]=TRUE ;
PLAYER_MOBSI_PRODUCTION = MOBSI_SLEEPABIT;
Ai_ProcessInfos (her);
if (SC_IsObsessed == TRUE ) {
Wld_PlayEffect ("DEMENTOR_FX" , hero , hero , 0 , 0 , 0 , FALSE );
};
};
};
//-------------------- Gar nicht schlafen -------------------------
INSTANCE PC_NoSleep (c_Info )
{
npc = PC_Hero;
nr = 999 ;
condition = PC_NoSleep_Condition;
information = PC_NoSleep_Info;
important = 0 ;
permanent = 1 ;
description = DIALOG_ENDE;
};
FUNC INT PC_NoSleep_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT) {
return 1 ;
};
};
func VOID PC_NoSleep_Info ()
{
AI_StopProcessInfos (self );
Wld_StopEffect ("DEMENTOR_FX" );
self .aivar[AIV_INVINCIBLE]=FALSE ;
PLAYER_MOBSI_PRODUCTION = MOBSI_NONE;
};
//---------------------- morgens --------------------------------------
INSTANCE PC_SleepTime_Morning (C_INFO )
{
npc = PC_Hero;
condition = PC_SleepTime_Morning_Condition;
information = PC_SleepTime_Morning_Info;
important = 0 ;
permanent = 1 ;
description = "Bis zum nächsten Morgen schlafen" ;
};
FUNC INT PC_SleepTime_Morning_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT) {
return 1 ;
};
};
func void PC_SleepTime_Morning_Info ()
PC_Sleep (8 );
};
//--------------------- mittags -----------------------------------------
INSTANCE PC_SleepTime_Noon (C_INFO )
{
npc = PC_Hero;
condition = PC_SleepTime_Noon_Condition;
information = PC_SleepTime_Noon_Info;
important = 0 ;
permanent = 1 ;
description = "Bis Mittags schlafen" ;
};
FUNC INT PC_SleepTime_Noon_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT) {
return 1 ;
};
};
func void PC_SleepTime_Noon_Info ()
{
PC_Sleep (12 );
- \/ -------------------- \/ -
if (WANNA_RESPAWN == TRUE )
Respawn_Global ();
Wld_GetDay ();
};
//---------------------- abend --------------------------------------
INSTANCE PC_SleepTime_Evening (C_INFO )
{
npc = PC_Hero;
condition = PC_SleepTime_Evening_Condition;
information = PC_SleepTime_Evening_Info;
important = 0 ;
permanent = 1 ;
description = "Bis zum nächsten Abend schlafen" ;
};
FUNC INT PC_SleepTime_Evening_Condition () {
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT) {
return 1 ;
};
};
func void PC_SleepTime_Evening_Info () {
PC_Sleep (20 );
};
//------------------------ nacht -----------------------------------------
instance PC_SleepTime_Midnight (C_INFO )
{
npc = PC_Hero;
condition = PC_SleepTime_Midnight_Condition;
information = PC_SleepTime_Midnight_Info;
important = 0 ;
permanent = 1 ;
description = "Bis Mitternacht schlafen" ;
};
FUNC INT PC_SleepTime_Midnight_Condition ()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_SLEEPABIT) {
return 1 ;
};
};
func VOID PC_SleepTime_Midnight_Info () {
PC_Sleep (0 );
};
es ist ein respawn mod der über bosper eingeschaltet wir da hatte mir jemand die rohdaten geschickt nur
die sleep datei muss ich selber schreiben......
Berechtigungen
Neue Themen erstellen: Nein
Themen beantworten: Nein
Anhänge hochladen: Nein
Beiträge bearbeiten: Nein