Jump to content
  • 0

Mobs in custom instance


nelax

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/16/13
  • Last Seen:  

Good afternoon folks! I'm using a script that creates instances for PT. Would you like to know how to make the npc summon mobs when talking to him?

prontera,150,150,0	script	Dark Emissary	100,{

. @ mdName $ = "Kingdom of Darkness";
    
mes "[Emissary of Darkness]";
mes "The city is completely destroyed!";
mes "Few people will survive the attack of the dreaded The Dark!";
next;
mes "Help me eliminate everyone in the Kingdom of Darkness";
mes "That I will grant you great rewards!";
next;
switch (select ("Open Kingdom: Enter Kingdom: Leave Kingdom")) {
        
next;
case 1:
if (countitem (7227) <1) {
mes "[Emissary of Darkness]";
mes "Bring me the Key of Darkness and I will open the gates to the Kingdom of Darkness";
mes "Requirement:";
mes "1x" + getitemname (7227);
close;
}
            if (instance_create (. @ mdName $) <0) {
                mes "^ 0000ff" +. @ mdName $ + "^ 000000 cannot be opened now.";
                close;
            }
            mes "[Emissary of Darkness]";
            mes "The gate for ^ 0000ff" +. @ mdName $ + "^ 000000 has been opened.";
            mes "I wish you luck !.";
            close;
            
        case 2:
            if (instance_enter (. @ mdName $)) {
                mes "[Emissary of Darkness]";
                mes "There was a problem entering the instance.";
                close;
            }
            end;
            
        case 3:
            instance_destroy ();
            mes "[Emissary of Darkness]";
            mes "The instance has been destroyed.";
            close;
    }
}
nov_grnds,218,71,1	script	Dark Emissary	100,{

mes "Hello" + StrCharInfo (0) + ", Do you want to start Solo mode?";
next;
if (select ("Yes, come on: No, thanks") == 2) {close; }
mes "Okay, good luck!";
close;
}

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   232
  • Joined:  07/24/13
  • Last Seen:  

3 hours ago, nelax said:

Good afternoon folks! I'm using a script that creates instances for PT. Would you like to know how to make the npc summon mobs when talking to him?


prontera,150,150,0	script	Dark Emissary	100,{

. @ mdName $ = "Kingdom of Darkness";
    
mes "[Emissary of Darkness]";
mes "The city is completely destroyed!";
mes "Few people will survive the attack of the dreaded The Dark!";
next;
mes "Help me eliminate everyone in the Kingdom of Darkness";
mes "That I will grant you great rewards!";
next;
switch (select ("Open Kingdom: Enter Kingdom: Leave Kingdom")) {
        
next;
case 1:
if (countitem (7227) <1) {
mes "[Emissary of Darkness]";
mes "Bring me the Key of Darkness and I will open the gates to the Kingdom of Darkness";
mes "Requirement:";
mes "1x" + getitemname (7227);
close;
}
            if (instance_create (. @ mdName $) <0) {
                mes "^ 0000ff" +. @ mdName $ + "^ 000000 cannot be opened now.";
                close;
            }
            mes "[Emissary of Darkness]";
            mes "The gate for ^ 0000ff" +. @ mdName $ + "^ 000000 has been opened.";
            mes "I wish you luck !.";
            close;
            
        case 2:
            if (instance_enter (. @ mdName $)) {
                mes "[Emissary of Darkness]";
                mes "There was a problem entering the instance.";
                close;
            }
            end;
            
        case 3:
            instance_destroy ();
            mes "[Emissary of Darkness]";
            mes "The instance has been destroyed.";
            close;
    }
}
nov_grnds,218,71,1	script	Dark Emissary	100,{

mes "Hello" + StrCharInfo (0) + ", Do you want to start Solo mode?";
next;
if (select ("Yes, come on: No, thanks") == 2) {close; }
mes "Okay, good luck!";
close;
}

 

Hi, you can see sample of instance in rathena docs
https://github.com/rathena/rathena/blob/master/doc/sample/instancing.txt

monster instance_mapname("nov_grnds"),0,0,"Poring",1002,20;

 

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