Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Welcome back rewards

Newbie Spellweaver
Joined
Feb 5, 2018
Messages
9
Reaction score
3
Just a small script which gives a Character a Item if he logs in after being inactive for a while.
It goes into the Login Procedure and will put the respective Item into the Rewards Inventory.

IF EXISTS (SELECT * FROM tCharacter WHERE dLastLoginDate < DATEADD(month, -1, GETDATE()) and nCharNo = @nCharNo)
INSERT INTO tItem (nItemKey,nStorageType,nOwner,nStorage,nItemID,nFlags,dDate)
VALUES (ABS(CHECKSUM(NewId())) % 99999999999,2,@nCharNo,0,5,0,GETDATE());

Change this to adjust the Script for your needs:
month: Can be replaced with Day or Year if required.
-1: Means that the script will be triggered only if the last login was 1 month ago.
5: The ItemID which you can find in your ItemInfo.shn.

I felt like this function was missing, for sure its not that much relevant for private servers but maybe you can find a good use for it :)

 
Newbie Spellweaver
Joined
Jun 23, 2015
Messages
48
Reaction score
15
This is pretty cool. Reminds me of that Returning Mercenaries feature in vindictus
 
Back
Top