Jump to content
  • 0

how to set this npc? see the code and desc


khenma09

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   1
  • Joined:  10/15/13
  • Last Seen:  

can anyone make a NPC script that will set players into specific map into a limited amount of players can enter, and will countdown to disable npc right after the room is full or in a 3 minutes time.
 
example steps:
1. enable npc for queue or in a 3 minutes time. I preferred 3 minutes time. (Example of location of warper for event NPC --prontera)
2. then once full or 3mins. time is elapsed, disabled npc for entering then
inside the said room:
3. a 1 minute pause/ countdown again before starting the event. so the players will get ready.
4. then 3-4 monsters will be summon inside room that will automatically attack the players.
5.then the last man/character standing will be the winner. will be given the item reward.
 
 
on the script, the npc will only start countdown when i click it. but i want it to start the count down when the room is full or 3 minutes time elapsed.
should be Broadcasts to all...
 
hope you can help me. Thanks!
 
here's the code:
 

 

 

 


g_room1-3,64,185,3    script    RFYL Event    668,{
        // We need to use attachnpctimer because the mes command below 
        // needs RID attach
        attachnpctimer;
        initnpctimer;
        npctalk "We will start in a short time, give me 15 seconds";
        end;
    OnTimer15000:
        npctalk "Ok 5 seconds more";
        end;
    OnTimer6000:
        npctalk "4";
        end;
    OnTimer7000:
        npctalk "3";
        end;
    OnTimer8000:
        npctalk "2";
        end;
    OnTimer9000:
        npctalk "1";
        end;
    OnTimer10000:
        stopnpctimer;
        mes "[Man]";
        mes "Ok Let us start the RFYL Event";
        mes "Good Luck to all participants!";
        monster "g_room1-3",64,185,"Poring",1002,4,"NPCNAME::OnLabel";
        for (set .@i, 0; .@i < .mobnumber; set .@i, .@i + 1){
        set .@mobGID, monster ("g_room1-3",64,185,"Killer Poring",1002,4);
        unitattack .@mobGID, getcharid(3);
        }
        close;
        detachnpctimer;
        // and remember attachnpctimer and detachnpctimer can only be used 
        // while the NPC timer is not running!
    }

 

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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