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
|
//===== eAthena Script =======================================
//= Kafra Express - Rental Module
//===== By: ==================================================
//= Skotlex
//===== Current Version: =====================================
//= 1.8
//===== Compatible With: =====================================
//= eAthena SVN R3424+
//===== Description: =========================================
//= Part of the Kafra Express Script Package.
//= Rents PecoPecos, Falcons, Carts
//===== Additional Comments: =================================
//= See config.txt for configuration.
//============================================================
- script keInit_rent {
OnInit: //Load Config
donpcevent "keConfig::OnLoadRent";
end;
}
function script F_keRent {
set @cartCost,callfunc("F_keCost",$@kert_cartCost,100);
if(@kert_cartOnly) {
set @kmenu, 2;
} else {
set @falconCost,callfunc("F_keCost",$@kert_falconCost,100);
set @pecoCost,callfunc("F_keCost",$@kert_pecoCost,100);
set @kmenu, select (
"- Cancel",
"- Rent a Cart ("+@cartCost+"z)",
"- Rent a Falcon ("+@falconCost+"z)",
"- Rent a PecoPeco ("+@pecoCost+"z)"
);
}
switch (@kmenu) {
case 2: //Cart
if (getskilllv(39)==0) {
callfunc "F_keIntro", -1, "Sorry, only those with the skill 'Pushcart' may rent a Cart.";
} else
if (checkcart()) {
callfunc "F_keIntro", -1, "You are already equipped.";
} else
if (!(callfunc("F_keCharge",$@kert_cartCost,100,1))) {
callfunc "F_keIntro", e_an, "Sorry, but you don't have enough Zeny.";
} else {
setcart;
emotion e_ok;
}
break;
case 3: //Falcon
if (getskilllv(127)==0) {
callfunc "F_keIntro", -1, "Sorry, only those with the skill 'Falcon Taming' may rent a Falcon.";
} else
if (checkfalcon()) {
callfunc "F_keIntro", -1, "You are already equipped.";
} else
if (!(callfunc("F_keCharge",$@kert_falconCost,100,1))) {
callfunc "F_keIntro", e_an, "Sorry, but you don't have enough Zeny.";
} else {
setfalcon;
emotion e_ok;
}
break;
case 4: //pecopeco
if (getskilllv(63)==0) {
callfunc "F_keIntro", -1, "Sorry, only those with the skill 'PecoPeco Riding' may rent a PecoPeco.";
} else
if (checkriding()) {
callfunc "F_keIntro", -1, "You are already equipped.";
} else
if (!(callfunc("F_keCharge",$@kert_pecoCost,100,1))) {
callfunc "F_keIntro", e_an, "Sorry, but you don't have enough Zeny.";
} else {
setriding;
emotion e_ok;
}
break;
}
return;
}
|