Jump to content
  • 0

R>Script that makes commands


Question

Posted

are there scripts that can be made for commands instead of editing the source?

commands like @afk, @whosell, @itemrain, & @order

if so, could i request for it?

 

@afk - afk a persons account when logout

@whosell - finds a vendor that sells a specific item

         ex. @whosell 607 - find a shop selling Ygg Berry (607)

@itemrain - drops items on the screen visibile to the person using the command

         ex. @itemrain 607 - rains ygg berries on the map visible on the person who types the command

@order <message>- broadcasts a message only the guild sees, only the guild leader can use this command

6 answers to this question

Recommended Posts

  • 1
Posted

@afk - afk a persons account when logout

@whosell - finds a vendor that sells a specific item

         ex. @whosell 607 - find a shop selling Ygg Berry (607)

these 2 definitely needs source coding

@itemrain - drops items on the screen visibile to the person using the command

         ex. @itemrain 607 - rains ygg berries on the map visible on the person who types the command

-	script	Haze	100,{
Onitemrain:
	.@itemid = atoi( .@atcmd_parameters$ );
	if ( getitemname( .@itemid ) == "null" ) {
		message strcharinfo(0), "Invalid Item ID";
		end;
	}
	.@area = getbattleflag("area_size");
	getmapxy .@map$, .@x, .@y, 0;
	while ( .@i < 100 ) {
		makeitem .@itemid, 1, .@map$, .@x + rand( -.@area, .@area ), .@y + rand( -.@area, .@area );
		.@i++;
	}
	end;
OnInit:
	bindatcmd "itemrain", strnpcinfo(0) +"::Onitemrain", 60,100;
	end;
}

@order <message>- broadcasts a message only the guild sees, only the guild leader can use this command

-	script	Haze	100,{
Onorder:
	if ( !getcharid(2) ) end;
	if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) {
		message strcharinfo(0), "Only guild master can use this command";
		end;
	}
	.msg$ = .@atcmd_parameters$;
	addrid 3, 0, getcharid(2);
	announce .msg$, bc_self;
	end;
OnInit:
	bindatcmd "order", strnpcinfo(0) +"::Onorder", 0,100;
	end;
}
  • Upvote 2
Posted


*bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};

This command will bind a NPC event label to an atcommand. Upon execution of the

atcommand, the user will invoke the NPC event label. Each atcommand is only allowed

one binding. If you rebind, it will override the original binding.

The following variables are set upon execution:

    .@atcmd_command$ = The name of the @command used.

    .@atcmd_parameters$[] = Array containing the given parameters, starting from an index of 0.

    .@atcmd_numparameters = The number of parameters defined.

Example:

When a user types the command "@test", an angel effect will be shown.

-    script    atcmd_example    -1,{

OnInit:

    bindatcmd "test",strnpcinfo(3)+"::OnAtcommand";

    end;

OnAtcommand:

    specialeffect2 338;

    end;

}

  • Upvote 1
Posted · Hidden by Patskie, December 8, 2013 - Some sort of advertisement in my opinion
Hidden by Patskie, December 8, 2013 - Some sort of advertisement in my opinion

hercules have that all commands

Posted

 

@afk - afk a persons account when logout

@whosell - finds a vendor that sells a specific item

         ex. @whosell 607 - find a shop selling Ygg Berry (607)

these 2 definitely needs source coding

@itemrain - drops items on the screen visibile to the person using the command

         ex. @itemrain 607 - rains ygg berries on the map visible on the person who types the command

-	script	Haze	100,{
Onitemrain:
	.@itemid = atoi( .@atcmd_parameters$ );
	if ( getitemname( .@itemid ) == "null" ) {
		message strcharinfo(0), "Invalid Item ID";
		end;
	}
	.@area = getbattleflag("area_size");
	getmapxy .@map$, .@x, .@y, 0;
	while ( .@i < 100 ) {
		makeitem .@itemid, 1, .@map$, .@x + rand( -.@area, .@area ), .@y + rand( -.@area, .@area );
		.@i++;
	}
	end;
OnInit:
	bindatcmd "itemrain", strnpcinfo(0) +"::Onitemrain", 60,100;
	end;
}

@order <message>- broadcasts a message only the guild sees, only the guild leader can use this command

-	script	Haze	100,{
Onorder:
	if ( !getcharid(2) ) end;
	if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) {
		message strcharinfo(0), "Only guild master can use this command";
		end;
	}
	.msg$ = .@atcmd_parameters$;
	addrid 3, 0, getcharid(2);
	announce .msg$, bc_self;
	end;
OnInit:
	bindatcmd "order", strnpcinfo(0) +"::Onorder", 0,100;
	end;
}

 

Thank you so much for this :D

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