From ac1604808b31777760c0059bc5da2c76ae9fd92d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 2 Jul 2018 18:59:30 -0300 Subject: Dealing with account ID is safer --- npc/functions/clientversion.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'npc') diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index ac61c52b7..c903d20d0 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -26,14 +26,22 @@ function script checkclientversion { input .@ref$; mes ""; if (.@ref$ != "") { - .@ref=getcharid(0, strip(.@ref$)); + .@ref=getcharid(3, strip(.@ref$)); if (.@ref > 0) { - #REFERRAL_PROG=.@ref; - getitembound FriendGift, 1, 1; - mesn l("TMW2 Staff"); - mesc l("Well, welcome to the game! If you have any doubt, shout on #world for help!"), 3; - mesc l("Your friend also sent you a gift - open it when you get level 5!"), 3; - next; + if (.@ref == getcharid(3)) { + mesn l("TMW2 Staff"); + mesc l("Hahah, silly, that's yourself!"), 3; + mesc l("Try again!"), 3; + next; + .@ref$=""; + } else { + #REFERRAL_PROG=.@ref; + getitembound FriendGift, 1, 1; + mesn l("TMW2 Staff"); + mesc l("Well, welcome to the game! If you have any doubt, shout on #world for help!"), 3; + mesc l("Your friend also sent you a gift - open it when you get level 5!"), 3; + next; + } } else { mesn l("TMW2 Staff"); mesc l("Oops, there is nobody known as @@ on this game.", .@ref$), 3; -- cgit v1.2.3-60-g2f50