Pancake Posted March 20, 2012 Posted March 20, 2012 A solution for GM corruption, and player doubt! Prize Giving NPC EventRewards.txt 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) index.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! 3 Quote
EvilPuncker Posted March 20, 2012 Posted March 20, 2012 would be nice if you make a pagination system Quote
tr0n Posted March 20, 2012 Posted March 20, 2012 dude i think the original script was mine haha ! i made the itemizer xD Quote
EvilPuncker Posted March 20, 2012 Posted March 20, 2012 @tr0n if your nick was Latheesan... them you made it //===== eAthena Script ======================================= //= Itemizer //===== By: ================================================== //= Latheesan (HeliosRO Server Admin) © 2009 HeliosRO.Com //===== Current Version: ===================================== Quote
Lordamax Posted March 20, 2012 Posted March 20, 2012 sir can you make the php file available only on the level 99 GM? Quote
Lordamax Posted March 21, 2012 Posted March 21, 2012 (edited) the php not working for me configured php.ini! THANKS Edited March 21, 2012 by Lordamax Quote
Pancake Posted March 22, 2012 Author Posted March 22, 2012 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! (: Quote
MarkZD Posted March 28, 2012 Posted March 28, 2012 (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 March 28, 2012 by MarkZD Quote
EvilPuncker Posted April 2, 2012 Posted April 2, 2012 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? Quote
zhiren Posted April 5, 2012 Posted April 5, 2012 Can we generate a list of items that can be given out? or at least restrict some items. Quote
MarkZD Posted June 24, 2012 Posted June 24, 2012 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. Quote
v00m3r Posted July 3, 2012 Posted July 3, 2012 (edited) why only event ticket? how i cant make item in here my gm lvl is 99? Edited July 3, 2012 by v00m3r Quote
Brynner Posted July 17, 2012 Posted July 17, 2012 how to set the maximum reward to 5?the default is 2. Quote
Eroces Posted July 17, 2012 Posted July 17, 2012 I'm guessing it's this line. set @max_item_amount,2; Quote
Pinky Posted October 24, 2012 Posted October 24, 2012 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 Quote
Kido Posted April 15, 2014 Posted April 15, 2014 any update? it would be totally amazing to be able as an addon in fluxcp o: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.