diff options
Diffstat (limited to 'npc/commands')
-rw-r--r-- | npc/commands/ucp.txt | 11 |
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()) |