From f8957d8614f30d74ac4c0a08856b7e865a9c350d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 22 Aug 2021 02:30:30 -0300 Subject: Add `@getexp` by Hello=)'s request (how I forgot that?) Also add `@getgexp` which gives guild some exp (Currently, there are no sources for guild exp in TMW Evolved) --- npc/commands/exp.txt | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ npc/commands/ipcheck.txt | 4 +++- npc/scripts.conf | 1 + 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 npc/commands/exp.txt diff --git a/npc/commands/exp.txt b/npc/commands/exp.txt new file mode 100644 index 00000000..b8be2fa0 --- /dev/null +++ b/npc/commands/exp.txt @@ -0,0 +1,49 @@ +// TMW2 Script +// Author: Jesusalva + +// @getexp atcommand +// Gets experience (cannot be negative) +// +// group lv: 60 +// group char lv: 60 +// log: True + +- script @getexp 32767,{ + end; + +OnCall: + .@delta$ = .@atcmd_parameters$[0]; + .@d = atoi(.@delta$); + + getexp .@d, 0; + end; + +/* +OnHomun: + if (!gethominfo(0)) { + dispbottom l("No homunculus found!"); + end; + } + .@delta$ = .@atcmd_parameters$[0]; + .@d = atoi(.@delta$); + + gethomunexp .@d; // [TMW2 Only] [Broken in TMW] + end; +*/ + +OnGuild: + if (getcharid(2) < 1) { + dispbottom l("No guild found!"); + end; + } + .@delta$ = .@atcmd_parameters$[0]; + .@d = atoi(.@delta$); + + guildgetexp .@d; + end; + +OnInit: + bindatcmd "getexp", "@getexp::OnCall", 60, 60, 1; + //bindatcmd "gethexp", "@getexp::OnHomun", 60, 60, 1; + bindatcmd "getgexp", "@getexp::OnGuild", 60, 60, 1; +} diff --git a/npc/commands/ipcheck.txt b/npc/commands/ipcheck.txt index a241d3c0..ea82bb76 100644 --- a/npc/commands/ipcheck.txt +++ b/npc/commands/ipcheck.txt @@ -30,6 +30,8 @@ OnBan: .@reason$ = implode(.@atcmd_parameters$, " "); dispbottom col(l("You were permanently banned by the GM Team."), 1); sleep2(200); + // FIXME: Maybe not until "2037", but just a month or a year? + // IP Ban is less reliable than @block query_sql "INSERT INTO ipbanlist (list,btime,rtime,reason) VALUES ('"+getcharip(.@target$)+"','"+gettime(7)+"-"+gettime(6)+"-"+gettime(5)+" "+gettime(3)+":"+gettime(2)+":"+gettime(1)+"','2037-01-01 00:00:00','"+.@reason$+"')"; logmes("was IP-Blocked, and will not connect again."), LOGMES_ATCOMMAND; sleep2(2000); @@ -38,7 +40,7 @@ OnBan: OnInit: bindatcmd "ipcheck", "@ipcheck::OnCall", 60, 100, 0; - bindatcmd "ipban", "@ipcheck::OnBan", 99, 100, 1; + bindatcmd "ipban", "@ipcheck::OnBan", 99, 99, 1; end; } diff --git a/npc/scripts.conf b/npc/scripts.conf index 6bd0a5ed..2b6aa0f8 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -99,6 +99,7 @@ // Commands "npc/commands/debug-quest.txt", "npc/commands/debug.txt", +"npc/commands/exp.txt", "npc/commands/force-rename.txt", "npc/commands/gm.txt", "npc/commands/ipcheck.txt", -- cgit v1.2.3-60-g2f50