summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/asklanguage.txt2
-rw-r--r--npc/functions/barber.txt24
-rw-r--r--npc/functions/fishing.txt2
-rw-r--r--npc/functions/main.txt4
-rw-r--r--npc/functions/mouboofunc.txt14
-rw-r--r--npc/functions/openbook.txt6
-rw-r--r--npc/functions/riddle.txt20
7 files changed, 36 insertions, 36 deletions
diff --git a/npc/functions/asklanguage.txt b/npc/functions/asklanguage.txt
index cc3f5275..4bea4bd1 100644
--- a/npc/functions/asklanguage.txt
+++ b/npc/functions/asklanguage.txt
@@ -67,7 +67,7 @@ function script asklanguage {
.@menustr$ = .@menustr$ + .@flags$[.@i] + "|" + .@messages$[.@i] + .@separator$;
}
- select (.@menustr$);
+ select(.@menustr$);
.@lang = @menu - 1;
diff --git a/npc/functions/barber.txt b/npc/functions/barber.txt
index b1e3dc38..370285b7 100644
--- a/npc/functions/barber.txt
+++ b/npc/functions/barber.txt
@@ -8,8 +8,8 @@
function script BarberSayStyle {
- .@get_color = getlook (LOOK_HAIR_COLOR);
- .@get_look = getlook (LOOK_HAIR);
+ .@get_color = getlook(LOOK_HAIR_COLOR);
+ .@get_look = getlook(LOOK_HAIR);
.@style_name$ = $@hairstyle$[.@get_look];
.@color_name$ = $@haircolor$[.@get_color];
@@ -32,7 +32,7 @@ function script BarberChangeStyle {
do
{
.@hairsizearray = getarraysize($@hairstyle$);
- .@get_look = getlook (LOOK_HAIR);
+ .@get_look = getlook(LOOK_HAIR);
// Here .@i starts from 1 because hairstyle 0 doesn't exist.
for (.@i = 1; .@i < .@hairsizearray; .@i++)
@@ -43,9 +43,9 @@ function script BarberChangeStyle {
}
.@menustr$ = .@menustr$ + l("I'm fine for now, thank you.");
-
+
.@idx = select(l("As you want!"),.@menustr$);
-
+
if (.@idx == .@i + 1) return; // last choice to quit dialog
switch (@menu)
@@ -55,15 +55,15 @@ function script BarberChangeStyle {
{
// here "- 1" because i don't use the 0 of array
.@rand_hair = rand(1,(.@hairsizearray - 1));
- } while (.@rand_hair == getlook (LOOK_HAIR));
+ } while (.@rand_hair == getlook(LOOK_HAIR));
setlook LOOK_HAIR, .@rand_hair;
- setlook LOOK_HAIR_COLOR, getlook (LOOK_HAIR_COLOR);
+ setlook LOOK_HAIR_COLOR, getlook(LOOK_HAIR_COLOR);
BarberSayStyle 1;
break;
default:
// and here "- 1" because the first choice is taken by the random
setlook LOOK_HAIR, (@menu - 1);
- setlook LOOK_HAIR_COLOR, getlook (LOOK_HAIR_COLOR);
+ setlook LOOK_HAIR_COLOR, getlook(LOOK_HAIR_COLOR);
break;
}
.@menustr$ = "";
@@ -73,7 +73,7 @@ function script BarberChangeStyle {
function script BarberChangeColor {
do
{
- .@get_look = getlook (LOOK_HAIR_COLOR);
+ .@get_look = getlook(LOOK_HAIR_COLOR);
.@hairsizearray = getarraysize($@haircolor$);
for (.@i = 0; .@i < .@hairsizearray; .@i++)
@@ -84,9 +84,9 @@ function script BarberChangeColor {
}
.@menustr$ = l("Surprise me!") + ":" + .@menustr$ + l("I'm fine for now, thank you.");
-
+
.@idx = select(.@menustr$);
-
+
if (.@idx == .@i + 2) return;
switch (@menu)
@@ -95,7 +95,7 @@ function script BarberChangeColor {
do
{
.@rand_color = rand(0, .@hairsizearray);
- } while (.@rand_color == getlook (LOOK_HAIR_COLOR));
+ } while (.@rand_color == getlook(LOOK_HAIR_COLOR));
setlook LOOK_HAIR_COLOR, .@rand_color;
BarberSayStyle 2;
break;
diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt
index 8eadab89..3d719ac7 100644
--- a/npc/functions/fishing.txt
+++ b/npc/functions/fishing.txt
@@ -273,7 +273,7 @@ function script fishing {
set getvariableofnpc(.account_id, .@npc$), getcharid(CHAR_ID_ACCOUNT); // record account id
set getvariableofnpc(.char_id, .@npc$), getcharid(CHAR_ID_CHAR); // record char id
set getvariableofnpc(.last_used, .@npc$), gettimetick(2);
- getmapxy (@fishing_loc$[0], @fishing_loc[0], @fishing_loc[1], 0); // record char pos
+ getmapxy(@fishing_loc$[0], @fishing_loc[0], @fishing_loc[1], 0); // record char pos
delitem .@bait, 1;
// The player uses this spot, his bait is ready, he just has to wait for the signal.
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 5f8c7aea..243ae383 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -142,7 +142,7 @@ function script npcdebug {
}
function script askyesno {
- return select (menuaction(l("Yes")),
+ return select(menuaction(l("Yes")),
menuaction(l("No")));
}
@@ -151,7 +151,7 @@ function script askyesno {
// 1 Current value
// 2 Next value
function script compareandsetq {
- if (getq (getarg(0)) == getarg(1))
+ if (getq(getarg(0)) == getarg(1))
{
setq getarg(0), getarg(2);
return true;
diff --git a/npc/functions/mouboofunc.txt b/npc/functions/mouboofunc.txt
index c0f7d96b..6129c083 100644
--- a/npc/functions/mouboofunc.txt
+++ b/npc/functions/mouboofunc.txt
@@ -5,7 +5,7 @@
// Various scripts used in walking mouboo NPCs.
function script moubootalk {
- switch (rand (4))
+ switch (rand(4))
{
case 0:
npctalkonce(l("Moooooo!"));
@@ -31,13 +31,13 @@ function script mouboocheckxy {
"Taree";
for (.@size = 0; .@size < getarraysize(.nearnpc$); .@size++)
{
- if (strcmp (.name$, .nearnpc$[.@size]) == 0)
+ if (strcmp(.name$, .nearnpc$[.@size]) == 0)
{
continue;
}
- .@npc_x = getvariableofnpc (.x, .nearnpc$[.@size]);
- .@npc_y = getvariableofnpc (.y, .nearnpc$[.@size]);
+ .@npc_x = getvariableofnpc(.x, .nearnpc$[.@size]);
+ .@npc_y = getvariableofnpc(.y, .nearnpc$[.@size]);
if (.@npc_x == .x && .@npc_y == .y)
{
@@ -49,13 +49,13 @@ function script mouboocheckxy {
}
function script moubootimer {
- if (mouboocheckxy () && !isunitwalking ())
+ if (mouboocheckxy() && !isunitwalking())
{
movetonextpoint;
}
- else if (rand (0,6) == 5)
+ else if (rand(0,6) == 5)
{
- if (!isunitwalking ())
+ if (!isunitwalking())
{
movetonextpoint;
}
diff --git a/npc/functions/openbook.txt b/npc/functions/openbook.txt
index a46d957c..0278415c 100644
--- a/npc/functions/openbook.txt
+++ b/npc/functions/openbook.txt
@@ -13,7 +13,7 @@ function script openbook {
l("You open a book named @@.", .@book_name$),
l("Do you want to read it?");
- return (select ("Yes.", "No.") == 1);
+ return (select("Yes.", "No.") == 1);
}
function script openbookshelf {
@@ -24,7 +24,7 @@ function script openbookshelf {
l("The name of the book is @@.", .@book_name$),
l("Do you want to read it?");
- return (select ("Yes.", "No.") == 1);
+ return (select("Yes.", "No.") == 1);
}
function script openoldbook {
@@ -32,5 +32,5 @@ function script openoldbook {
l("You open the book, but it looks like the sea water and time damaged it severely. Some pages are not readable anymore. Some others are simply missing."),
l("The old book seems to tell about the legend of Aemil. Would you like to read it?");
- return (select ("Yes.", "No.") == 1);
+ return (select("Yes.", "No.") == 1);
}
diff --git a/npc/functions/riddle.txt b/npc/functions/riddle.txt
index b65c115d..fb503e3b 100644
--- a/npc/functions/riddle.txt
+++ b/npc/functions/riddle.txt
@@ -12,15 +12,15 @@
// TODO: levenshtein(), similar_text(), and maybe even soundex()
function script riddlevalidation {
- .@answer$ = strtolower (getarg (0));
- .@good$ = strtolower (getarg (1));
- .@good_translated$ = strtolower (getarg (2));
+ .@answer$ = strtolower(getarg(0));
+ .@good$ = strtolower(getarg(1));
+ .@good_translated$ = strtolower(getarg(2));
- .@size_answer = getstrlen (.@answer$);
- .@size_good = getstrlen (.@good$);
- .@size_good_translated = getstrlen (.@good_translated$);
+ .@size_answer = getstrlen(.@answer$);
+ .@size_good = getstrlen(.@good$);
+ .@size_good_translated = getstrlen(.@good_translated$);
- .@max = max (.@size_answer, .@size_good_translated, .@size_good);
+ .@max = max(.@size_answer, .@size_good_translated, .@size_good);
// Input is too long.
if (.@max > 20)
@@ -38,7 +38,7 @@ function script riddlevalidation {
for (.@k = .@k_translated = .@j = .@i; .@j < .@max; .@j++)
{
- if (charat (.@answer$, .@j) == charat (.@good$, .@k))
+ if (charat(.@answer$, .@j) == charat(.@good$, .@k))
{
.@correct++;
.@k++;
@@ -48,8 +48,8 @@ function script riddlevalidation {
.@correct--;
}
- if (charat (.@answer$, .@j) ==
- charat (.@good_translated$, .@k_translated))
+ if (charat(.@answer$, .@j) ==
+ charat(.@good_translated$, .@k_translated))
{
.@correct_translated++;
.@k_translated++;