summaryrefslogtreecommitdiff
path: root/npc/commands/ucp.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-16 23:01:47 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-16 23:01:47 -0300
commitb27d189868e08f4459d324fcdc71d996b4ba84ae (patch)
tree9a126f44a30d5f9fc47ca0c493488609ef697d95 /npc/commands/ucp.txt
parentc3ac02f19bd21b196841934cea8205c77c2f51bf (diff)
downloadserverdata-b27d189868e08f4459d324fcdc71d996b4ba84ae.tar.gz
serverdata-b27d189868e08f4459d324fcdc71d996b4ba84ae.tar.bz2
serverdata-b27d189868e08f4459d324fcdc71d996b4ba84ae.tar.xz
serverdata-b27d189868e08f4459d324fcdc71d996b4ba84ae.zip
User Control Panel (@ucp)
Diffstat (limited to 'npc/commands/ucp.txt')
-rw-r--r--npc/commands/ucp.txt67
1 files changed, 67 insertions, 0 deletions
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
new file mode 100644
index 000000000..dbdf06221
--- /dev/null
+++ b/npc/commands/ucp.txt
@@ -0,0 +1,67 @@
+function script UserCtrlPanel {
+ do
+ {
+ clear;
+ setnpcdialogtitle l("User Control Panel");
+ mes l("This menu gives you some options which affect your account.");
+ mes l("In some cases, your pincode will be required.");
+ mes "";
+ mes l("What do you want to access?");
+ next;
+ select
+ l("Rules"),
+ l("Game News"),
+ l("Account Information"),
+ l("Quit");
+
+ switch (@menu)
+ {
+ case 1: GameRules; break;
+ case 2: GameNews; break;
+ case 3:
+ if (!validatepin())
+ break;
+ query_sql("SELECT email,logincount,last_ip FROM `login` WHERE account_id="+getcharid(3)+"' LIMIT 2", .@email$, .@lgc, .@ip$);
+ mes l("Char Name: @@", strcharinfo(0));
+ mes l("Party Name: @@", strcharinfo(1));
+ mes l("Guild Name: @@", strcharinfo(2));
+ mes l("Clan Name: @@", strcharinfo(4));
+ mes "";
+ mes l("Email: @@", .@email$[0]);
+ if (Sex)
+ mes l("Male");
+ else
+ mes l("Female");
+ mes l("Last IP: @@", .@ip$[0]);
+ mes l("Total Logins: @@", .@lgc[0]);
+ next;
+ query_sql("SELECT name,last_login,last_map,partner_id FROM `char` WHERE account_id="+getcharid(3)+"' LIMIT 9", .@name$, .@lastlogin$, .@map$, .@married);
+ for (.@i = 1; .@i < getarraysize(.@name$); .@i++) {
+ mesn .@name$[i-1];
+ mes l("Last Seen: @@", .@lastlogin$[i-1]);
+ mes l("Last map: @@", .@map$[i-1]);
+ if (.@married[i-1])
+ mes l("Married with @@", gf_charname(.@married[i-1]));
+ mes "";
+ }
+ next;
+ break;
+ case 7: close; break;
+ }
+ } while (1);
+}
+
+
+
+- script @ucp 32767,{
+ end;
+
+OnCall:
+
+ UserCtrlPanel;
+ closedialog;
+ end;
+
+OnInit:
+ bindatcmd "ucp", "@ucp::OnCall", 0, 99, 0;
+}