diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-02 18:46:08 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-02 18:46:08 -0300 |
commit | e289099a4c2e4a0d7cf0bf32639825dadfcae7ac (patch) | |
tree | 0479665e332c512d6ae693966e8abc185e3689a7 | |
parent | 717d91c02abe5317fad4d6b6616b91d5628f9308 (diff) | |
download | serverdata-e289099a4c2e4a0d7cf0bf32639825dadfcae7ac.tar.gz serverdata-e289099a4c2e4a0d7cf0bf32639825dadfcae7ac.tar.bz2 serverdata-e289099a4c2e4a0d7cf0bf32639825dadfcae7ac.tar.xz serverdata-e289099a4c2e4a0d7cf0bf32639825dadfcae7ac.zip |
Friend Referall Prototype
-rw-r--r-- | db/re/item_db.conf | 32 | ||||
-rw-r--r-- | npc/functions/clientversion.txt | 28 |
2 files changed, 59 insertions, 1 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index db3eaf0fc..3e14c7164 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -2205,6 +2205,38 @@ item_db: ( "> }, { + Id: 612 + AegisName: "FriendGift" + Name: "Friend Gift" + Type: "IT_USABLE" + Buy: 0 + Sell: 0 + Weight: 0 + KeepAfterUse: false + Refine: false + Trade: { + notrade: true + nodrop: true + noselltonpc: true + nogstorage: true + nomail: true + noauction: true + } + Script: <" + if (BaseLevel < 5) { + dispbottom l("You must reach level 5 to open this gift."); + getitembound FriendGift, 1, 1; + } + getitem any(ScorpionStinger, BugLeg, MaggotSlime), rand(1,3); + getitem any(ScorpionStinger, BugLeg, MaggotSlime), rand(1,3); + Zeny=Zeny+50; + getitem any(Beer, CottonCloth), rand(1,2); + getitem any(PiouLegs, Piberries, Cheese), rand(1,2); + dispbottom l("Letter from @@:", #REFERRAL_PROG$); + dispbottom l("Dear @@, I send you this gift in hopes you do well in TMW2.", strcharinfo(0)); + "> +}, +{ Id: 700 AegisName: "SmallTentacles" Name: "Small Tentacles" diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index 043777d08..5fce72e2d 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -9,8 +9,34 @@ function script checkclientversion { // Skip any update for newcomers - if (isin("000-0", 0, 0, 40, 40)) + if (isin("000-0", 0, 0, 40, 40)) { UPDATE=gettimetick(2); + // if $EVENT$ is REFFER: + if (#REFERRAL_PROG$ == "") { + mesn l("TMW2 Staff"); + mesc l("Hello, and welcome to TMW2: Moubootaur Legends!"), 3; + mesc l("(Click next button to advance dialogs)"),9; + next; + mesn l("TMW2 Staff"); + mesc l("Did you came here by someone advise? If yes, write their name here!"), 3; + mesc l("If this is not the case, just click on \"Send\"."), 3; + input .@ref$; + mes ""; + if (.@ref$) { + #REFERRAL_PROG$=strip(.@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("I see. Well, welcome to the game! If you have any doubt, shout on #world for help!"), 3; + next; + } + if (ClientVersion >= 24) return; + } + } // Update handler (use `date +%s` for this) // Current UPDATE value: Qui Jun 7 08:10:55 -03 2018 |