Jump to content

Recommended Posts

Posted

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
Posted

@tr0n

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

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

//= Itemizer

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

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

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

Posted (edited)

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
  • 2 months later...
Posted

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.

  • 2 weeks later...
  • 2 weeks later...
  • 3 months later...
Posted

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

  • 2 months later...
  • 11 months later...
  • 3 months later...
  • 2 months later...

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...