viewing paste Refine++ | Athena
Posted on the
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
| //Update 2012/06/24 - 13:21
//Author Goddameit
//Web http://goo.gl/m1dHu
prontera,155,180,4 script Refine++ 990,{
set .Scroll,7199;//'Protection Scroll' item id
set .back,1;
//when use 'Protection Scroll'
//-1,-2,-3... -->back to level 1,2,3...(MAX:10) if refine fail
//1,2,3... --> reduce level 1,2,3.... if refine fail
set @use2,0;
set @rate,0;
set @typr,0;
set @menu2,0;
set @use3,0;
function CHose ;
function nZeny
{
switch(getequipweaponlv(getarg(0)))
{
case 1:
return 500;
case 2:
return 2000;
case 0:
case 3:
case 4:
return 5000;
}
}
function nItem
{
if(getarg(1)==1){
switch(getequipweaponlv(getarg(0)))
{
case 0:
return 985;
case 1:
return 1010;
case 2:
return 1011;
case 3:
case 4:
return 984;
}
}else{
switch(getequipweaponlv(getarg(0)))
{
case 0:
return 6241;
case 1:
case 2:
case 3:
case 4:
return 6240;
}
}
}
function nRate
{
function aRate
{
return getarg(getarg(0)+1);
}
switch(getequipweaponlv(getarg(0)))
{
case 0:
return aRate(getarg(1),
100,100,100,100,60,
40,40,20,20,10,
50,30,20,10,10,
10,10,10,10,10);
case 1:
return aRate(getarg(1),
100,100,100,100,100,
100,100,60,40,20,
70,70,50,50,30,
30,20,20,10,10);
case 2:
return aRate(getarg(1),
100,100,100,100,100,
100,60,40,20,20,
70,50,50,30,30,
20,20,10,10,10);
case 3:
return aRate(getarg(1),
100,100,100,100,100,
60,50,20,20,20,
50,50,30,30,20,
20,10,10,10,10);
case 4:
return aRate(getarg(1),
100,100,100,100,60,
40,40,20,20,10,
50,30,30,20,20,
10,10,10,10,10);
}
}
function sRater {
mes "[Successful rate]["+set(@rate,(nRate(@typr,getequiprefinerycnt(@typr))+(@use2>6000?10:0)))+"%]";
return;
}
if(select("Refine","Close")==2)
close;
set @typr,select(getequipname(1),getequipname(2),getequipname(3),getequipname(4),getequipname(5),getequipname(6));
callsub OnCon;
sRater;
if(select("Refine now","Don't refine")==2)
close;
callsub OnCon2;
OnCon:
if(!getequipisenableref(@typr))
{
mes "I can't refine this !...";
close;
}
if(getequiprefinerycnt(@typr)>=20)
{
mes "it's not possible to refine this better than +20.";
close;
}
if(Zeny<nZeny(@typr))
{
mes "your Zeny is lower than "+nZeny(@typr)+".";
close;
}
if( @use3 )
{
if( !countitem(@use3) )
{
mes "your don't have any "+getitemname(@use3)+".";
close;
}
}else{
if( !countitem(set(@use2,nItem(@typr,select("Don't use Purified.","Use it.")))))
{
mes "your don't have any "+getitemname(@use2)+".";
close;
}
set @use3,@use2;
}
return;
OnCon2:
if(.Scroll)
{
if( @menu2==2 )
{
if(!countitem(.Scroll))
{
mes "your don't have Protection Scroll.";
close;
}
}else{
if( select("Don't use Protection Scroll.","Use it.")==2)
{
if(!countitem(.Scroll))
{
mes "your don't have Protection Scroll.";
close;
}
}else
mes " ";
}
}
set Zeny,Zeny-nZeny(@typr);
if(.Scroll)
{
if( @menu==2 || @menu2==2 )
delitem .Scroll,1;
}
delitem @use2,1;
if(.Scroll)
{
if( @menu==2 || @menu2==2 )
{
if(@rate<rand(1,100))
{
if(.back<0)
{
getitem2 getequipid(@typr),1,1,-(.back<-10?-10:.back),0,getequipcardid(@typr,0),getequipcardid(@typr,1),getequipcardid(@typr,2),getequipcardid(@typr,3);
failedrefitem @typr;
close;
}else{
set .@D,set(.@D,getequiprefinerycnt(@typr)-.back)<0?0:.@D;
if(getequiprefinerycnt(@typr)<=10)
{
getitem2 getequipid(@typr),1,1,.@D,0,getequipcardid(@typr,0),getequipcardid(@typr,1),getequipcardid(@typr,2),getequipcardid(@typr,3);
failedrefitem @typr;
close;
}else
while(getequiprefinerycnt(@typr)!=.@D)successrefitem @typr;
}
}else
successrefitem @typr;
CHose(@use2,@menu);
}
}
if(@rate<rand(1,100))
{
failedrefitem @typr;
close;
}else
successrefitem @typr;
CHose(@use2,@menu);
function CHose {
set @menu2,@menu2?@menu2:@menu;
set @use3,@use3?@use3:@use2;
next;
sRater;
if( select("[continue]","[end]") == 2 )
close;
else
callsub OnCon,1;
callsub OnCon2;
}
} |
Viewed 826 times, submitted by Guest.