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
|
// TMW-2 Script
// Author:
// Jesusalva
// Description:
// Contraband of foreing goods.
015-2,166,250,0 script #Contraband NPC_NO_SPRITE,{
// Store not available
if (!.active)
end;
openshop;
close;
/*
function Contraband_Unload {
if ($ARKIM_ST > 7500)
stopselling(DarkDesertMushroom);
if (getarg(0,0) & 1)
stopselling(IronOre);
if (getarg(0,0) & 2)
stopselling(TitaniumOre);
if (getarg(0,0) & 4)
stopselling(LeatherPatch);
if (getarg(0,0) & 8)
stopselling(GoldenPearlRing);
if (getarg(0,0) & 16)
stopselling(ThornArrow);
if (getarg(0,0) & 32)
stopselling(StrangeCoin);
if (getarg(0,0) & 64)
stopselling(CasinoCoins);
if (getarg(0,0) & 128)
stopselling(RawLog);
return;
}
function Contraband_Load {
.DDMPrice=max(30000,50000-($ARKIM_ST/2)+(7500/2));
if ($ARKIM_ST > 7500)
sellitem DarkDesertMushroom, .DDMPrice, 1;
if (getarg(0,0) & 1)
sellitem IronOre, 2900, 1;
if (getarg(0,0) & 2)
sellitem TitaniumOre, 4900, 1;
if (getarg(0,0) & 4)
sellitem LeatherPatch, 3200, 1;
if (getarg(0,0) & 8)
sellitem GoldenPearlRing, 1000000, 1;
if (getarg(0,0) & 16)
sellitem ThornArrow, -1, 3;
if (getarg(0,0) & 32)
sellitem StrangeCoin, rand(400,5000), 1;
if (getarg(0,0) & 64)
sellitem CasinoCoins, rand(100,3000), 1;
if (getarg(0,0) & 128)
sellitem RawLog, 1950, 1;
return;
}
OnInit:
.active=0;
.sex = G_OTHER;
.distance = 12;
.CurrentValue=255;
if (debug) {
setnpcdisplay .name$, NPC_KOGA;
.active=1;
}
tradertype(NST_MARKET);
sellitem Arrow, -1, 1;
end;
OnMinute21:
OnMinute46:
setnpcdisplay .name$, NPC_KOGA;
.active=1;
.CurrentValue=rand(1,255);
Contraband_Load(.CurrentValue);
end;
OnMinute23:
OnMinute48:
setnpcdisplay .name$, NPC_NO_SPRITE;
.active=0;
Contraband_Unload(.CurrentValue);
end;
*/
OnInit:
.active=0;
.sex = G_OTHER;
.distance = 12;
if (debug) {
setnpcdisplay .name$, NPC_KOGA;
.active=1;
}
tradertype(NST_MARKET);
sellitem Arrow, -1, 1;
end;
}
|