diff options
Diffstat (limited to 'npc/commands')
-rw-r--r-- | npc/commands/debug-look.txt | 33 | ||||
-rw-r--r-- | npc/commands/debug-quest.txt | 6 | ||||
-rw-r--r-- | npc/commands/gender.txt | 35 | ||||
-rw-r--r-- | npc/commands/gm.txt | 41 | ||||
-rw-r--r-- | npc/commands/mobinfo.txt | 29 | ||||
-rw-r--r-- | npc/commands/motd.txt | 17 | ||||
-rw-r--r-- | npc/commands/python.txt | 24 | ||||
-rw-r--r-- | npc/commands/resync.txt | 2 | ||||
-rw-r--r-- | npc/commands/scheduled-broadcasts.txt | 12 | ||||
-rw-r--r-- | npc/commands/super-menu.txt | 16 | ||||
-rw-r--r-- | npc/commands/warp.txt | 17 | ||||
-rw-r--r-- | npc/commands/zeny.txt | 2 |
12 files changed, 184 insertions, 50 deletions
diff --git a/npc/commands/debug-look.txt b/npc/commands/debug-look.txt index 79bf8699..23acc4da 100644 --- a/npc/commands/debug-look.txt +++ b/npc/commands/debug-look.txt @@ -1,22 +1,19 @@ function script BarberDebug { function setGender { - //clear; - //setnpcdialogtitle l("Appearance Debug - Sex Change"); - //mes l("Please choose the desired gender:"); - //next; - //menuint - // l("Male"), G_MALE, - // l("Female"), G_FEMALE, - // l("Non-binary"), G_OTHER; + clear(); + setnpcdialogtitle(l("Appearance Debug - Gender Change")); + mes(l("Warning: changing your gender will send you back to the character selection screen.")); + mes(""); + mes(l("Please choose the desired gender:")); + next(); + menuint( + l("Male"), GENDER_MALE, + l("Female"), GENDER_FEMALE, + l("Non-binary"), GENDER_HIDDEN); - //Sex = @menuret; // FIXME: make this work like in tmwAthena - //return; - - - // ^ Future code, Doesn't work yet - closeclientdialog; - changecharsex; + Gender = @menuret; + return; } function setStyle { clear; @@ -41,7 +38,7 @@ function script BarberDebug { function setRace { clear; setnpcdialogtitle l("Appearance Debug - Race"); - mes l("Race") + ": " + Class; + mes l("Race") + ": " + Class + " (" + get_race(GETRACE_FULL) + ")"; next; mes l("Please enter the desired race") + " (0-32767)"; input .@r, 0, 0x7FFF; @@ -57,10 +54,10 @@ function script BarberDebug { mes ""; mes "---"; - mes l("Gender") + ": " + Sex; + mes l("Gender") + ": " + genderToString(Gender); mes l("Hair style") + ": " + getlook(LOOK_HAIR); mes l("Hair color") + ": " + getlook(LOOK_HAIR_COLOR); - mes l("Race") + ": " + Class; + mes l("Race") + ": " + Class + " (" + get_race() + ")";; mes "---"; next; diff --git a/npc/commands/debug-quest.txt b/npc/commands/debug-quest.txt index 1c3e0b5c..34bdf63b 100644 --- a/npc/commands/debug-quest.txt +++ b/npc/commands/debug-quest.txt @@ -80,7 +80,8 @@ function script GlobalQuestDebug { "Fexil", ArtisQuests_Fexil, "Lloyd", ArtisQuests_Lloyd, l("Mona's dad"), ArtisQuests_MonaDad, - l("Artis legion progress"), Artis_Legion_Progress; + l("Artis legion progress"), Artis_Legion_Progress, + l("Legion training"), ArtisQuests_TrainingLegion; switch (@menuret) { @@ -130,7 +131,8 @@ function script GlobalQuestDebug { "Rumly", General_Rumly, l("Narrator"), General_Narrator, "Janus", General_Janus, - l("Cooking"), General_Cooking; + l("Cooking"), General_Cooking, + l("Brotherhood"), General_Brotherhood; switch (@menuret) { diff --git a/npc/commands/gender.txt b/npc/commands/gender.txt new file mode 100644 index 00000000..b852beb0 --- /dev/null +++ b/npc/commands/gender.txt @@ -0,0 +1,35 @@ +// @gender atcommand +// changes or returns the gender + +- script @gender 32767,{ + end; + +OnCall: + if (.@atcmd_parameters$[0] == "") { + dispbottom("Your current gender is " + genderToString()); + end; + } + + .@desired = stringToGender(.@atcmd_parameters$[0]); + + if (.@desired == Gender) { + dispbottom("Your gender is already " + genderToString()); + } else { + Gender = .@desired; + dispbottom("Gender changed to " + genderToString()); + } + end; + +OnInit: + bindatcmd("gender", "@gender::OnCall", 99, 99, false); + add_group_command("gender", 40, true, false); + add_group_command("gender", 50, true, true); + add_group_command("gender", 60, true, true); + add_group_command("gender", 80, true, true); + + bindatcmd("changesex", "@gender::OnCall", 99, 99, false); + add_group_command("changesex", 40, true, false); + add_group_command("changesex", 50, true, true); + add_group_command("changesex", 60, true, true); + add_group_command("changesex", 80, true, true); +} diff --git a/npc/commands/gm.txt b/npc/commands/gm.txt new file mode 100644 index 00000000..b402cda8 --- /dev/null +++ b/npc/commands/gm.txt @@ -0,0 +1,41 @@ +// @showgm/@hidegm atcommand +// TEMPORALY hides GM level (or revert it) +// +// group lv: 20+ +// group char lv: 99 +// log: False +// +// usage: +// @showgm +// #showgm "char" <delta> +// + +- script @group 32767,{ + end; + +OnHide: + .@gm=getgroupid(); + if (.@gm < 20) end; + if (.@gm % 10 != 0) end; + setgroupid(.@gm+1); + dispbottom "hidelevel : "+l("Your GM level is now hidden."); + end; + +OnShow: + .@gm=getgroupid(); + if (.@gm < 20) end; + if (.@gm % 10 != 1) end; + setgroupid(.@gm-1); + dispbottom "showlevel : "+l("Your GM level is now visible."); + end; + +OnInit: + bindatcmd "showgroup", "@group::OnShow", 20, 99, 0; + bindatcmd "showgm", "@group::OnShow", 20, 99, 0; + bindatcmd "showlevel", "@group::OnShow", 20, 99, 0; + + bindatcmd "hidegroup", "@group::OnHide", 20, 99, 0; + bindatcmd "hidegm", "@group::OnHide", 20, 99, 0; + bindatcmd "hidelevel", "@group::OnHide", 20, 99, 0; + end; +} diff --git a/npc/commands/mobinfo.txt b/npc/commands/mobinfo.txt new file mode 100644 index 00000000..691bfb68 --- /dev/null +++ b/npc/commands/mobinfo.txt @@ -0,0 +1,29 @@ +// The Mana World Script +// +// @monsterinfo <monsterAegis> +// Sends @mobinfo with a delay (moved from atcommand.conf) +// Requires EVOL_MONSTER_IDENTIFY +// +- script @monsterinfo 32767,{ + end; + +OnCall: + // Check for skill level + if (!getskilllv(EVOL_MONSTER_IDENTIFY)) + end; + + // ... + if (@rsync_delay > gettimetick(2)) { + dispbottom l("Not doing that to prevent flood."); + end; + } + + // Send @mobinfo and set a cooldown of 3 seconds. + atcommand("@mobinfo " + implode(.@atcmd_parameters$, " ")); + @rsync_delay=gettimetick(2)+3; + end; + +OnInit: + bindatcmd "monsterinfo", "@monsterinfo::OnCall", 0, 60, 0; + end; +} diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt index e21d7539..2f6a5e2a 100644 --- a/npc/commands/motd.txt +++ b/npc/commands/motd.txt @@ -174,7 +174,14 @@ OnCall: closeclientdialog; end; -OnPCLoginEvent: +OnInit: + MOTD_debug_text; + .size = getarraysize($MOTD_Messages$); + .dsize = getarraysize($@Debug_Messages$); + bindatcmd "motd", "@motd::OnCall", 0, 99, 0; +} + +function script ReceiveMOTD { if ($MOTD_Disabled < 1) { displayMOTD; @@ -183,11 +190,5 @@ OnPCLoginEvent: { dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>"; } - end; - -OnInit: - MOTD_debug_text; - .size = getarraysize($MOTD_Messages$); - .dsize = getarraysize($@Debug_Messages$); - bindatcmd "motd", "@motd::OnCall", 0, 99, 0; + return; } diff --git a/npc/commands/python.txt b/npc/commands/python.txt new file mode 100644 index 00000000..e2fdc5bf --- /dev/null +++ b/npc/commands/python.txt @@ -0,0 +1,24 @@ +// The Mana World script +// Author: Gumi <gumi@themanaworld.org> +// Author: Jesusalva <jesusalva@themanaworld.org> +// +// Stomp stomp stomp (use with caution) + +- script @python 32767,{ + end; + +// Soft Resync +OnCall: + specialeffect(69, AREA, playerattached()); + addtimer 380, .name$+"::OnKill"; + end; + +OnKill: + percentheal -100, -100; + //dispbottom l("Oh look, it is Cupid!"); + end; + +OnInit: + bindatcmd "python", "@python::OnCall", 20, 20, 1; + end; +} diff --git a/npc/commands/resync.txt b/npc/commands/resync.txt index 63b2d290..a535a343 100644 --- a/npc/commands/resync.txt +++ b/npc/commands/resync.txt @@ -35,6 +35,6 @@ OnCall: // Anyone can call @resync, but only support and upwards for other players. // ie. GMs can try to fix lag for other people. OnInit: - bindatcmd "resync", "@resync::OnCall", 0, 2, 0; + bindatcmd "resync", "@resync::OnCall", 0, 20, 0; end; } diff --git a/npc/commands/scheduled-broadcasts.txt b/npc/commands/scheduled-broadcasts.txt index 972a0cf2..720651b3 100644 --- a/npc/commands/scheduled-broadcasts.txt +++ b/npc/commands/scheduled-broadcasts.txt @@ -213,13 +213,15 @@ OnCall: closeclientdialog; end; -OnPCLoginEvent: +OnInit: + bindatcmd "sched", "@sched::OnCall", 0, 99, 0; +} + +function script ReceiveScheduledBroadcast { if ($@SCHED_Opt[0] && $@SCHED_Msg$ != "") { announce $@SCHED_Msg$, bc_self; } - end; - -OnInit: - bindatcmd "sched", "@sched::OnCall", 0, 99, 0; + return; } + diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt index 8102dd32..5ed7ced3 100644 --- a/npc/commands/super-menu.txt +++ b/npc/commands/super-menu.txt @@ -46,21 +46,23 @@ OnCall: closeclientdialog; end; -OnPCLoginEvent: +OnInit: + bindatcmd "super", "@super::OnCall", 0, 99, 0; + bindatcmd "numa", "@super::OnCall", 0, 99, 0; // alias for those used to TMW's @numa +} + +function script GrantSuperSkill { .@debug_skill = getskilllv(EVOL_SUPER_MENU); if (.@debug_skill > 0 && !debug) { - skill EVOL_SUPER_MENU, 0, 0; // remove debug skill + skill EVOL_SUPER_MENU, 0, 0; // remove debug skill. Not needed (skill tree) } else if (.@debug_skill < 1 && debug) { skill EVOL_SUPER_MENU, 1, 0; // give debug skill } - end; - -OnInit: - bindatcmd "super", "@super::OnCall", 0, 99, 0; - bindatcmd "numa", "@super::OnCall", 0, 99, 0; // alias for those used to TMW's @numa + return; } + diff --git a/npc/commands/warp.txt b/npc/commands/warp.txt index 318489d7..22eeda39 100644 --- a/npc/commands/warp.txt +++ b/npc/commands/warp.txt @@ -70,21 +70,22 @@ OnCall: } slide_or_warp(.@map$, .@x, .@y); + updateSpotlight(); end; OnInit: if (debug > 0) { - bindatcmd("w", "@w::OnCall", 0, 2, 0); - bindatcmd("go", "@w::OnCall", 0, 2, 0); - bindatcmd("to", "@w::OnCall", 0, 2, 0); - bindatcmd("warp", "@w::OnCall", 0, 2, 0); + bindatcmd("w", "@w::OnCall", 0, 20, 0); + bindatcmd("go", "@w::OnCall", 0, 20, 0); + bindatcmd("to", "@w::OnCall", 0, 20, 0); + bindatcmd("warp", "@w::OnCall", 0, 20, 0); } else { - bindatcmd("w", "@w::OnCall", 2, 2, 1); - bindatcmd("go", "@w::OnCall", 2, 2, 1); - bindatcmd("to", "@w::OnCall", 2, 2, 1); - bindatcmd("warp", "@w::OnCall", 2, 2, 1); + bindatcmd("w", "@w::OnCall", 20, 60, 1); + bindatcmd("go", "@w::OnCall", 20, 60, 1); + bindatcmd("to", "@w::OnCall", 20, 60, 1); + bindatcmd("warp", "@w::OnCall", 20, 60, 1); } } diff --git a/npc/commands/zeny.txt b/npc/commands/zeny.txt index 77f6d2de..944c1bb9 100644 --- a/npc/commands/zeny.txt +++ b/npc/commands/zeny.txt @@ -94,5 +94,5 @@ OnInit: end; } - bindatcmd "esp", "@esp::OnCall", 3, 99, 1; + bindatcmd "esp", "@esp::OnCall", 99, 99, 1; } |