diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-08-05 15:03:15 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-08-05 15:03:15 -0300 |
commit | 60a1a09e65b1d0454cc6abdd4d4ef4966a6d283d (patch) | |
tree | 2ce1b2027119b7898e19f6319e79b724001c30ea /npc/functions | |
parent | 01c5867999b02f367d74698d73638a0104572c67 (diff) | |
download | serverdata-jesusalva/masterpatch.tar.gz serverdata-jesusalva/masterpatch.tar.bz2 serverdata-jesusalva/masterpatch.tar.xz serverdata-jesusalva/masterpatch.zip |
Placeholder to send referrer rewards.jesusalva/masterpatch
The rewards themselves have dependencies. So skipped for MR 243.
/wip
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/global_event_handler.txt | 1 | ||||
-rw-r--r-- | npc/functions/referral.txt | 54 |
2 files changed, 55 insertions, 0 deletions
diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt index a6d634ed..bc469645 100644 --- a/npc/functions/global_event_handler.txt +++ b/npc/functions/global_event_handler.txt @@ -44,6 +44,7 @@ OnPCDieEvent: OnPCBaseLvUpEvent: //callfunc("newquestwarning"); + callfunc("ReferralSendLvReward"); end; OnNPCKillEvent: diff --git a/npc/functions/referral.txt b/npc/functions/referral.txt new file mode 100644 index 00000000..48231992 --- /dev/null +++ b/npc/functions/referral.txt @@ -0,0 +1,54 @@ +// The Mana World scripts. +// Author: +// Moubootaur Legends Team +// Jesusalva +// Description: +// Referral System - rewards +// Note: Does not support multi-levelup + +function script ReferralSendLvReward { + .@referv=getvaultvar(REFERRAL_PROG); + if (.@referv < 1) + return; + + .@cid="playerCache"::account2char(.@aid); + .@status=getvaultvar(REFERRAL_CTRL); + switch (BaseLevel) { + case 25: + if (.@status > 1) + break; + + // FIXME PLACEHOLDER !! + rodex_sendmail(.@cid, "TMW Team", "Recruited Player got Lv 25!", strcharinfo(0)+" just got level 25!\nAs they get stronger, more rewards will be sent to you!", 0, Acorn, 1); + .@status+=1; + break; + case 50: + if (.@status > 2) + break; + + // FIXME PLACEHOLDER !! + rodex_sendmail(.@cid, "TMW Team", "Recruited Player got Lv 25!", strcharinfo(0)+" just got level 25!\nAs they get stronger, more rewards will be sent to you!", 0, Acorn, 1); + .@status+=1; + break; + case 75: + if (.@status > 3) + break; + + // FIXME PLACEHOLDER !! + rodex_sendmail(.@cid, "TMW Team", "Recruited Player got Lv 25!", strcharinfo(0)+" just got level 25!\nAs they get stronger, more rewards will be sent to you!", 0, Acorn, 1); + .@status+=1; + break; + case 100: + if (.@status > 4) + break; + + // FIXME PLACEHOLDER !! + rodex_sendmail(.@cid, "TMW Team", "Recruited Player got Lv 25!", strcharinfo(0)+" just got level 25!\nAs they get stronger, more rewards will be sent to you!", 0, Acorn, 1); + .@status+=1; + break; + } + setvaultvar(REFERRAL_CTRL, .@status); + return; +} + + |