Jump to content
  • 0

Requesting a NPC for GM to use @item


Question

Posted

I would like to have a NPC that i can put at my GM headquarters.

This npc let GM's above a certain lvl to use it to get item = replacing @item

And it allow lvl 99 gm's to view the log of which GM get what item from the NPC. to prevent abuse

anyone ?

5 answers to this question

Recommended Posts

Posted (edited)

http://pastebin.com/S6FcKnYf

try modifying it

for me it works perfectly fine

been using it since before

if you want to check logs

check for these tables in your database

gmspawner

gmname

pro's and cons

about this cons

sub gm's can spam this npc

i haven't modified it to have an interval for the next request of the sub gm

maybe you can work on that one

Edited by icabit
Posted

http://pastebin.com/S6FcKnYf

try modifying it

for me it works perfectly fine

been using it since before

if you want to check logs

check for these tables in your database

gmspawner

gmname

pro's and cons

about this cons

sub gm's can spam this npc

i haven't modified it to have an interval for the next request of the sub gm

maybe you can work on that one

is not appearing D: it says script loaded.

i even tabbed the

sec_pri,26,47,4 script GMSPAWNER 990,{

Posted

@Kiritoryu

This script works only with rathena. Be sure you set a correct groupid for your GM.

@icabit

You can use getgroupid() instead of

query_sql "SELECT `group_id` FROM `login` WHERE `account_id` ="+getcharid(3),.@getgroupid;

No need to put an end; after close;

dewata,162,274,4    script    GMSPAWNER    990,{

   if( getgroupid() <= 3 ) {
       mes "Only staffs can do transaction with me.";
       close;
   }
   else {
       mes "Spawn Monster or Get Item";
       switch( select( "Monster:Item" ) ) {
           case 1:
               mes "[ ^FF0000Enter Monster ID^000000 ]";
               mes "Refer From Ratemyserver.net";
               input .@monsterid$;
               next;

               mes "[ ^FF0000Enter Amount^000000 ]";
               input .@amount$;
               next;

               mes "[ ^FF0000Enter Map name^000000 ]";
               mes "Refer From Ratemyserver.net";
               mes "example pay_fild04";
               input .@map$;
               next;

               mes "[ ^FF0000Enter Valid Reason^000000 ]";
               mes "Be responsible with your spawning";
               input .@reason$;
               next;

               query_sql "INSERT INTO `gmspawner` (`char_id`,`gmname`,`monsterid`,`amount`,`map`,`reason`,`TimeandDate`) VALUES (" + getcharid(0) + ",'" + strcharinfo(0) + "','"+.@monsterid$+"','"+.@amount$+"','"+.@map$+"','"+.@reason$+"','" + gettimestr("%A %B %d %Y - %I:%M %p",40) + "')";
               mes "your summoning was successfull";
               monster .@Map$,0,0,"SPAWNED BY A GM",.@monsterid$,.@amount$,"GMSPAWNER::OnSpecialKill";
               close;

           case 2:
               mes "[ ^FF0000Enter Item ID^000000 ]";
               mes "Refer From Ratemyserver.net";
               input .@itemid;
               next;

               mes "[ ^FF0000Enter Amount^000000 ]";
               input .@amount;
               next;

               mes "[ ^FF0000Enter Valid Reason^000000 ]";
               mes "Be responsible with the item your getting";
               input .@reason$;
               next;

               query_sql "INSERT INTO `gmitem` (`char_id`,`gmname`,`itemid`,`amount`,`reason`,`TimeandDate`) VALUES (" + getcharid(0) + ",'" + strcharinfo(0) + "','"+.@itemid+"','"+.@amount+"','"+.@reason$+"','" + gettimestr("%A %B %d %Y - %I:%M %p",40) + "')";
               mes "your summoning was successfull";
               getitem .@itemid,.@amount;
               close;
       }
   }

OnInit:
   query_sql("CREATE TABLE IF NOT EXISTS `gmspawner` (`char_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `gmname` varchar(255) NOT NULL DEFAULT '0', `monsterid` varchar(255) NOT NULL DEFAULT '0', `amount` varchar(255) NOT NULL DEFAULT '0', `map` varchar(255) NOT NULL DEFAULT '0', `reason` varchar(255) NOT NULL DEFAULT '0', `TimeandDate` varchar(255) NOT NULL DEFAULT '0', KEY `char_id` (`char_id`)) ENGINE=MyISAM");
   query_sql("CREATE TABLE IF NOT EXISTS `gmitem` (`char_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `gmname` varchar(255) NOT NULL DEFAULT '0', `itemid` varchar(255) NOT NULL DEFAULT '0', `amount` varchar(255) NOT NULL DEFAULT '0', `reason` varchar(255) NOT NULL DEFAULT '0', `TimeandDate` varchar(255) NOT NULL DEFAULT '0', KEY `char_id` (`char_id`)) ENGINE=MyISAM");
   end;
}

  • Upvote 1

Join the conversation

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

Guest
Answer this question...

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