1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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.
test,2,6,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;
}
|