Jump to content
  • 0

If speaked with ..


Werdio

Question


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  248
  • Reputation:   1
  • Joined:  06/27/12
  • Last Seen:  

I would make a Script with the function "If speaked with" but I don't know how x')

*le Scripts*

If I speaked with this NPC:

new_zone02,38,183,4 script Novice Equip Assistent 101,{
if (Talk > 0) {
mes "[ ^ff0000 Novice Equip Assistent^000000 ]";
mes "Gehe nun zum ^ff0000Novice Healing Item Assistenten.^000000";
close;
}
mes "[ ^ff0000 Novice Equip Assistent^000000 ]";
mes "Willkommen, ich zeige dir wie man das Equipment bedient.";
next;
mes "[ ^ff0000 Novice Equip Assistent^000000 ]";
mes "Mit der Tastenkombination ^008000Alt^000000 + ^ff0000Q^000000 öffnet sich ein Eqiupment Fesnter.";
mes "Somit hast du einen Überblick über deine ganze Ausrüstung.";
next;
mes "[ ^ff0000 Novice Equip Assistent^000000 ]";
mes "Mit der Tastenkombination ^008000Alt^000000 + ^ff0000E^000000 öffnet sich dein Inventar.";
mes "Somit hast du einen Überblick über deine ganzen Items oder Ausrüstungen.";
next;
mes "[ ^ff0000 Novice Equip Assistent^000000 ]";
mes "Zum Schluss erhälst du ein Equipment Starter Packet.";
mes "Somit hast du einen Überblick über deine ganzen Items oder Ausrüstungen.";
getitem 5055,1;
getitem 2393,1;
getitem 2414,1;
getitem 2510,1;
getitem 2112,1;
next;
 set Talk, 1;
mes "[ ^ff0000 Novice Equip Assistent^000000 ]";
mes "Gehe nun zum ^ff0000Novice Healing Item Assistenten.^000000";
close; }

I can speak with this NPC:

new_zone02,17,182,4 script Novice Healing Assistent 102,{
if (Talk > 1) end;
mes "[ ^ff0000 Novice Healing Item Assistent^000000 ]";
mes "Willkommen, ich zeige dir wie man Tränke einsetzt.";
next;
mes "[ ^ff0000 Novice Healing Item Assistent^000000 ]";
mes "Mit heilenden Tränken kannst du deine ^008000HP^000000 oder ^000088SP^000000 wieder regenerieren.";
mes "Somit kannst du im Falle eines Kampfes die Oberhand gewinnen.";
next;
mes "[ ^ff0000 Novice Healing Item Assistent^000000 ]";
mes "Zum Schluss erhälst du 20 ^008000Novice Potions^000000.";
getitem 569,20;
mes "Setzte sie sinnvoll ein!";
next;
 set Talk, 0;
mes "[ ^ff0000 Novice Healing Item Assistent^000000 ]";
mes "Gehe nun zum ^ff0000Novice Battle Assistenten.^000000";
close; }

îîîîîîîîî

And if I speaked with this NPC

I can speak with this NPC:

new_zone02,23,188,6 script Novice Battle Assistent 55,{
//Novice Battle Training
mes "[ ^ff0000Novice Battle Assistent^000000 ]";
mes "Möchtest du nun zum Trainingsgelände?";
next;
switch(select("Ja","Nein")) {
case 1:
 Save("new_zone03", 96, 31);
warp "new_zone03",96,31;
close;
case 2:
mes "[ ^ff0000Novice Battle Assistent^000000 ]";
mes "Komm wieder wenn du bereit bist.";
close; }
}
new_zone03,94,33,6 script Novice Battle Assistent 55,{
//Novice Battle Training
mes "[ ^ff0000Novice Battle Assistent^000000 ]";
mes "Möchtest du ein Paar Tipps?";
next;
switch(select("Ja","Nein")) {
case 1:
mes "[ ^ff0000Novice Battle Assistent^000000 ]";
mes "Von hier aus weiter findest du eine Brücke.";
mes "Geh über die Brücke und lauf immer gerade aus.";
mes "Danach folge dem ^ff0000Wegweiser^000000 .";
next;
mes "[ ^ff0000Novice Battle Assistent^000000 ]";
mes "Bitte beachte, dass du mindestens ^ff0000Job Level^000000 auf 10 haben musst um das Training zu beenden.";
next;
mes "[ ^ff0000Novice Battle Assistent^000000 ]";
mes "Übrigens:";
mes "Mit dem command ^008000/nc^000000 greift dein Charakter automatisch an. ";
mes "Dies könnte dir sehr von nutzem sein.";
next;
mes "[ ^ff0000Novice Battle Assistent^000000 ]";
mes "Viel Glück!";
close;
case 2:
mes "[ ^ff0000Novice Battle Assistent^000000 ]";
mes "So sei es.";
close; }
}

Please help me to complete this Script ;P

soFar~

Edited by Nochii
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

You need to use variables and if check statements

http://rathena.org/wiki/Variables

At the end of the first npc conversation add something like

set spoken, 1;

This might be worth reading as well : http://rathena.org/wiki/Basic_Scripting#Conditions.2C_Variables.2C_and_Set

Before the start of the second npc add

if ( spoken == 1 ) { blah blah blah }

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