Jump to content

Utility : Gift System


Lil Troll

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

/////////////////////////////////////////////////////////////////////////
//---------------------------------------------------------------------//
//                            GIFT SYSTEM                              //
//                     AUTHOR: LIL TROLL//COLDFIRE                     //
//---------------------------------------------------------------------//
//                          RATHENA SCRIPT                             //
//---------------------------------------------------------------------//
//                             V.1.2                                   //
//---------------------------------------------------------------------//
//    Credits to: 						       //
//	Mate NNDSL for requesting the script.                          //
//    	Sir GM Ocean for great suggestions. 			       //
//    Features: Gift Packaging NPC.                                    //
//    - Wrap any equipments that the player wears. 		       //
//    - Transfer and store item equip in SQL. 			       //
//    - Short personal message can be attached to the gift.            //
//    - GM Menu included(View,Delete Gift Records).		       //
//    - Items can be retrieve when using @gift.          	       //
//    - @gift menu will not appear if you don`t have any gifts 	       //
//	 	in inventory.                             	       //
//    - When claiming the gift, name of the giver and serial must be   //
//      inputted.                                                      //
//    - Best with Item Stack "1"(To prevent bugs/abuse).               //
//    - Built-in Item Checking (Anti-Abuse).			       //
//    - One gift can be created per char name only, when the gift is   //
//      used the player can create another one(Prevent bug/abuse).     //
//    - DB Append Included.                                            //
//    - Automatic/Manual Query-SQL Installation.                       //
//    - Auto-delete player @command garbage every 00:00.               //
//    - Used getitem2,deleteitem2 command, to retrieve items/gifts.    //
//    - Built-in Toggles for enabling Requirements(Zeny,Items).	       //
//    - NPC auto adjust to toggles.				       //
//---------------------------------------------------------------------//
///////////////////////////////////////////////////////////////////////// 

 

[spoiler=To Do List:]Run out of idea, please do suggest. :)

[spoiler=Change Logs:]v.1:

Initial release.

v.1.1:

More item checking added(Anti-Abuse).

Zeny toggle added.

Improve NPC dialogues.

Cleaned the whole script.

Suggested by Sir GM Ocean:

-Fix usage of variables.

-Merge 2 NPC's.

v.1.2:

Added if no equip checks.

Added Manual SQL installer.

Fix positioning of item checking.

Improve the whole script.

Added NPC dialogue colors.

Included message for the recipient.

GM Menu included(View,Delete Gift Records)

v.1.2.1:

Added If equip is changed checks.

v.1.2.2:

Fix typo in no equip checking see below(not working properly):

from: if(.@m==.p[.@a]&&getequipname(.p[.@a])==" ") {

to: if(.@m==.p[.@a]&&getequipname(.p[.@a])=="") {

[spoiler=Special Notes:]I mainly used getequip commands, I tried using getinventorylist command but found many loophole.

I tried things via trials and errors to counter all possible abuse, and this script was the result.

 

- Best with Item Stack "1"(To prevent bugs/abuses). Item DB append included in the script.

 

Feel free to suggest, comments, and report any encountered errors or bugs.

 

v.1: Gift_System.txt

v.1.1: [file accidentally over written]

v.1.2: Gift_System v.1.2.txt

v.1.2.1: Gift_System v.1.2.1.txt

v.1.2.2: Gift_System v.1.2.2.txt

 

 

Edited by Lil Troll
  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

awesome! Thank u! Very useful script :)

update: Why you need a Serial code in script?

Edited by nndsl
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  77
  • Reputation:   3
  • Joined:  06/06/13
  • Last Seen:  

Thanks for sharing this unique script Lil Troll +1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

As usual, your scripting skills are increasing at quite a steady pace. I only have 2 suggestion, and that is to remove the use of the $@gb var, and change to .gb var. Secondly, merge both of those NPCs into 1. It may be easier to read and look at as 2 different NPCs, but it's definitely not necessary.

 

Also, I don't think there is a need to bind 3 similar commands, if they are not spelt differently. I do believe that rAthena's @command system, is not case sensitive. Therefore, binding @gift should be all that is needed.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

As usual, your scripting skills are increasing at quite a steady pace. I only have 2 suggestion, and that is to remove the use of the $@gb var, and change to .gb var. Secondly, merge both of those NPCs into 1. It may be easier to read and look at as 2 different NPCs, but it's definitely not necessary.

 

Also, I don't think there is a need to bind 3 similar commands, if they are not spelt differently. I do believe that rAthena's @command system, is not case sensitive. Therefore, binding @gift should be all that is needed.

Noted sir GMOcean really, thanks! Regarding the @command, idk why but in my current svn it is case sensitive. :(

 

@pandacakep, thanks mate! 

 

EDITED:

 

As usual, your scripting skills are increasing at quite a steady pace. I only have 2 suggestion, and that is to remove the use of the $@gb var, and change to .gb var. Secondly, merge both of those NPCs into 1. It may be easier to read and look at as 2 different NPCs, but it's definitely not necessary.

 

Also, I don't think there is a need to bind 3 similar commands, if they are not spelt differently. I do believe that rAthena's @command system, is not case sensitive. Therefore, binding @gift should be all that is needed.

Thanks sir GM Ocean!

 

Bump updated to v.1.1. :)

Edited by Lil Troll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

Where's the v.1.1 Script?

Thanks for this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Where's the v.1.1 Script?

Thanks for this.

Forgot to save and add v.1.1 happened to update it to v.1.2. 

Uploaded new version.

awesome! Thank u! Very useful script :)

update: Why you need a Serial code in script?

I did that because anyone can open the gift box.

Bump, uploaded new update. Added if equip is changed checks.

Bump, updated again, fix typo error in if equip is changed checks.

Edited by Lil Troll
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...