Railgun Posted September 6, 2018 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 7 Reputation: 1 Joined: 08/21/18 Last Seen: March 19, 2022 Share Posted September 6, 2018 Hi everyone! I'm newbie here. Sorry for my bad english. I want to ask something about scripting. How can i add conversation to npc script if i had a conversation like this: Ex: Healer NPC [Healer] I have amazing healing powers!! You look like a person who needs them Want some? Then appear dialog box with 2 choices "Yes heal me please!" and "No thanks" If i choose "Yes heal me please!" he will heal me and give me buff And if i choose "No thanks" he will say "Allright, come back if you need a heal." Also i had a healer script made by Euphy like this: - script Healer -1,{ .@Price = 0; // Zeny required for heal .@Buffs = 0; // Also buff players? (1: yes / 0: no) .@Delay = 0; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if (.@Price) { message strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny."; if (Zeny < .@Price) end; if (select("^0055FFHeal^000000:^777777Cancel^000000") == 2) end; Zeny -= .@Price; } specialeffect2 EF_HEAL2; percentheal 100,100; if (.@Buffs) { specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; } if (.@Delay) @HD = gettimetick(2) + .@Delay; end; } Quote Link to comment Share on other sites More sharing options...
0 hendra814 Posted September 6, 2018 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 1281 Reputation: 170 Joined: 06/12/12 Last Seen: 2 hours ago Share Posted September 6, 2018 (edited) 1 hour ago, Railgun said: Hi everyone! I'm newbie here. Sorry for my bad english. I want to ask something about scripting. How can i add conversation to npc script if i had a conversation like this: Ex: Healer NPC [Healer] I have amazing healing powers!! You look like a person who needs them Want some? Then appear dialog box with 2 choices "Yes heal me please!" and "No thanks" If i choose "Yes heal me please!" he will heal me and give me buff And if i choose "No thanks" he will say "Allright, come back if you need a heal." Also i had a healer script made by Euphy like this: - script Healer -1,{ .@Price = 0; // Zeny required for heal .@Buffs = 0; // Also buff players? (1: yes / 0: no) .@Delay = 0; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if (.@Price) { message strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny."; if (Zeny < .@Price) end; if (select("^0055FFHeal^000000:^777777Cancel^000000") == 2) end; Zeny -= .@Price; } specialeffect2 EF_HEAL2; percentheal 100,100; if (.@Buffs) { specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; } if (.@Delay) @HD = gettimetick(2) + .@Delay; end; } Here, i'm already make it for my own //===== rAthena Script ======================================= //= Healer //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Basic healer script. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Aligned coordinates with @go. //============================================================ prontera,151,187,5 script Healer 742,{ mes "[Healer]"; mes "I have amazing healing powers!!"; mes "You look like a person who needs them"; mes "Want some?"; next; if (select("Heal:No thanks") == 2) { mes "[Healer]"; mes "Allright, come back if you need a heal."; end; } set .@Price,0; // Zeny required for heal set .@Buffs,0; // Also buff players? (1: yes / 0: no) set .@Delay,0; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if (.@Price) { message strcharinfo(0),"Healing costs "+callfunc("F_InsertComma",.@Price)+" Zeny."; if (Zeny < .@Price) end; if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) end; set Zeny, Zeny-.@Price; } specialeffect2 EF_HEAL2; percentheal 100,100; if (.@Buffs) { specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; } if (.@Delay) set @HD, gettimetick(2)+.@Delay; end; } // Duplicates //============================================================ alberta,25,240,6 duplicate(Healer) Healer#alb 742 aldebaran,135,118,6 duplicate(Healer) Healer#alde 742 amatsu,200,79,4 duplicate(Healer) Healer#ama 742 ayothaya,207,169,6 duplicate(Healer) Healer#ayo 742 comodo,184,158,6 duplicate(Healer) Healer#com 742 einbech,57,36,6 duplicate(Healer) Healer#einbe 742 einbroch,57,202,6 duplicate(Healer) Healer#einbr 742 geffen,115,72,6 duplicate(Healer) Healer#gef 742 gonryun,156,122,6 duplicate(Healer) Healer#gon 742 hugel,89,150,6 duplicate(Healer) Healer#hug 742 izlude,121,150,6 duplicate(Healer) Healer#izl 742 //Pre-RE: (125,118) jawaii,250,139,4 duplicate(Healer) Healer#jaw 742 lighthalzen,152,100,6 duplicate(Healer) Healer#lhz 742 louyang,226,103,4 duplicate(Healer) Healer#lou 742 manuk,272,144,6 duplicate(Healer) Healer#man 742 mid_camp,203,289,6 duplicate(Healer) Healer#mid 742 moc_ruins,72,164,4 duplicate(Healer) Healer#moc 742 morocc,153,97,6 duplicate(Healer) Healer#mor 742 moscovia,220,191,4 duplicate(Healer) Healer#mos 742 niflheim,212,182,5 duplicate(Healer) Healer#nif 742 payon,179,106,4 duplicate(Healer) Healer#pay 742 rachel,125,116,6 duplicate(Healer) Healer#rac 742 splendide,201,153,4 duplicate(Healer) Healer#spl 742 thor_camp,249,74,4 duplicate(Healer) Healer#thor 742 umbala,105,148,3 duplicate(Healer) Healer#umb 742 veins,217,121,4 duplicate(Healer) Healer#ve 742 xmas,143,136,4 duplicate(Healer) Healer#xmas 742 yuno,164,45,4 duplicate(Healer) Healer#yuno 742 // Duplicates (Renewal) //============================================================ brasilis,194,221,6 duplicate(Healer) Healer#bra 742 dewata,195,187,4 duplicate(Healer) Healer#dew 742 dicastes01,201,194,4 duplicate(Healer) Healer#dic 742 ecl_in01,45,60,4 duplicate(Healer) Healer#ecl 742 malangdo,132,114,6 duplicate(Healer) Healer#mal 742 malaya,227,204,6 duplicate(Healer) Healer#ma 742 mora,55,152,4 duplicate(Healer) Healer#mora 742 Edited September 6, 2018 by hendra814 Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted September 6, 2018 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 4 hours ago Share Posted September 6, 2018 (edited) *switch (expression); *if (<condition>) <statement>; *mes "<string>"{,"<string>"{,...}}; *select("<option>"{,"<option>",...}) Edited September 6, 2018 by sader1992 Quote Link to comment Share on other sites More sharing options...
0 Railgun Posted September 6, 2018 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 7 Reputation: 1 Joined: 08/21/18 Last Seen: March 19, 2022 Author Share Posted September 6, 2018 (edited) Thanks a lot broo you have helped me @hendra814 @sader1992 Edited September 6, 2018 by Railgun Quote Link to comment Share on other sites More sharing options...
Question
Railgun
Hi everyone! I'm newbie here. Sorry for my bad english.
I want to ask something about scripting.
How can i add conversation to npc script if i had a conversation like this:
Ex: Healer NPC
[Healer]
I have amazing healing powers!!
You look like a person who needs them
Want some?
Then appear dialog box with 2 choices "Yes heal me please!" and "No thanks"
If i choose "Yes heal me please!" he will heal me and give me buff
And if i choose "No thanks" he will say "Allright, come back if you need a heal."
Also i had a healer script made by Euphy like this:
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.