Otóż sporządzony został jak narazie prosty skrypt 'gry w kości' oto on:
///////////////////////////////////////////////////////
////////////// EXIT
///////////////////////////////////////////////////////
instance Dia_Hazardzista_EXIT (C_INFO)
{
npc = NON_0090089_Hazardzista;
nr = 999
condition = Dia_Hazardzista_EXIT_condition;
information = Dia_Hazardzista_EXIT_info;
permanent = TRUE;
description = DIALOG_ENDE;
};
FUNC int Dia_Hazardzista_EXIT_condition()
{
return TRUE;
};
FUNC VOID DIA_Hazardzista_EXIT_info()
{
AI_StopProcessInfos (self);
};
var int zmienna;
///////////////////////////////////////////////////////
////////////// Hazard21
///////////////////////////////////////////////////////
instance Dia_Hazardzista_Hazard21 (C_INFO)
{
npc = NON_0090089_Hazardzista;
nr = 1;
condition = Dia_Hazardzista_Hazard21_condition;
information = Dia_Hazardzista_Hazard21_info;
permanent = TRUE;
important = FALSE;
description = "Grasz w kości?";
};
FUNC int Dia_Hazardzista_Hazard21_condition()
{
return TRUE;
};
FUNC VOID DIA_Hazardzista_Hazard21_info()
{
AI_Output (other,self,"DIA_Hazardzista_Hazard21_1_01"); //Grasz w kości?
AI_Output (self, other,"DIA_Hazardzista_Hazard21_1_02"); //Tak. Jeżeli chcesz to zagramy.
Info_ClearChoices (DIA_Hazardzista_Hazard21);
Info_Addchoice (DIA_Hazardzista_Hazard21,"Nie dzięki.",DIA_Hazardzista_Hazard21_bayaby);
Info_Addchoice (DIA_Hazardzista_Hazard21,"Pewnie!",DIA_Hazardzista_Hazard21_YESYESJUP);
};
func void DIA_Hazardzista_Hazard21_bayaby()
{
AI_Output (other,self,"DIA_Hazardzista_Hazard21_2_01"); //Nie dzięki.
AI_Output (self, other,"DIA_Hazardzista_Hazard21_2_02"); //Wiedziałem że zrobisz w gacie i stchórzysz.
AI_StopProcessInfos (self);
Info_ClearChoices (DIA_Hazardzista_Hazard21);
};
func void DIA_Hazardzista_Hazard21_YESYESJUP()
{
AI_Output (other,self,"DIA_Hazardzista_Hazard21_3_01"); //Pewnie!
AI_Output (self, other,"DIA_Hazardzista_Hazard21_3_02"); //Dobra. Zasady są takie:
AI_Output (self, other,"DIA_Hazardzista_Hazard21_3_03"); //Po pierwsze: Płacisz 20 bryłek.
AI_Output (self, other,"DIA_Hazardzista_Hazard21_3_04"); //Po drugie: jak wypadnie powyżej 4 oczek przegrywasz ,a jak niżej wygrywasz
Info_ClearChoices (DIA_Hazardzista_Hazard21);
};
///////////////////////////////////////////////////////
////////////// kiscan
///////////////////////////////////////////////////////
instance Dia_Hazardzista_kiscan (C_INFO)
{
npc = NON_0090089_Hazardzista;
nr = 4;
condition = Dia_Hazardzista_kiscan_condition;
information = Dia_Hazardzista_kiscan_info;
permanent = TRUE;
important = FALSE;
description = "(Rzuć koścmi)";
};
FUNC int Dia_Hazardzista_kiscan_condition()
{
IF (Npc_KnowsInfo(hero, Dia_Hazardzista_Hazard21))
{
return TRUE;
};
};
FUNC VOID DIA_Hazardzista_kiscan_info()
{
Zmienna = Hlp_Random (9);
if (Zmienna <= 4)
AI_Output (other,self,"DIA_Hazardzista_kiscan_1_01"); //(Rzuć koścmi)
AI_Output (other,self,"DIA_Hazardzista_kiscan_1_02"); //HA! Jest poniżej 4 oczek ruda jest moja!
AI_Output (self,other,"DIA_Hazardzista_kiscan_1_03"); //Cholera. Zagraj jeszcze kiedyś.
CreateInvItem (self, itminugget, 20);
B_GiveInvItems (self, hero, itminugget, 20);
};
else if (Zmienna > 4)
{
AI_Output (self, other,"DIA_Hazardzista_kiscan_1_04"); //Hehe wygrałem dawaj moją rude!
AI_Output (other,self,"DIA_Hazardzista_kiscan_1_05"); //Kurwa. Masz.
B_GiveInvItems (hero, self, itminugget, 20);
};
else if (Npc_HasItems(other,itminugget)>=20)
{
AI_Output (self, other,"DIA_Hazardzista_kiscan_1_06"); //Uważasz że jestem głupi? Nie masz 20 bryek rudy głupcze!
AI_StopProcessInfos (self);
};
Podczas repreasowania pojawia się błąd w 96 linijce
A dokładnie to brzmi on: U:PAR: Expected '{' (line 96)
wie ktoś może o co bliżej chodzi?
to musi być gdzieś tu:
Zmienna = Hlp_Random (9);
if (Zmienna <= 4)
AI_Output (other,self,"DIA_Hazardzista_kiscan_1_01"); //(Rzuć koścmi)
AI_Output (other,self,"DIA_Hazardzista_kiscan_1_02"); //HA! Jest poniżej 4 oczek ruda jest moja!
AI_Output (self,other,"DIA_Hazardzista_kiscan_1_03"); //Cholera. Zagraj jeszcze kiedyś.