Jump to content
  • 0

@command On NPC


NexusXVI

Question


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

HI i want to add a command on an npc that triggers @cleanmap every 60sec .

Can anyone share?
 

Edited by NexusXVI
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


- script ijnoo -1,{

OnInit:

while(1) {

sleep 60000;// 60 secs

cleanmap "<map name>";

}

}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   131
  • Joined:  11/10/12
  • Last Seen:  

read this

*atcommand "<command>";

This command will run the given command line exactly as if it was typed in from 
the keyboard by the player connected to the invoking character, and that 
character belonged to an account which had GM level 99.

    // This will ask the invoker for a character name and then use the '@nuke'
    // GM command on them, killing them mercilessly.
    input @player$;
    atcommand "@nuke "+@player$;

Note that for atcommands bound using 'bindatcmd', this command will execute the
original atcommand, not the script-bound atcommand.

in your case, you need to put these in you script

<map>,<x>,<y>,<f>     script     <npcname>     <id>,{
     end;

OnInit:
     while(1) { //loop
          atcommand "@cleanmap";
          sleep 60000; //sleep for 60 seconds
     }
     end;
}

Just edit it by the way you need it.

Edited by LuLu
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   13
  • Joined:  06/20/12
  • Last Seen:  

Wouldn't be easier to use mapflag nodrop ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Well I want people to LOOT something. I just dont want the map to be fulled of trash

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   131
  • Joined:  11/10/12
  • Last Seen:  

Sorry to tell but there is a downside here. If the timer is running, lets says last wipe was 55 seconds ago, then some player drops an item. After 5 seconds the item that the player dropped will be removed immediately (it has been only 5 seconds since he/she drops it). So if the time is 59 seconds and you drop something, after 1 second, it will be removed. No one can loot it. What if players are teasing each other by dropping a rare item to the floor and the timer is at it's 59th second? That item will be wiped.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Why not use the city cleaner feature? You could spawn some monsters like kukre / andre / poring to help clean up the trash.

Or just reduce the delay on your conf file so droppped item will last shorter on the ground..  /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Already solved thanks :)

Link to comment
Share on other sites

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.

×
×
  • Create New...