diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-02 18:59:30 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-02 18:59:30 -0300 |
commit | ac1604808b31777760c0059bc5da2c76ae9fd92d (patch) | |
tree | c58157b2d8359e5303ea18fa8ca2645a255f482e | |
parent | d9e50fad61fb5492640c1e7d00ae86fad64b51d5 (diff) | |
download | serverdata-ac1604808b31777760c0059bc5da2c76ae9fd92d.tar.gz serverdata-ac1604808b31777760c0059bc5da2c76ae9fd92d.tar.bz2 serverdata-ac1604808b31777760c0059bc5da2c76ae9fd92d.tar.xz serverdata-ac1604808b31777760c0059bc5da2c76ae9fd92d.zip |
Dealing with account ID is safer
-rw-r--r-- | db/re/item_db.conf | 1 | ||||
-rw-r--r-- | npc/functions/clientversion.txt | 22 |
2 files changed, 15 insertions, 8 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 7e55c5315..6c055988f 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -2232,7 +2232,6 @@ item_db: ( Zeny=Zeny+50; getitem any(Beer, CottonCloth), 1; getitem any(PiouLegs, Piberries, Cheese), rand(2,3); - dispbottom l("Letter from @@:", strcharinfo(0,"GM Team",#REFERRAL_PROG)); dispbottom l("Dear @@, I send you this gift in hopes you do well in TMW2.", strcharinfo(0)); "> }, 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; |