Jump to content

Event Ticket Rewarder + PHP Log Viewer (Anti GM Corruption)


Pancake

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   17
  • Joined:  02/06/12
  • Last Seen:  

A solution for GM corruption, and player doubt!

Prize Giving NPC

GMs use this NPC to give rewards without using #item or trading! This should be used in combination with removing @item from your Event GMs commands, and disabling their ability to trade.

The NPC logs everything in a SQL table, which you will need to create.

The NPC broadcasts that a player has received a prize(GMs have no way to hide the broadcast)

This script was not made by me, but it was heavily edited so that it only gives an item that you specify in the the settings, and will work with the group_id system!

Warning: If you do not use the group_id system you'll need to replace all instances of getgroupid() with getgmlevel()

SQL Log Web Viewer (PHP)

You can find an example of it

here.

It can be intergrated into a Flux page if you wish, but I chose not to.

Installation!

1)First execute this SQL query via phpmyadmin, or your preferred mysql query browser.


CREATE TABLE IF NOT EXISTS `itemizer` (
`id` int(11) unsigned NOT NULL auto_increment,
`item_id` int(11) NOT NULL,
`item_amount` int(11) NOT NULL,
`item_name` varchar(255) NOT NULL,
`char_id` int(11) NOT NULL,
`char_name` varchar(255) NOT NULL,
`reason` varchar(255) NOT NULL,
`by_gm` varchar(255) NOT NULL,
`when` datetime NOT NULL,
`for` varchar(255) NOT NULL,
`collected` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;

2) Place EventRewards.txt in your NPC/Custom Folder, and add it to scripts_custom.conf as so


npc: npc/custom/EventRewards.txt

3) (Optional Web Viewer) Open up Index.php and find this line.


mysql_connect("127.0.0.1", "User", "Password") or die (mysql_error ());

and

mysql_select_db("rathena_rag") or die(mysql_error());

Change 127.0.0.1 to your SQL database's IP, User to your SQL username, Password to your SQL password, and lastly rathena_rag to the name of your Ragnarok Database.

4) Create a new directory inside public_html called "rewards" or whatever you like, and place index.php in there!

5) I am not sure if it is safe to @loadnpc this script, so for safety reasons, I would suggest restarting the rAthena emulator.

6) Now give it a test, and if completed correctly you should have http://yourROsite.com/rewards/ looking like this.

~Credits~

*******Latheesan ( He created the original NPC called "Itemizer" )*******

Pancake ( Created the web viewer, and modified the script to work with group_id )

Coming soon:

The ability for GMs to whisper this NPC, so that they can reward players from any map!

  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

would be nice if you make a pagination system

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

dude i think the original script was mine haha ! i made the itemizer xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

@tr0n

if your nick was Latheesan... them you made it

//===== eAthena Script =======================================

//= Itemizer

//===== By: ==================================================

//= Latheesan (HeliosRO Server Admin) © 2009 HeliosRO.Com

//===== Current Version: =====================================

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

oh mkay, wasn't mine.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   17
  • Joined:  02/06/12
  • Last Seen:  

What is a pagination system?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  71
  • Topics Per Day:  0.02
  • Content Count:  328
  • Reputation:   13
  • Joined:  11/27/11
  • Last Seen:  

sir can you make the php file available only on the level 99 GM?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

What is a pagination system?

suqb6.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  71
  • Topics Per Day:  0.02
  • Content Count:  328
  • Reputation:   13
  • Joined:  11/27/11
  • Last Seen:  

the php not working for me :D

configured php.ini! THANKS :)

Edited by Lordamax
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   17
  • Joined:  02/06/12
  • Last Seen:  

If I can turn it into a Flux Addon, I will be able to make it viewable only by 99 GM. And i'll work on a page system! (:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

any news? :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

You could use getgmlevel() instead of getgrouid() for compatibility purpose as both are the same function, the only thing which changes is the return value to the caller function in case no player is found(0 in first function and 1 in second).

It's not about me, it's just because it's apparently more appropriated.

Edited by MarkZD
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  70
  • Reputation:   0
  • Joined:  02/05/12
  • Last Seen:  

Line 74 error xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

Line 74 error xD

change getgroupid to getgmlevel or update your rathena to the latest revision

@topic

any news about a pagination system being done? :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  01/31/12
  • Last Seen:  

Can we generate a list of items that can be given out? or at least restrict some items.

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

getgroupid() shouldn't be checked when you want a global permission or etc, because you can have groupid 200 that has gm 0 lv and no permission as well you can have a groupid 2 which is lv 100 and have all commands.

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  291
  • Reputation:   4
  • Joined:  04/24/12
  • Last Seen:  

why only event ticket? how i cant make item in here my gm lvl is 99?

Edited by v00m3r
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

how to set the maximum reward to 5?the default is 2.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   5
  • Joined:  06/25/12
  • Last Seen:  

I'm guessing it's this line.

set @max_item_amount,2;

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   3
  • Joined:  03/27/12
  • Last Seen:  

I never thought i would see our script floating around in 'public' and 'modified', lol

I forgot that latheesan posted it in eA... ahhh, memories.

XD

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  03/25/12
  • Last Seen:  

Any News? :/

Link to comment
Share on other sites

  • 11 months later...

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

Any update?

Link to comment
Share on other sites

  • 3 months later...

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

any update? it would be totally amazing to be able as an addon in fluxcp o:

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  81
  • Reputation:   1
  • Joined:  02/22/12
  • Last Seen:  

Any Update For This Script ???

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