PDA

View Full Version : [Share] Gatekeeper Ziggurat NASC (quest+teleport)


Aikeleer
19.04.2006, 22:21
class gatekeper_catacombs : citizen
{
parameter:
int x = 1;
int y = 1;
int z = 1;

handler:
EventHandler MENU_SELECTED(talker, ask, reply, i0)
{
if(ask ==385)
{
if(reply == 0 && talker.level < 20)
{
ShowPage(talker, "enter_catacombs_q0385_03.htm");
}
else if(reply == 0 && talker.level > 19)
{
ShowPage(talker, "enter_catacombs_q0385_01.htm");
}
else if((reply == 0) && (HaveMemo(talker, @joke_of_the_past)))
{
ShowPage(talker, "enter_catacombs_q0385_04.htm");
}
else if((reply == 1) && (HaveMemo(talker, @joke_of_the_past)))
{
SetMemoState(talker, @joke_of_the_past, 1);
ShowPage(talker, "enter_catacombs_q0385_05.htm");
}
else if((reply == 2) && (HaveMemo(talker, @joke_of_the_past)) && OwnItemCount(talker, @q_scroll_of_ancient_magic >= 1))
{
i0 = OwnItemCount(talker, @q_scroll_of_ancient_magic);
GiveItem1(talker, @q_blank_scrl, i0);
DeleteItem1(talker, @q_scroll_of_ancient_magic, i0);
ShowPage(talker, "enter_catacombs_q0385_06.htm");
}
}
else
{
InstantTeleport(talker, x, y, z);
}
}

EventHandler QUEST_ACCEPTED(quest_id, talker)
{
if ( quest_id==@joke_of_the_past)
{
talker.quest_last_reward_time = 0;
SetMemo(talker, @joke_of_the_past);
SoundEffect(talker, "ItemSound.quest_accept");
ShowPage(talker, "enter_catacombs_q0385_02.htm");
return;
}
super;
}

}It's not hard to figure out the htmls etc. ;) Have fun

m4rk
19.04.2006, 23:18
the htms were shared by me somewhere in this forum i think (all except one)

Aikeleer
19.04.2006, 23:26
Ok, little guide
enter_catacombs_q0385_01.htm : Introduction to the quest, you are > level 20
enter_catacombs_q0385_02.htm : Accepted the quest
enter_catacombs_q0385_03.htm : You're too low level to participate in this quest
enter_catacombs_q0385_04.htm : You came back and ask again about the quest
enter_catacombs_q0385_05.htm : You decided to end the quest
enter_catacombs_q0385_06.htm : traded in the scrolls of ancient magic for blank scrolls

Eanae
20.04.2006, 01:00
You have no idea the irony behind your sharing this today. ._.

Kenster
20.04.2006, 01:54
Eanae, Mine is better, 100% correct with correct sounds/links/ideas/rates. My work is always 100% perfect, or I re-do it.

Aikeleer
20.04.2006, 07:02
What would a few different links matter? The player won't see the difference between ask=385&reply=5 and ask=385&reply=6. 2 lines or so and this code is the same as retail's.

kgptzac
22.04.2006, 01:37
does this work with seven sign system (where the lost side won't be able to enter the cata/necro)?

m4rk
22.04.2006, 01:44
does this work with seven sign system (where the lost side won't be able to enter the cata/necro)?
Well you should add a item checker in the nasc code, and change the item required depending on wich side has won...

Eanae
22.04.2006, 03:20
Found an issue with your AI. You didn't include a check to make sure the player has less then 16 quests.

Aikeleer
22.04.2006, 08:57
Use this code, it's the V2: class exit_catacomb : citizen
{
parameter:
int x = 1;
int y = 1;
int z = 1;

handler:
EventHandler TALK_SELECTED(talker, i0)
{
if (HaveMemo(talker, @joke_of_the_past))
{
i0 = OwnItemCount(talker, @q_scroll_of_ancient_magic);
if (i0 < 1)
{
ShowPage(talker, "exit_catacomb_q0385_08.htm");
return;
}
GiveItem1(talker, @q_blank_scrl, i0);
DeleteItem1(talker, @q_scroll_of_ancient_magic, i0);
ShowPage(talker, "exit_catacomb_q0385_07.htm");
SoundEffect(talker, "ItemSound.quest_finish");
}
else
{
if (GetMemoCount(talker)<15)
{
ShowPage(talker, "exit_catacomb_q0385_01.htm");
}
else
{
ShowPage(talker,"fullquest.htm");
}
}
}

EventHandler MENU_SELECTED(talker, ask, reply, i0)
{
if(ask ==385)
{
if ((reply == 1) && talker.level < 20)
{
ShowPage(talker, "exit_catacomb_q0385_09.htm");
}
else if((talker.level > 19) && reply == 1)
{
ShowPage(talker, "exit_catacomb_q0385_02.htm");
}
else if((reply == 3) && (HaveMemo(talker, @joke_of_the_past)))
{
RemoveMemo(talker, @joke_of_the_past);
ShowPage(talker, "exit_catacomb_001.htm");
}
}
else
{
InstantTeleport(talker, x, y, z);
}

}

EventHandler QUEST_ACCEPTED(quest_id, talker)
{
if (quest_id==@joke_of_the_past && GetMemoCount(talker)<15)
{
talker.quest_last_reward_time = 0;
SetMemo(talker, @joke_of_the_past);
SoundEffect(talker, "ItemSound.quest_accept");
ShowPage(talker, "exit_catacomb_q0385_05.htm");
return;
}
super;
}
}