diff options
author | gumi <mekolat@users.noreply.github.com> | 2017-10-11 19:02:11 -0400 |
---|---|---|
committer | gumi <mekolat@users.noreply.github.com> | 2017-10-11 19:02:20 -0400 |
commit | 6662b6f305976881c3e675241c41be7731b65aa5 (patch) | |
tree | a8ecaa074cf67cb929f4de6ed62ef7c4b49c46d1 /npc/functions | |
parent | 03049799efdc103fdd74e77161ed6a907acb7dde (diff) | |
download | serverdata-s20171023.tar.gz serverdata-s20171023.tar.bz2 serverdata-s20171023.tar.xz serverdata-s20171023.zip |
what's up with this crazy syntax?s20171023
I blame Reid
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/asklanguage.txt | 2 | ||||
-rw-r--r-- | npc/functions/barber.txt | 24 | ||||
-rw-r--r-- | npc/functions/fishing.txt | 2 | ||||
-rw-r--r-- | npc/functions/main.txt | 4 | ||||
-rw-r--r-- | npc/functions/mouboofunc.txt | 14 | ||||
-rw-r--r-- | npc/functions/openbook.txt | 6 | ||||
-rw-r--r-- | npc/functions/riddle.txt | 20 |
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++; |