Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script Sample#kill -1,{
- OnInit:
- bindatcmd("test",strnpcinfo(0)+"::OnAtCommand");
- .ItemID = 512;
- .Amount = 1;
- .Range = 15;
- end;
- OnAtCommand:
- if( countitem( .ItemID ) < .Amount ){
- dispbottom "You need "+.Amount+" x "+getitemname( .ItemID );
- }else if( getstrlen( .@atcmd_parameters$[0] ) < 4 ){
- dispbottom "Please enter a player name.";
- }else if( isloggedin( getcharid( 3,.@atcmd_parameters$[0] ) ) && strcharinfo(0) != .@atcmd_parameters$[0] ){
- getmapxy( .@Map1$,.@X1,.@Y1,0,.@atcmd_parameters$[0] );
- getmapxy( .@Map2$,.@X2,.@Y2,0,strcharinfo(0) );
- if( distance( .@X1,.@Y1,.@X2,.@Y2 ) < .Range ){
- unitkill getcharid( 3,.@atcmd_parameters$[0] );
- unittalk getcharid(3),"I killed "+.@atcmd_parameters$[0];
- delitem .ItemID,.Amount;
- }else{
- dispbottom "Please get closer to him...";
- }
- }else{
- dispbottom "Must be an Online Player but not yourself.";
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment