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.
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
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