summaryrefslogtreecommitdiff
path: root/npc/test/rock.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/test/rock.txt')
-rw-r--r--npc/test/rock.txt173
1 files changed, 173 insertions, 0 deletions
diff --git a/npc/test/rock.txt b/npc/test/rock.txt
new file mode 100644
index 000000000..967e5b9e4
--- /dev/null
+++ b/npc/test/rock.txt
@@ -0,0 +1,173 @@
+// Evol scripts.
+// Author:
+// Reid
+// Description:
+// Blacksmith's assistant of Artis
+// Variables:
+// ArtisQuests_Enora
+// Values:
+// 0 Default.
+// 1 BlackSmith quest delivered.
+// 2 Chelios Quest given.
+// 3 Chelios Quest done.
+// 4 BlackSmith gave the sword.
+
+001-1,88,114,0 script rock NPC_PLAYER,{
+
+ function quest_play {
+ mes l("Before start witch item do you want to play");
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
+
+ .item = requestitem();
+ if (.item < 1)
+ {
+ mes l("You didn't add a item.");
+ close;
+ }
+
+ if (countitem(.item) < 1)
+ {
+ mes l("You don't have the item.");
+ close;
+ }
+ delitem .item, 1;
+ goto quest_choose;
+ }
+
+ function quest_game {
+ if (.choose == 1){
+ mes l("you choose rock.");
+ next;
+ }
+ else if (.choose == 2){
+ mes l("you choose scissors.");
+ next;
+ }
+ else {
+ mes l("you choose paper.");
+ next;
+ }
+
+ .npcChoose = rand(3);
+ if (.npcChoose == 0)
+ {
+ mes l("the npc choose rock.");
+ next;
+ if (.choose == 1)
+ {
+ mes l("draw.");
+ goto quest_choose;
+ }
+ else if (.choose == 2)
+ {
+ mes l("you lose");
+ close;
+ }
+ else if (.choose == 3)
+ {
+ mes l("you win");
+ getitem .item, 2;
+ close;
+ }
+ }
+ else if (.npcChoose == 1)
+ {
+ mes l("the npc choose scissors.");
+ next;
+ if (.choose == 2)
+ {
+ mes l("draw.");
+ goto quest_choose;
+ }
+ else if (.choose == 3)
+ {
+ mes l("you lose");
+ close;
+ }
+ else if (.choose == 1)
+ {
+ mes l("you win @@",getitemlink(.item));
+ getitem .item, 2;
+ close;
+ }
+ }
+ else if (.npcChoose == 2)
+ {
+ mes l("the npc choose paper.");
+ next;
+ if (.choose == 3)
+ {
+ mes l("draw.");
+ goto quest_choose;
+ }
+ else if (.choose == 1)
+ {
+ mes l("you lose");
+ close;
+ }
+ else if (.choose == 2)
+ {
+ mes l("you win");
+ getitem .item, 2;
+ close;
+ }
+ }
+ close;
+ }
+
+
+ function quest_choose {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("What do you choose?");
+ next;
+ do
+ {
+ select
+ l("Rock"),
+ l("Scissors"),
+ l("Paper");
+
+ switch (@menu)
+ {
+ case 1:
+ .choose = 1;
+ quest_game;
+ break;
+ case 2:
+ .choose = 2;
+ quest_game;
+ break;
+ case 3:
+ .choose = 3;
+ quest_game;
+ break;
+ }
+ } while (@menu != 4);
+ close;
+ }
+
+ speech S_LAST_NEXT, l("Hello do you want to play rock scissors paper?");
+ do
+ {
+ select
+ l("Hello"),
+ menuaction(l("Quit"));
+
+ switch (@menu)
+ {
+ case 1:
+ quest_play;
+ break;
+ }
+ } while (@menu != 2);
+
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 3;
+ end;
+}
+