Jump to content

Utility: @reward command


Missingno

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

File Name: @reward command

File Submitter: Missingno

File Submitted: 21 Feb 2014

File Category: Utilities

Content Author: Missingno


Description

Allows for preset or user-defined rewards via atcommand. Announce and logging options are also available.


Create this table in your logs schema:
CREATE TABLE IF NOT EXISTS `rewardlog` (	`id` int(11) unsigned NOT NULL auto_increment,	`account_id` int(11) NOT NULL,	`staff_name` varchar(255) NOT NULL,	`item_amount` int(11) NOT NULL,	`item_id` int(11) NOT NULL,	`item_name` varchar(255) NOT NULL,	`char_id` int(11) NOT NULL,	`player_name` varchar(255) NOT NULL,	`when` datetime NOT NULL,	PRIMARY KEY	(`id`)) ENGINE=MyISAM;



Click here to download this file

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

how cool o: pretty useful o:

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

i got problem im using put the script then i got rewardlog schema but still no @reward on my command

Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

i got problem im using put the script then i got rewardlog schema but still no @reward on my command

 

Load the script and initialise the settings; since you're using eAthena, You'll have to modify the code a bit.

 

Add this to line 35:

OnWhisperGlobal:


The final result should look like this:

K2PzRGv.png

 

Then, whisper anything to npc:reward to initialise the settings. Note that you will not see @reward in your @commands list, since it was created via script.

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   1
  • Joined:  03/22/13
  • Last Seen:  

it is not working. I set the preset items to 0 and typed the @reward 909 100 Player it says the player was not online. But it was online.

 

I tried to add the OnWhisperGlobal and PMed npc:reward typing the same commands above and still no luck, 

Edited by memel25
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

it is not working. I set the preset items to 0 and typed the @reward 909 100 Player it says the player was not online. But it was online.

 

I tries to add the OnWhisperGlobal and PMed npc:reward typing the same commands above and still no luck, 

 

If you're running rAthena, you should be able to simply load the script and execute the command. Make sure you run the SQL query as well; I just tested this again to ensure its functionality, and it works fine. Note that if you've previously loaded this script into your server with @loadnpc, you'll have to unload it before loading it again (@unloadnpc reward).

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   1
  • Joined:  03/22/13
  • Last Seen:  

Yes I did unload and load, I also tried to use reloadscript but it was always saying the player was not online. Even the first load of the script w/o the OnWhisperGlobal

Edited by memel25
Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  114
  • Topics Per Day:  0.03
  • Content Count:  298
  • Reputation:   4
  • Joined:  03/13/12
  • Last Seen:  

it says unknown command and i get an error check the pic

 

 

post-3084-0-18296000-1408574869_thumb.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

it says unknown command and i get an error check the pic

 

You'll have to convert all variable declarations to use the set command. This script works as intended for rAthena emulators.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  114
  • Topics Per Day:  0.03
  • Content Count:  298
  • Reputation:   4
  • Joined:  03/13/12
  • Last Seen:  

 

it says unknown command and i get an error check the pic

 

You'll have to convert all variable declarations to use the set command. This script works as intended for rAthena emulators.

 

how to do so. im noob with scripting

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

PEfb2x6.jpg

Could not find character online, I'm guessing the need of isloggedin()?

Edited by darristan
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  06/25/12
  • Last Seen:  

PEfb2x6.jpg

Could not find character online, I'm guessing the need of isloggedin()?

Have the same error! just found out that the players name has a SPACE on the beginning of it so it doesn't find it Online. What would be the solution about this hmmm....???? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

Have the same error! just found out that the players name has a SPACE on the beginning of it so it doesn't find it Online. What would be the solution about this hmmm....????

I doubt the space in the beginning of the name for the query was intentional, but I'll look into a solution for a name query with a space in the beginning of the name (though honestly, players shouldn't be allowed to have spaces in the beginning of their name).

  • Upvote 1
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

this is working ? i try but type @reward 1 Player  why not online ?

Edited by DrewxD
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   1
  • Joined:  10/11/12
  • Last Seen:  


[Error]:  Loading NPC file: npc/hydeist/Quest/gmprize.txt
script error on npc/hydeist/Quest/gmprize.txt line 38
    parse_line: expect command, missing function name or calling undeclared function
    34 : {
    35 :
    36 :        OnInit:
    37 :                // Configuration
*   38 :                'b'indatcmd "reward", strnpcinfo(3) +"::OnAtcommand", 40, 40;
    39 :
    40 :                // Enable preset items? 1 = yes, 0 = no
    41 :                .preset = 1;
    42 :
    43 :                // Announce reward? 1 = yes, 0 = no
[info]: Done loading '11291' NPCs:
        -'3039' Warps
        -'253' Shops
        -'7999' Scripts
        -'4003' Spawn sets
        -'43015' Mobs Cached
        -'0' Mobs Not Cached
 

 

 

 

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  09/09/16
  • Last Seen:  

Is this fixed/working?

Link to comment
Share on other sites

  • 3 years later...

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

any update for this script? Its useful. but i cant seem to make it work.

image.png.14cc23430753243cc3ae19b18e8019c2.png

 

Nevermind i have fixed it already. You should change the OnAtcommand to OnAtCommand.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

Hello! Is it possible to add an npc to view the current reward logs?

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