Jump to content
  • 0

Request For Scripting Help Or Guide


Dolphin86

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  757
  • Reputation:   17
  • Joined:  01/07/12
  • Last Seen:  

Hello guys, im trying to combine these npc into 1 chained quest, but i failed, as u can see at Yaya part, this 

if( yayapart = 1 )

should combine with Start part 

yayapart = 1;

but its not working..... can someone tell me how can i fix this?

//===========================================================
//============== Start ======================================
//===========================================================
yuno_in04,117,5,4 script Prof. Edum 743,{
.@n$="[^00FF00Prof. Edum^000000]";
if (edum1 == 1){
        mes .@n$;
        mes "What you waiting for?";
        mes "go find yaya at";
  mes "Morroco field";
  mes "she should be digging";
  mes "for fosil right now";
        end;
        }
if(countitem(28905) == 1){
  mes .@n$;
  mes "Ohhhhh!!!!!";
  next;
  mes .@n$;
  mes "You have found it";
  next;
  mes .@n$;
  mes "Now let me read it for you";
  delitem 28905,1;
  next;
  mes .@n$;
  mes "&^%^#&*#@#@*$ahd^%^$787";
  mes "jsdhjsd jshdjysdnalidfs";
  mes "#^DBSksndfjsjhdwn";
  next;
  mes .@n$;
  mes "Hmmmm..........";
  next;
  mes .@n$;
  mes "i could only understood";
  mes "some few part of this";
  mes "scroll";
  next;
  mes .@n$;
  mes "Ahh yesss!!";
  mes "You might wana go";
  mes "visit a friend of mine";
  next;
  mes .@n$;
  mes "Look for Yaya";
  mes "she will know what";
  mes "does this part means";
  next;
  mes .@n$;
  mes "Oh bring this";
  next;
  mes "show it to her";
  mes "she will know i send u";
  mes "you can find her in Morroco";
  mes "desert";
  edum1 = 1;
  yayapart = 1;   //<------------------this here
  getitem 28906,1;
  close;
}
     switch(select("Hello Sir?:Leave him")){
      case 1:
       mes .@n$;
       mes "Oh hello there, how can i help u?";
       next;
       switch(select("What are you looking for?:Just say hi")){
       case 1:
        mes .@n$;
        mes "Well im currently studying";
        mes "an ancient helm";
        mes "it was worn by";
        mes "the great Lord Kaho";
        next;
        mes .@n$;
        mes "Ancient people call it";
        mes "by Lord Kaho Horn";
        mes "It was been told";
        mes "that those who worn";
        mes "it shall bestow a";
        mes "great power";
        next;
        switch(select("Interesting:I dont belive such thing")){
        case 1:
         mes .@n$;
         mes "Well if you interested";
         mes "to hear more";
         mes "help me find Kaho Scroll";
         mes "it should be around here";
         close;
        break;
        case 2:
         mes .@n$;
         mes "Well i am a professor";
         mes "i belive in fairy tales";
         close;
        }
       }
      break:
      case 2:
       mes .@n$;
       mes "Where could that";
       mes "scroll be...";
       close;
     }
}
//===========================================================================
//=================== Yaya ==================================================
//===========================================================================
moc_fild12,266,118,4 script Fosil Women 702,{
        .@n$ = "[^00FF00Yaya^000000]";
                          
                if (yayaquest == 1){  
                        mes .@n$;
                        mes "Hurry up and";
                        mes "look for Elbum";
      mes "he should be at";
      mes "Geffen Blacksmith";
                        end;
                }
                                                          
                if( yayapart = 1 ){ //<----------------------- 2nd part
                        mes .@n$;
                        mes "Hmm this fossil should";
                        mes "be emmm........";
                        next;
                        switch(select("Are you Yaya?:Leave her")) {
                                case 1:
                                        mes .@n$;
                                        mes "Indeed i am,";
                                        mes "who are you?";
                                        next;
                                        switch(select("tell your name:Just asking")){
                                                case 1:
                                                        mes .@n$;
                                                        mes "Ahh so you came";
                                                        mes "on behalf of Prof. Edum";
                                                        next;
                                                        if(countitem(28906) > 1) {
                                                                        mes .@n$;
                                                                        mes "Now what can an old";
                                                                        mes "lady as me help you?";
                                                                        next;
                                                                        mes "You tell her about";
                                                                        mes "Kaho Scroll";
                                                                        next;
                                                                        mes .@n$;
                                                                        mes "Well i would tell you";
                                                                        mes "about those part";
                                                                        mes "But you have to help me";
                                                                        next;
                                                                        mes .@n$;
                                                                        mes "can you go to geffen town";
                                                                        mes "and find Elbum";
                                                                        next;
                                                                        mes .@n$;
                                                                        mes "And tell him";
                                                                        mes "to come here";
                                                                        next;
                                                                        delitem 28906,1;
                                                                        mes .@n$;
                                                                        mes "I will take that badge";
                                                                        mes "bring this pickaxe";
                                                                        mes "he will know";
                  getitem 28907,1;
                                                                        yayaquest = 1;
                                                                        close;
                                                        }
                                                        mes .@n$;
                                                        mes "I guess he still trying";
                                                        mes "to solve that kaho horn";
                                                        end;
                                                case 2:
                                                        mes .@n$;
                                                        mes "Weird kid";
                                                        end;
                                        }
                                        break;
                                case 2:
                                        mes "Walk away";
                                        end;
                        }
                }
    mes .@n$;
    mes "I wonder what type";
    mes "of fosil is this";
    close;
       
}
//================================================================
//================ Elbum =========================================
//================================================================
geffen_in,100,170,4 script Elbum 97,{
.@n$ = "[^00FF00Elbum^000000]";
.@upgread = 10000000;
if (elbum == 1){
mes .@n$;
mes "Oh you have return";
mes "did you bring the money?";
switch(select("Yes:No")){
  case 1:
   if (Zeny < .@upgread) {
   next;
   mes .@n$;
   mes "Sorry, i think this is";
   mes "enough....";
   close;
   }
   Zeny -= .@upgread;
   next;
   mes .@n$;
   mes "All good";
   mes "let me make the payment";
   next;
   mes .@n$;
   mes "All done";
   mes "here take this";
   mes "reciept";
   getitem 28908,1;
   elbumdone = 1;
   next;
   mes .@n$;
   mes "Bring it to Yaya";
   close;
  break;
  case 2:
   mes .@n$;
   mes "Well getting that";
   mes "much money is not easy";
   close;
   }
  }
  
mes .@n$;
mes "Hey, thats Yaya";
mes "pick axe";
next;
mes .@n$;
mes "Did Yaya told you";
mes "to bring it to me?";
next;
switch(select("Yes:No")){
  case 1:
   mes .@n$;
   mes "Oh good thing";
   mes ".............";
   next;
   mes .@n$;
   mes ".............";
   next;
   mes .@n$;
   mes ".............";
   next;
   mes .@n$;
   mes "You see i got";
   mes "some problem";
   mes ".............";
   next;
   mes .@n$;
   mes "Yaya gave me";
   mes "10 million zeny";
   mes "for upgreading";
   mes "that pick axe u hold";
   next;
   mes .@n$;
   mes "But it had been";
   mes "stolen !";
   next;
   mes .@n$;
   mes "I cant tell Yaya";
   mes "she will kill me!";
   next;
   mes .@n$;
   mes "Could you help me";
   mes "with that stolen";
   mes "10 million zeny?";
   next;
   switch(select("Yes:No")){
    case 1:
    mes .@n$;
    mes "Oh thank you!";
    mes "bring me those";
    mes "10 million zeny";
    next;
    mes .@n$;
    mes "Oh let me hold";
    mes "that pick axe";
    delitem 28907,1;
    next;
    mes .@n$;
    mes "I will wait here";
    elbum = 1;
    close;
    break;
    case 2:
    mes .@n$;
    mes "I guess its too";
    mes "much to ask.....";
    close;
    }
  break;
  case 2:
   mes .@n$;
   mes "Ohh sorry then";
   mes "i might had mistaken";
   close;
   }
}
Edited by dolphincute
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  545
  • Reputation:   221
  • Joined:  03/01/13
  • Last Seen:  

Taken care of. It's always important to use as few variables as possible, especially in a single quest when trying to connect NPCs. Hopefully you'll get the hang of it. My biggest recommendation to anyone is to play through quests and then look at the script in their rathena/npc/ to understand how it works.

Regards,
~Azura Skyy

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