class ai_enter_zaken : citizen
{
parameter:
int Day_InstantZone_ID = 133;
int Day_EnterType_P = 1;
int Day_EnterType_M = 2;
int Night_InstantZone_ID = 114;
int Night_EnterType = 2;
int Day_83_InstantZone_ID = 135;
handler:
EventHandler
SEE_CREATURE(creature)
{
SendUIEvent();
}
EventHandler
MENU_SELECTED(talker, ask, reply, i0, i1, c0, party0)
{
if(ask == -2124001)
{
if(reply == 1)
{
if(myself.Pledge_GetLeader(talker) < 1)
{
party0 = gg.GetParty(talker);
gg.Announce(party0);
if(0)
{
c0 = myself.GetLeaderOfParty(gg.GetParty(talker));
if(talker == c0)
{
myself.InstantZone_Enter(talker, Day_InstantZone_ID, Day_EnterType_P);
return;
}
else
{
myself.ShowPage(talker, "zaken_enter001a.htm");
}
}
else
{
myself.ShowPage(talker, "zaken_enter001b.htm");
}
}
else
{
i0 = myself.Pledge_GetLeader(talker);
c0 = myself.MPCC_GetMaster(i0);
if(talker == c0)
{
myself.InstantZone_Enter(talker, Day_InstantZone_ID, Day_EnterType_M);
return;
}
else
{
myself.ShowPage(talker, "zaken_enter001c.htm");
}
}
}
else if(reply == 2)
{
i0 = myself.Pledge_GetLeader(talker);
c0 = myself.MPCC_GetMaster(i0);
myself.InstantZone_Enter(talker, Night_InstantZone_ID, Night_EnterType);
if(talker == c0)
{
i1 = myself.MPCC_GetPartyCount(i0);
if(i1 < 7)
{
myself.ShowPage(talker, "zaken_enter001d.htm");
}
}
else
{
myself.ShowPage(talker, "zaken_enter001c.htm");
}
}
else if(reply == 3)
{
if((talker + 2872) == 135)
{
myself.InstantZone_Enter(talker, (talker + 2872), 0);
return;
}
if(myself.Pledge_GetLeader(talker) < 1)
{
party0 = gg.GetParty(talker);
gg.Announce(party0);
if(0)
{
c0 = myself.GetLeaderOfParty(gg.GetParty(talker));
if(talker == c0)
{
myself.InstantZone_Enter(talker, Day_83_InstantZone_ID, Day_EnterType_P);
return;
}
else
{
myself.ShowPage(talker, "zaken_enter001a.htm");
}
}
else
{
myself.ShowPage(talker, "zaken_enter001b.htm");
}
}
else
{
i0 = myself.Pledge_GetLeader(talker);
c0 = myself.MPCC_GetMaster(i0);
if(talker == c0)
{
myself.InstantZone_Enter(talker, Day_83_InstantZone_ID, Day_EnterType_M);
return;
}
else
{
myself.ShowPage(talker, "zaken_enter001c.htm");
}
}
}
}
}
}