summaryrefslogtreecommitdiff
path: root/npc/commands
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-26 08:04:54 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-26 08:04:54 -0300
commit3925a5588a46bb8b592656d34793e3f0d51853e8 (patch)
treefe818f932904f5da7aaa11d356bef42d7fa1840f /npc/commands
parentf4100abbf37e7c353106a0f043e40c479c0c1904 (diff)
downloadserverdata-3925a5588a46bb8b592656d34793e3f0d51853e8.tar.gz
serverdata-3925a5588a46bb8b592656d34793e3f0d51853e8.tar.bz2
serverdata-3925a5588a46bb8b592656d34793e3f0d51853e8.tar.xz
serverdata-3925a5588a46bb8b592656d34793e3f0d51853e8.zip
Option to create a pincode will only show up at Tolchi's first Successful Craft
Account need 15 days.
Diffstat (limited to 'npc/commands')
-rw-r--r--npc/commands/ucp.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
index aeaf805a0..7bda91a7b 100644
--- a/npc/commands/ucp.txt
+++ b/npc/commands/ucp.txt
@@ -20,7 +20,7 @@ function script UserCtrlPanel {
select
l("Rules"),
l("Game News"),
- rif(is_admin(), l("Create PIN Number")),
+ rif(#FIRST_TIME == 1, l("Create PIN Number")),
l("Account Information"),
rif(getcharid(2) > 0, l("Guild Information")),
l("Change Language"),
@@ -34,9 +34,10 @@ function script UserCtrlPanel {
case 2: GameNews(); break;
case 3:
// Account age check
- if (#REG_DATE < gettimetick(2)+86400*15) {
+ if (gettimetick(2) < #REG_DATE+86400*15) {
mesc l("Your account is too young."), 1;
mesc l("The accounts need 15 days to set Pin Codes."), 1;
+ next;
break;
}
mes l(".:: Create PIN Code ::.");
@@ -56,8 +57,12 @@ function script UserCtrlPanel {
mes "";
.@msg$=json_encode("date", gettimetick(2),
"accid", getcharid(3),
- "pin", rand2(1000));
+ "pin", rand2(10000));
+ debugmes .@msg$;
api_send(302, .@msg$);
+ #FIRST_TIME=2;
+ mesc l("PinCode created, an email should arrive within 15 minutes."), 3;
+ next;
break;
case 4:
if (!validatepin())