• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

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