Siema. Od roku nie tykałem Goticzka i zapomniałem dość sporo rzeczy z moddingu, więc zakładam ten temat. A mianowicie, co zrobić, żeby po wyborze miejsce, gdzie się teleportuję, wyskoczył napis typu "Przeteleportowano do Xardasa"? Teoretycznie zrobiłem funkcję, która powinna to aktywować, ale tego nie robi(albo coś, co powinno w teorii działać). Tutaj podaję skrypty runy i skrypty związane z teleportacją(komunikat o odblokowaniu miejsca do teleportacji działa normalnie).
Skrypt runySpoiler
INSTANCE ItRu_MultiTeleport (C_Item)
{
name = "Łączna teleportacja w Khorinis";
mainflag = ITEM_KAT_RUNE;
flags = 0;
value = 10;
visual = "ItRu_TeleportSeaport.3ds";
material = MAT_STONE;
spell = SPL_Multi;
wear = WEAR_EFFECT;
effect = "SPELLFX_WEAKGLIMMER";
description = name;
TEXT [1] = NAME_Manakosten;
COUNT [1] = SPL_Cost_MultiTeleport;
TEXT [5] = NAME_Value;
COUNT [5] = value;
};
Skrypt czaruSpoiler
// ********************
// Multi teleport
// ********************
const int SPL_Cost_MultiTeleport = 5;
// ****************************************
// Zła runa kolego
// ****************************************
func void D_PrintTeleportTooFarAway (var int MojPoziom)
{
if (MojPoziom != CurrentLevel)
{
PrintScreen (PRINT_TeleportTooFarAway ,-1,YPOS_LevelUp,FONT_ScreenSmall,2);
};
};
// ------ Rzucanie czaru ------
func int Spell_Logic_MultiTeleport (var int manaInvested)
{
if (Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll))
{
return SPL_SENDCAST;
}
else if (self.attribute[ATR_MANA] >= SPL_Cost_MultiTeleport)
{
return SPL_SENDCAST;
};
return SPL_NEXTLEVEL;
};
func void Spell_Cast_MultiTeleport()
{
D_PrintTeleportTooFarAway (NEWWORLD_ZEN);
if (Npc_GetActiveSpellIsScroll(self))
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Scroll;
}
else
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_MultiTeleport;
};
teleportacja();
AI_PlayAni (self, "T_HEASHOOT_2_STAND" );
};
Skrypt z napisem odblokowującym teleportacjęSpoiler
FUNC INT D_Teleportujemy()
{
if(Npc_GetDistToWP(hero,"NW_XARDAS_TOWER_PATH_01_B") < 500)
&&(XardasNekromanta == FALSE)
{
PrintScreen("Teleportacja do Xardasa odblokowana",-1,-1,"font_old_20_white.tga",3);
XardasNekromanta = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_TAVERNE_05") < 500)
&& (OrlanTeleport == FALSE)
{
PrintScreen("Teleportacja do tawerny Orlana odblokowana",-1,-1,"font_old_20_white.tga",3);
OrlanTeleport = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_CITY_BEER_05") < 500)
&& (PiwoTeleport == FALSE)
{
PrintScreen("Teleportacja do placu piwnego odblokowana",-1,-1,"font_old_20_white.tga",3);
PiwoTeleport = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_TO_PASS_01") < 500)
&& (PrzeleczTeleport == FALSE)
{
PrintScreen("Teleportacja na przełęcz odblokowana",-1,-1,"font_old_20_white.tga",3);
PrzeleczTeleport = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_BIGFARM_PATH_03") < 500)
&& (NajemnikTeleport == FALSE)
{
PrintScreen("Teleportacja do najemników odblokowana",-1,-1,"font_old_20_white.tga",3);
NajemnikTeleport = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_BIGFARM_HUT_02") < 500)
&& (ErolTeleport == FALSE)
{
PrintScreen("Teleportacja do chaty Erola odblokowana",-1,-1,"font_old_20_white.tga",3);
ErolTeleport = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_FARM3_PATH_01") < 500)
&& (BengarTeleport == FALSE)
{
PrintScreen("Teleportacja na farmę Bengara odblokowana",-1,-1,"font_old_20_white.tga",3);
BengarTeleport = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_CASTLEMINE_PATH_03") < 500)
&& (DexterTeleport == FALSE)
{
PrintScreen("Teleportacja do wieży Dextera odblokowana",-1,-1,"font_old_20_white.tga",3);
DexterTeleport = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_MONASTERY_ENTRY_01") < 500)
&& (KlasztorTeleport == FALSE)
{
PrintScreen("Teleportacja do klasztoru odblokowana",-1,-1,"font_old_20_white.tga",3);
KlasztorTeleport = TRUE;
}
else if (Npc_GetDistToWP(hero,"NW_TROLLAREA_PORTALTEMPEL_40") < 500)
&& (PiramidyTeleport == FALSE)
{
PrintScreen("Teleportacja do piramid odblokowana",-1,-1,"font_old_20_white.tga",3);
PiramidyTeleport = TRUE;
};
};
Ostatni skrypt - co powinno pisać po teleportowaniu się + działająca teleportacja(czyli nie działają tylko napisy)Spoiler
var int placteleportacyjny;
func void MultiTeleport()
{
if(PLACTELEPORTACYJNY == 1)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_CASTLEMINE_PATH_03");
PLACTELEPORTACYJNY = 0;
PrintScreen("Wieża Dextera!",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 2)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_FARM3_PATH_01");
PLACTELEPORTACYJNY = 0;
PrintScreen("Właścicielem farmy jest Bengar!",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 3)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_BIGFARM_HUT_02");
PLACTELEPORTACYJNY = 0;
PrintScreen("Nie zapomnij porozmawiać z Busterem!",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 4)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_BIGFARM_PATH_03");
PLACTELEPORTACYJNY = 0;
PrintScreen("Witamy na farmie Onara!",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 5)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_TO_PASS_01");
PLACTELEPORTACYJNY = 0;
PrintScreen("Uważaj, ten teren jest niebezpieczny!",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 6)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_CITY_BEER_05");
PLACTELEPORTACYJNY = 0;
PrintScreen("Nie zapomnij odebrać darmowego piwa!",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 7)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_TAVERNE_05");
PLACTELEPORTACYJNY = 0;
PrintScreen("Orlan zaprasza do swej tawerny!",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 8)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_XARDAS_TOWER_PATH_01_B");
PLACTELEPORTACYJNY = 0;
PrintScreen("Nekromanta czeka",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 9)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_MONASTERY_ENTRY_01");
PLACTELEPORTACYJNY = 0;
PrintScreen("Innosie obdarz mnie swą łaską!",-1,-1,"font_old_20_white.tga",3);
}
else if(PLACTELEPORTACYJNY == 10)
{
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_Teleport(hero,"NW_TROLLAREA_PORTALTEMPEL_40");
PLACTELEPORTACYJNY = 0;
PrintScreen("Te piramidy kryją wiele tajemnic!",-1,-1,"font_old_20_white.tga",3);
};
};
func void teleportacja()
{
if (Npc_IsPlayer(hero))
{
PLAYER_MOBSI_PRODUCTION = MOBSI_TELEPORT;
self.aivar[AIV_INVINCIBLE] = FALSE;
AI_ProcessInfos(hero);
};
};
instance NOTELEPORT(C_Info)
{
npc = PC_Hero;
nr = 1;
condition = noteleport_condition;
information = noteleport_info;
important = 0;
permanent = 1;
description = DIALOG_ENDE;
};
func int noteleport_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
{
return 1;
};
};
func void noteleport_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 0;
};
instance TOBANDIT(C_Info)
{
npc = PC_Hero;
condition = tobandit_condition;
information = tobandit_info;
important = 0;
permanent = 1;
description = "Bandyci Dextera";
};
func int tobandit_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (DexterTeleport == TRUE)
{
return 1;
};
};
func void tobandit_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 1;
MultiTeleport();
};
instance TOBENGAR(C_Info)
{
npc = PC_Hero;
condition = tobengar_condition;
information = tobengar_info;
important = 0;
permanent = 1;
description = "Do Bengara";
};
func int tobengar_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (BengarTeleport == TRUE)
{
return 1;
};
};
func void tobengar_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 2;
MultiTeleport();
};
instance TOBUSTER(C_Info)
{
npc = PC_Hero;
condition = tobuster_condition;
information = tobuster_info;
important = 0;
permanent = 1;
description = "Do Bustera";
};
func int tobuster_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (ErolTeleport == TRUE)
{
return 1;
};
};
func void tobuster_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 3;
MultiTeleport();
};
instance TOONARFARM(C_Info)
{
npc = PC_Hero;
condition = toonarfarm_condition;
information = toonarfarm_info;
important = 0;
permanent = 1;
description = "Farma Onara";
};
func int toonarfarm_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (NajemnikTeleport == TRUE)
{
return 1;
};
};
func void toonarfarm_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 4;
MultiTeleport();
};
instance TOWAYOLDWORLD(C_Info)
{
npc = PC_Hero;
condition = towayoldworld_condition;
information = towayoldworld_info;
important = 0;
permanent = 1;
description = "Przełęcz Khorinis";
};
func int towayoldworld_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (PrzeleczTeleport == TRUE)
{
return 1;
};
};
func void towayoldworld_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 5;
MultiTeleport();
};
instance TOMARKETPLACE(C_Info)
{
npc = PC_Hero;
condition = tomarketplace_condition;
information = tomarketplace_info;
important = 0;
permanent = 1;
description = "Browar";
};
func int tomarketplace_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (PiwoTeleport == TRUE)
{
return 1;
};
};
func void tomarketplace_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 6;
MultiTeleport();
};
instance TOTAVERNE(C_Info)
{
npc = PC_Hero;
condition = totaverne_condition;
information = totaverne_info;
important = 0;
permanent = 1;
description = "Tawerna";
};
func int totaverne_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (OrlanTeleport == TRUE)
{
return 1;
};
};
func void totaverne_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 7;
MultiTeleport();
};
instance TOXARDAS(C_Info)
{
npc = PC_Hero;
condition = toxardas_condition;
information = toxardas_info;
important = 0;
permanent = 1;
description = "Nekromanta";
};
func int toxardas_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (XardasNekromanta == TRUE)
{
return 1;
};
};
func void toxardas_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 8;
MultiTeleport();
};
instance TOMONASTERY(C_Info)
{
npc = PC_Hero;
condition = tomonastery_condition;
information = tomonastery_info;
important = 0;
permanent = 1;
description = "Do klasztoru Innosa";
};
func int tomonastery_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (KlasztorTeleport == TRUE)
{
return 1;
};
};
func void tomonastery_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 9;
MultiTeleport();
};
instance TOWATERMAGE(C_Info)
{
npc = PC_Hero;
condition = towatermage_condition;
information = towatermage_info;
important = 0;
permanent = 1;
description = "Do piramid";
};
func int towatermage_condition()
{
if (PLAYER_MOBSI_PRODUCTION == MOBSI_TELEPORT)
&& (PiramidyTeleport == TRUE)
{
return 1;
};
};
func void towatermage_info()
{
AI_StopProcessInfos(hero);
PLACTELEPORTACYJNY = 10;
MultiTeleport();
};
Jeśli czegoś zapomniałem dodać to piszcie. Z góry dzięki za pomoc, bo trochę mnie to męczy, a chciałbym coś sobie znowu popsuć xD