Viewing Item

#12786: Cupom de Troca de Slot

Item ID 12786 For Sale No
Identifier Change_Slot_Card Credit Price Not For Sale
Name Cupom de Troca de Slot Type Delay Consume
NPC Buy 0 Weight 0
NPC Sell 0 Weapon Level 0
Range 0 Defense 0
Slots 0 Refineable No
Attack 0 Min Equip Level None
Max Equip Level None
Equip Locations None
Equip Upper All classes
Equippable Jobs All jobs
Equip Gender Both (Male and Female)
Trade restriction Can't be dropped / Can't be traded with player / Can't be sold to NPC / Can't be put in Cart / Can't be put in Guild Storage / Can't be attached in Mail / Can't be auctioned
Item Use Script

1 //

2 CapivaRO

3 Move

4 o

5 personagem

6 atual

7 para

8 outro

9 slot

10 liberado

11 da

12 conta.

13 //

14 Slot

15 ocupado

16 =

17 os

18 dois

19 trocam

20 de

21 lugar.

22 O

23 client

24 2025

25 só

26 move

27 para

28 slot

29 vazio,

30 //

31 por

32 isso

33 a

34 troca

35 é

36 feita

37 aqui.

38 char_num

39 não

40 é

41 regravado

42 no

43 save

44 do

45 char-server.

46 .@aid

47 =

48 getcharid(3);

49 .@cid

50 =

51 getcharid(0);

52 .@extra

53 =

54 0;

55 query_sql

56 "SELECT

57 `capi_slots_extra`

58 FROM

59 `login`

60 WHERE

61 `account_id`

62 =

63 "

64 +

65 .@aid,

66 .@extra;

67 .@slots

68 =

69 5

70 +

71 .@extra;

72 if

73 (.@slots

74 15)

75 .@slots

76 =

77 15;

78 .@n

79 =

80 query_sql("SELECT

81 `char_id`,`char_num`,`name`

82 FROM

83 `char`

84 WHERE

85 `account_id`

86 =

87 "

88 +

89 .@aid

90 +

91 "

92 AND

93 `char_num`

94 "

95 +

96 .@slots,

97 .@ids,

98 .@nums,

99 .@names$);

100 .@meu

101 =

102 -1;

103 for

104 (.@i

105 =

106 0;

107 .@i

108 .@n;

109 .@i++)

110 {

111 .@occ$

112 .@nums

113 .@i

114 =

115 .@names$

116 .@i

117 ;

118 .@occid

119 .@nums

120 .@i

121 =

122 .@ids

123 .@i

124 ;

125 if

126 (.@ids

127 .@i

128 ==

129 .@cid)

130 .@meu

131 =

132 .@nums

133 .@i

134 ;

135 }

136 if

137 (.@meu

138 0)

139 {

140 message

141 strcharinfo(0),"Não

142 foi

143 possível

144 identificar

145 o

146 slot

147 deste

148 personagem.";

149 end;

150 }

151 .@menu$

152 =

153 "";

154 for

155 (.@s

156 =

157 0;

158 .@s

159 .@slots;

160 .@s++)

161 {

162 if

163 (.@s

164 ==

165 .@meu)

166 .@menu$

167 +=

168 "^777777Slot

169 "

170 +

171 (.@s

172 +

173 1)

174 +

175 "

176 -

177 "

178 +

179 strcharinfo(0)

180 +

181 "

182 (atual)^000000:";

183 else

184 if

185 (.@occ$

186 .@s

187 !=

188 "")

189 .@menu$

190 +=

191 "Slot

192 "

193 +

194 (.@s

195 +

196 1)

197 +

198 "

199 -

200 "

201 +

202 .@occ$

203 .@s

204 +

205 ":";

206 else

207 .@menu$

208 +=

209 "Slot

210 "

211 +

212 (.@s

213 +

214 1)

215 +

216 "

217 -

218 vazio:";

219 }

220 .@menu$

221 +=

222 "Cancelar";

223 mes

224 "

225 Cupom

226 de

227 Troca

228 de

229 Slot

230 ";

231 mes

232 "Para

233 qual

234 slot

235 você

236 quer

237 mover

238 ^0000ff"

239 +

240 strcharinfo(0)

241 +

242 "^000000?";

243 mes

244 "Se

245 o

246 slot

247 estiver

248 ocupado,

249 os

250 dois

251 personagens

252 trocam

253 de

254 lugar.";

255 next;

256 .@sel

257 =

258 select(.@menu$)

259 -

260 1;

261 if

262 (.@sel

263 =

264 .@slots

265 ||

266 .@sel

267 ==

268 .@meu)

269 close;

270 mes

271 "

272 Cupom

273 de

274 Troca

275 de

276 Slot

277 ";

278 if

279 (.@occ$

280 .@sel

281 !=

282 "")

283 mes

284 "Trocar

285 ^0000ff"

286 +

287 strcharinfo(0)

288 +

289 "^000000

290 (slot

291 "

292 +

293 (.@meu

294 +

295 1)

296 +

297 ")

298 com

299 ^0000ff"

300 +

301 .@occ$

302 .@sel

303 +

304 "^000000

305 (slot

306 "

307 +

308 (.@sel

309 +

310 1)

311 +

312 ")?";

313 else

314 mes

315 "Mover

316 ^0000ff"

317 +

318 strcharinfo(0)

319 +

320 "^000000

321 do

322 slot

323 "

324 +

325 (.@meu

326 +

327 1)

328 +

329 "

330 para

331 o

332 slot

333 "

334 +

335 (.@sel

336 +

337 1)

338 +

339 "?";

340 next;

341 if

342 (select("Confirmar:Cancelar")

343 ==

344 2)

345 close;

346 //

347 Confere

348 de

349 novo

350 quem

351 está

352 no

353 destino

354 antes

355 de

356 gravar.

357 .@alvo

358 =

359 0;

360 query_sql

361 "SELECT

362 `char_id`

363 FROM

364 `char`

365 WHERE

366 `account_id`

367 =

368 "

369 +

370 .@aid

371 +

372 "

373 AND

374 `char_num`

375 =

376 "

377 +

378 .@sel

379 +

380 "

381 LIMIT

382 1",

383 .@alvo;

384 if

385 (.@alvo

386 !=

387 .@occid

388 .@sel

389 )

390 {

391 mes

392 "

393 Cupom

394 de

395 Troca

396 de

397 Slot

398 ";

399 mes

400 "Os

401 slots

402 mudaram.

403 Use

404 o

405 cupom

406 de

407 novo.";

408 close;

409 }

410 delitem

411 12786,1;

412 if

413 (.@alvo

414 0)

415 query_sql

416 "UPDATE

417 `char`

418 SET

419 `char_num`

420 =

421 "

422 +

423 .@meu

424 +

425 "

426 WHERE

427 `char_id`

428 =

429 "

430 +

431 .@alvo;

432 query_sql

433 "UPDATE

434 `char`

435 SET

436 `char_num`

437 =

438 "

439 +

440 .@sel

441 +

442 "

443 WHERE

444 `char_id`

445 =

446 "

447 +

448 .@cid;

449 mes

450 "

451 Cupom

452 de

453 Troca

454 de

455 Slot

456 ";

457 mes

458 "Pronto!

459 Volte

460 à

461 seleção

462 de

463 personagens

464 para

465 ver

466 a

467 mudança.";

468 close;

Equip Script None
Unequip Script None