Jump to content

deviruzy

Members
  • Content Count

    67
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by deviruzy


  1. '-'!! Oh! hahahahaha yeah, I have to admit that was silly of me not to notice that additional }. Sorry about that. This is what I'm currently using.

     

     

    int itemdb_isidentified(int nameid) {
     return 1;
    // int type=itemdb_type(nameid);
    // switch (type) {
    // case IT_WEAPON:
    // case IT_ARMOR:
    // case IT_PETARMOR:
    //  return 0;
    // default:
    // }
    }
    /* same as itemdb_isidentified but without a lookup */
    int itemdb_isidentified2(struct item_data *data) {
     return 1;
     switch (data->type) {
    case IT_WEAPON:
    case IT_ARMOR:
    case IT_PETARMOR:
     return 0;
    default:
     return 1;
     }
    }

     

     

    Somehow my Hercules didn't identify items by just modifying isidentified. I also had to modify isidentified2. I can't express enough how glad and thankful I am about this. Thank you evilpuncker, Thank you Angelmelody.


  2. ;-; No, I am afraid I am getting errors when I rebuild it with Visual Studio 2010 in either way.

     

    First I tried :

     

    int itemdb_isidentified(int nameid) {

     return 1;
     int type=itemdb_type(nameid);
     switch (type) {
    case IT_WEAPON:
    case IT_ARMOR:
    case IT_PETARMOR:
     return 0;
    default:
     return 1;
     }
    }
    /* same as itemdb_isidentified but without a lookup */
    int itemdb_isidentified2(struct item_data *data) {

    return 1;
     switch (data->type) {
    case IT_WEAPON:
    case IT_ARMOR:
    case IT_PETARMOR:
     return 0;
    default:
     return 1;
     }
    }

     

     

     

     

     

     

    and then this:

     

     

    int itemdb_isidentified(int nameid) {
    // int type=itemdb_type(nameid);
    // switch (type) {
    // case IT_WEAPON:
    // case IT_ARMOR:
    // case IT_PETARMOR:
    //  return 0;
    // default:
     return 1;
     }
    }
    /* same as itemdb_isidentified but without a lookup */
    int itemdb_isidentified2(struct item_data *data) {
     switch (data->type) {
    case IT_WEAPON:
    case IT_ARMOR:
    case IT_PETARMOR:
     return 0;
    default:
     return 1;
     }
    }

     

     

     

     

    and even this

     

     

    int itemdb_isidentified(int nameid) {
    // int type=itemdb_type(nameid);
    // switch (type) {
    // case IT_WEAPON:
    // case IT_ARMOR:
    // case IT_PETARMOR:
    //  return 0;
    // default:
     return 1;
     }
    }
    /* same as itemdb_isidentified but without a lookup */
    int itemdb_isidentified2(struct item_data *data) {
    // switch (data->type) {
    // case IT_WEAPON:
    // case IT_ARMOR:
    // case IT_PETARMOR:
    //  return 0;
    // default:
     return 1;
     }
    }


  3.  Good day.

     Although one touch npc is very convenient, I was wondering if it's possible to identify items from the beginning like back in the eAthena times. I remember slightly that if you touch certain part of src, all the items you get from mobs comes out as identified. Is this possible even in Hercules?

     Would you be kind and teach me if it's possible please?

     

     Thank you.


  4. I found custom source and script for making plagiarism NPC but it was only tested on eathena. When I applied it on Hercules the script worked but when I actually tested it map server crashed! Would you take a look and see if this source needs to be modified in order to make it work on Hercules? or is the problem because of me using Hercules with custom plugins?

     

     

    script.c
     

     


    BUILDIN(plagiarism)
    {
    int type;
    int skillid = script_getnum(st,2);
    int idx = 0, cidx = 0;
    int skilllv = script_getnum(st,3);
    struct map_session_data *sd = map->id2sd(st->rid);

    nullpo_retr(-1, sd);

    if (skillid <= 0 || skilllv <= 0) {
    ShowError("스킬id나 스킬lv은 1보다 작을 수 없습니다.n", skillid, skilllv);
    script->reportsrc(st);
    script_pushint (st, -1);
    return false;
    }
    if (script_hasdata(st, 4) && ((type = pc->checkskill (sd, SC_REPRODUCE)) > 0)) {

    if (sd->reproduceskill_id) {
    idx = skill->get_index(sd->reproduceskill_id);
    if(sd->status.skill[idx].flag == SKILL_FLAG_PLAGIARIZED ) {
    sd->status.skill[idx].id = 0;
    sd->status.skill[idx].lv = 0;
    sd->status.skill[idx].flag = 0;
    clif->deleteskill(sd,sd->reproduceskill_id);
    }
    }

    skilllv = (type < skilllv ? type : skilllv);
    cidx = skill->get_index(skillid);

    sd->reproduceskill_id = skillid;
    pc_setglobalreg(sd, "REPRODUCE_SKILL", skillid);
    pc_setglobalreg(sd, "REPRODUCE_SKILL_LV", skilllv);

    sd->status.skill[cidx].id = skillid;
    sd->status.skill[cidx].lv = skilllv;
    sd->status.skill[cidx].flag = SKILL_FLAG_PLAGIARIZED;
    clif->addskill(sd,skillid);
    }
    else if ((type = pc->checkskill (sd,RG_PLAGIARISM)) > 0) {
    if (sd->cloneskill_id){
    idx = skill->get_index(sd->cloneskill_id);
    if(sd->status.skill[sd->cloneskill_id].flag == SKILL_FLAG_PLAGIARIZED) {
    sd->status.skill[idx].id = 0;
    sd->status.skill[idx].lv = 0;
    sd->status.skill[idx].flag = 0;
    }
    }

    skilllv = (type < skilllv ? type : skilllv);
    cidx = skill->get_index(sd->cloneskill_id);

    sd->cloneskill_id = skillid;
    pc_setglobalreg(sd, "CLONE_SKILL", skillid);
    pc_setglobalreg(sd, "CLONE_SKILL_LV", skilllv);

    sd->status.skill[cidx].id = skillid;
    sd->status.skill[cidx].lv = skilllv;
    sd->status.skill[cidx].flag = SKILL_FLAG_PLAGIARIZED;
    clif->skillinfoblock(sd);
    } else {
    script_pushint (st, 1);
    script->reportsrc(st);
    return false;
    }
    script_pushint (st, 0);
    return true;
    }


    BUILDIN_DEF(plagiarism, "ii?"), // 패드곰님의 스크립트입니다.
     

     

     

     

    Script part

     

     

    prontera.gat,166,198,3 script rogue 747,{ 

     plagiarism "5",GetSkilllv(225);
     close;

    }

     

     

    Turns out the custom plug-in I had, had a compatability problem with pre-re setup. By directly moving plugins into trunk It worked perfectly fine.


  5.  Good Day.

     

     Not like official woe script I wanted a very simple one. One castle, No guardian, No kafra, No mobs. No reward. I just need an empelium gvg. While searching, I found something that could work. This is an Agit_Event scipt I found. It looked simple but since I didn't know what to put I couldn't go on from here.

     

     

     

    - script Agit_Event -1,{
     end;

    OnClock2100: //start time for Tues(2), Thurs(4), sat(6)
    OnClock2200: //end time for Tues(2), Thurs(4), sat(6)

    OnAgitInit:
    // starting time checks
    if((gettime(4)==2) && (gettime(3)>=21 && gettime(3)<22) ||
    (gettime(4)==4) && (gettime(3)>=21 && gettime(3)<22) ||
    (gettime(4)==6) && (gettime(3)>=21 && gettime(3)<22)) {

    if (!agitcheck()) {
    gvgon strnpcinfo(2);
    announce "woe begin.",8;

    agitstart;
    callsub S_DisplayOwners;
    }
    end;
    }

    // end time checks
    if ((gettime(4)==2) && (gettime(3)==22) ||
    (gettime(4)==4) && (gettime(3)==22) ||
    (gettime(4)==6) && (gettime(3)==22)) {
    if (agitcheck()) {
    gvgoff strnpcinfo(2);
    announce "woe end.",8;
    agitend;
    callsub S_DisplayOwners;
    }
    end;
    }
    end;

    S_DisplayOwners:
    setarray .@maps$[0],"prtg_cas03";
    for( set .@i, 0; .@i <= 0; set .@i, .@i+1 ) {
    if (getcastledata(.@maps$[.@i],1)) {
    announce "[" + getcastlename(.@maps$[.@i]) + "] current owner. [" + getguildname(getcastledata(.@maps$[.@i],1)) + "]",bc_all;
    }
    else {

    announce "[" + getcastlename(.@maps$[.@i]) + "] guild castle.",bc_all;
    }
    }
    end;
    }

     

     

     Would you be kind and teach me how to

     

    1. Spawn an empelium when woe begins?  prtg_cas03,16,220

    2. Respawn an empelium when empelium breaks? prtg_cas03,16,220

    3. When the owner of the empelium is changed warp everyone else except members of the new guild back to the savepoint?

    [EX: Guild A (Owner) -> Guild B (becomes new owner by breaking guild A's empelium) -> Guild A is teleported back to savepoint. -> Guild B stays]

    4. When woe is over, naturally set empelium to how it is supposed to be after woe. Is it disabling it or just let it stand there?

     

     

     This is part of my flag NPC

     

     

     

     

    This is the only castle I want to use for woe, prtg_cas03, and I kind of sensed that everything related to this castle has to be set to .@GID or else it won't work with one another. If so would you also teach me where or how I should modify  Agit_Event to .@GID   ?

     

    Thank you.

     


  6.  

    prontera,156,184,5 script kjfhksdjf 100,{attachnpctimer;initnpctimer;end;OnTimer1000:dispbottom "pass 1"; // OKstopnpctimer;end;}prontera,159,184,5 script kjfhksdjf2 100,{initnpctimer;attachnpctimer;end;OnTimer1000:dispbottom "pass 2"; // attachrid errorend;}
    to use attachnpctimer, this command must execute when the timer is not running

    https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt#L6195

    .

    .

    initnpctimer;if ($@wedding_effect == 1)attachnpctimer $wed_bride$;if ($@wedding_effect == 2)attachnpctimer $wed_groom$;
    change into

    if ($@wedding_effect == 1)attachnpctimer $wed_bride$;if ($@wedding_effect == 2)attachnpctimer $wed_groom$;initnpctimer;
    AARRGGHHHH stupid {code} break ... fix it yourself <.<

    .

    .

    .

    ---- offtopic ----

    test

    set $@haha, 1;$@haha = 1;

    set $@haha, 1;

    $@haha = 1;

    >>set $@msg$,$wed_groom$;

    how come your post got the mailto: stuffs ?

     

     

     

    AnnieRuru, You are a genius! I mean a Genius, literally! Thank you. you just post one, and my problem that I've been dealing for hours is solved! Thank you so much! Thank you!!

     

    I don't know why mailto: is added. I must have clicked something by mistake. sorry about that.


  7. function SF_StartCeremony {

     mes "mm.";

     set $wed_bride_progress,5;

     set $wed_groom_progress,5;

     set $@msg$,$wed_groom$;

     if (strcharinfo(0) == $wed_groom$)

    set $@msg$,$wed_bride$;

     if (marriage($@msg$) == 0) {

    next;

    mes "["+@name$+"]";

    mes $@msg$+"mm.";

    close;

     }

     set $wed_bride_progress,6;

     set $wed_groom_progress,6;

     close2;

     initnpctimer;

     if ($@wedding_effect == 1)

    attachnpctimer $wed_bride$;

     if ($@wedding_effect == 2)

    attachnpctimer $wed_groom$;

     end;

     

    //}

     

    OnTimer1000:

     npctalk "mm "+$wed_bride$+", mm "+$wed_groom$+"mm?";

     end;

     

    OnTimer3000:

     npctalk "mmm.";

     end;

     

    OnTimer6000:

     npctalk "mm "+$wed_groom$+"mm "+$wed_bride$+"mmm!";

     SF_wed_end();

     wedding;

    // stopnpctimer;

     if ($@wedding_effect)

    detachnpctimer;

     end;

    }

     

    Good day.

    When my wedding script reaches that red part which starts with OnTimer6000:, map server gives me an error. Strange thing is that players do get married some how....'-'

     

    The error message is this:

     

    [Error]: scripts_rid2sd: fatal error! player not attached!

    [Debug]: Function: wedding <no parameters>

    [Debug]: Source <NPC>: "current NPC's name" at prt_church <100,123>

     

    I first tried to make wedding; part to wedding(); didn't work. I just did it I didn't know what I was doing and then I chagned the location of '}'. from above OnTimer1000: to below all the way down to the end of OnTimer6000: but map server stil gave me an error.

     

    What should I do to fix this error?

     

    Would you be kind and teach me please?

    Thank you.

     

     

     

     

     

     

    P.s. I changed all the message part because it was in korean. Below is the actual script just in case. I hope the korean part doesn't bother you :(

     

     

    //////////////////////////////////////////////////////////

    // 결혼 스크립트   //

    //////////////////////////////////////////////////////////

    //

    //=====eAthena Script====================================

    // Wedding Script

    //=====By================================================

    // AppleGirl and Evera(version 1.0)

    //=====Current Version===================================

    // 2.7

    //=====Compatible With:==================================

    // eAthena Version SVN-R4287 and up; RO Episode 6+

    //=====Description=======================================

    // Fully working wedding script for all kind of weddings

    //=====Additional Comments:==============================

    // Lesbian and Gay Weddings by ShadowLady (version 1.1)

    // Complete Rewrite by Skotlex (version 2.0->2.5)

    //=======================================================

    // 

    //번역  :  모준

    // Configuration Variables:

    - script marriage_init -1,{

    OnInit:

     set $@wed_allow, 1; //만약 1로 설정하면 동성결혼이 불가능합니다(반대로 0은 동성결혼 가능입니다)

     set $@wed_veil, 1; //0으로 설정시 신부가 면사포를 썻는지 체크하지 않습니다(반대로 1은 체크하는것입니다)

    //Id of the item that is traded for the wedding ring (use 0 to disable):

     set $@wed_ring, 2613;

     set $@wed_groom_reg, 1300000; //신랑의 결혼자금설정

     set $@wed_bride_reg, 1200000; //신부의 결혼자금설정

     set $@wed_divorce_fee, 50000; //이혼 비용

     set $@wedding_effect, 1; //On who to display the FX: 0: Priest, 1: Bride, 2: Groom

     end;

    }

    // Other Configuration:

    // Line 59,60: 신부의 위치.

    // Line 430,431: 메리수녀의 위치.

    // Line 803,804: 리사수녀의 위치.

    // Variable Notes:

    // $wed_progress Signals that there is a wedding in progress

    // $wed_groom$ - 신랑의 이름 변수

    // $wed_groom_sex - 신랑의 성(Sex) 변수 (동성결혼시 링체크를 위해 필요)

    // $wed_bride$ - 신부의 이름 변수

    // $wed_bride_sex - 신부의 성(Sex) 변수 (동성결혼시 링체크를 위해 필요)

    // $wed_groom_progress - 신랑의 진행도 변수

    // $wed_bride_progress - 신부의 진행도 변수

    // 0: 진행하지 않았다. 1: 등록했다. 2: 파트너가 등록했다. 3: 링을

    // 준비 하였다. 4: 반지를 교환했다. 5: 모든절차를 밟았다. 6: 결혼할 준비

    // 가 모두 완료되었다.

    //

    // $divorce_progress 이혼 진행도

    // $@divorcer$ 이혼 대상자 이름 변수

    // $@divorcee 누가 돈을 내야 되는지 파트너의 아이디 변수.

    //The Priest

    prt_church.gat,100,123,4 script 프레드릭 2세 60,{

     set @name$,"프레드릭 2세";

     function SF_wed_end;

     function SF_equip_check;

     function SF_Groom;

     function SF_Bride;

     function SF_AcceptGroom;

     function SF_AcceptBride;

     function SF_RetrieveRingM;

     function SF_RetrieveRingF;

     function SF_RingsAccepted;

     function SF_StartCeremony;

     

     if (getpartnerid() > 0) {

    mes "["+@name$+"]";

    mes "아름다운 결혼생활 되시길 바랍니다.";

    close;

     }

     if ($wed_progress == 0) {

    mes "["+@name$+"]";

    mes "안녕하세요. 당신께서 살고있는 삶은 어떠한가요?";

    close;

     }

     

     if (strcharinfo(0) == $wed_groom$) {

    SF_Groom();

    end;

     }

     if (strcharinfo(0) == $wed_bride$) {

    SF_Bride();

    end;

     }

     mes "["+@name$+"]";

     if ($wed_groom_progress == 0 || $wed_bride_progress == 0) {

    mes "이미 예정된 결혼식이 있습니다. 죄송합니다..";

    close;

     }

     if ($wed_groom_progress == 6) {

    mes $wed_groom$+"님과 "+$wed_bride$+"님은 너무 늦었습니다. 다시 시작 해주세요.";

    close;

     }

     mes $wed_groom$+"님과 "+$wed_bride$+"님의 결혼식을 시작하려합니다.";

     mes "하객 여러분들도 아름다운 여정을 시작하는 이 두분에게 축복이 내리도록 기도해 주십시오.";

     close;

    function SF_Groom {

     if ($wed_bride_progress == 0) {

    mes "["+@name$+"]";

    mes "신부분이 아직 등록이 안된것 같군요.";

    close;

     }

     if (SF_equip_check() == 0)

    close;

     switch($wed_groom_progress) {

     case 1:

    SF_AcceptBride;

    break;

     case 2:

    mes "["+@name$+"]";

    mes "상대방의 결정을 기다리고 있습니다..";

    close;

     case 3:

    SF_RetrieveRingM();

    break;

     case 4:

    mes "["+@name$+"]";

    mes "상대방의 결혼반지가 아직 회수되지 않았습니다..";

    close;

     case 5:

    mes "["+@name$+"]";

    SF_StartCeremony();

    break;

     default:

    mes "["+@name$+"]";

    mes "방해하지 말아주세요.";

    close;

     }

    }

    function SF_Bride {

     if ($wed_groom_progress == 0) {

    mes "["+@name$+"]";

    mes "신랑분이 아직 등록이 안된것같군요.";

    close;

     }

     if (SF_equip_check() == 0)

    close;

     switch ($wed_bride_progress) {

     case 1:

    SF_AcceptGroom();

    break;

     case 2:

    mes "["+@name$+"]";

    mes "상대방의 결정을 기다리고 있습니다...";

    close;

     case 3:

    SF_RetrieveRingF();

    break;

     case 4:

    mes "["+@name$+"]";

    mes "상대방의 결혼반지가 아직 회수되지 않았습니다.";

    close;

     case 5:

    mes "["+@name$+"]";

    SF_StartCeremony();

    break;

     default:

    mes "["+@name$+"]";

    mes "방해하지 말아주세요.";

    close;

     }

    }

    function SF_AcceptGroom {

     mes "["+@name$+"]";

     mes $wed_bride$+"님, "+$wed_groom$+"님이 당신의 신랑이 되기를 바라고있습니다. 받아들이시겠습니까?";

     mes "^ff0000신중하게 선택하시기 바랍니다 취소할경우 처음부터 다시 시작하셔야합니다";

     next;

     switch(select("생각할 시간이 필요하군요.","아니요! 받아들이지 않겠어요.","예! 받아들일께요.")) {

     case 1:

    mes "["+@name$+"]";

    mes "자신의 결정에 확신을 가질 수 있을 때 까지 신중하게 생각해 주세요.";

    emotion e_ag;

    close;

     case 2:

    mes "["+@name$+"]";

    mes "안타깝군요.";

    close2;

    emotion e_omg;

    npctalk ""+$wed_bride$+"님이 "+$wed_groom$+"님과의 결혼을 거절했습니다!";

    SF_wed_end();

    break;

     case 3:

    set $wed_bride_progress,2;

    if ($wed_groom_progress == 2) {

     SF_RingsAccepted();

     break;

    }

    emotion e_ok;

    mes "["+@name$+"]";

    mes "신랑분이 찬성하신 후에 결혼식을 거행하겠습니다..";

    close;

     }

    }

    function SF_AcceptBride {

     mes "["+@name$+"]";

     mes $wed_groom$+"님, "+$wed_bride$+"님이 당신의 신부가 되기를 바라고있습니다. 받아들이시겠습니까?";

     mes "^ff0000신중하게 선택하시기 바랍니다 취소할경우 처음부터 다시 시작하셔야합니다";

     next;

     switch(select("생각할 시간이 필요하군요.","아니요! 받아들이지 않겠어요.","예! 받아들일께요.")) {

     case 1:

    mes "["+@name$+"]";

    mes "자신의 결정에 확신을 가질 수 있을 때 까지 신중하게 생각해 주세요.";

    emotion e_ag;

    close;

     case 2:

    mes "["+@name$+"]";

    mes "안타깝군요.";

    emotion e_omg;

    close2;

    npctalk ""+$wed_groom$+"님이 "+$wed_bride$+"님과의 결혼을 거절했습니다!";

    SF_wed_end();

    break;

     case 3:

    set $wed_groom_progress,2;

    if ($wed_bride_progress == 2) {

     SF_RingsAccepted();

     break;

    }

    emotion e_ok;

    mes "["+@name$+"]";

    mes "신랑분이 찬성하신 후에 결혼식을 거행하겠습니다...";

    close;

     }

    }

    function SF_RingsAccepted {

     mes "["+@name$+"]";

     mes "신랑, 신부님께서는 앞으로 나오셔서 상대방의 반지를 주시길 바랍니다.";

     set $wed_bride_progress,3;

     set $wed_groom_progress,3;

     announce $wed_groom$+"님과 "+$wed_bride$+"님의 결혼식이 프론테라 대성당에서 거행되겠습니다!",bc_all;

     close2;

     emotion e_lv;

     npctalk "반지 교환을 위해 신랑, 신부께서는 앞으로 나와주시겠습니까?";

    }

    function SF_RetrieveRingM {

     mes "["+@name$+"]";

     if ($@wed_ring && countitem($@wed_ring) < 1) {

    mes "당신의 "+getitemname($@wed_ring)+"는 어디있나요? 식을 거행하기 위해선 필요합니다!";

    close;

     }

     set @item, 2634; //Bride's wedding ring

     if ($wed_bride_sex)

    set @item, 2635; //Groom's wedding ring

     if (getnameditem(@item,$wed_bride$) == 0) {

    mes "결혼반지를 가지고 있을 충분한 공간이 없으신 것 같군요.";

    close;

     }

     mes "여기 신랑를 위한 결혼반지입니다.";

     if ($@wed_ring) delitem $@wed_ring,1;

     set $wed_groom_progress,4;

     if ($wed_bride_progress == 4)

    SF_StartCeremony();

     else {

    mes "신부님께서 반지를 받으시면, 결혼식이 시작됩니다.";

    close;

     }

    }

    function SF_RetrieveRingF {

     mes "["+@name$+"]";

     if ($@wed_ring && countitem($@wed_ring) < 1) {

    mes "당신의 "+getitemname($@wed_ring)+"는 어디있나요? 식을 거행하기 위해선 필요합니다!";

    close;

     }

     set @item, 2634; //Bride's wedding ring

     if ($wed_groom_sex)

    set @item, 2635; //Groom's wedding ring

     if (getnameditem(@item,$wed_groom$) == 0) {

    mes "결혼반지를 가지고 있을 충분한 공간이 없으신 것 같군요.";

    close;

     }

     mes "여기 신부를 위한 결혼반지입니다.";

     if ($@wed_ring) delitem $@wed_ring,1;

     set $wed_bride_progress,4;

     if ($wed_groom_progress == 4)

    SF_StartCeremony();

     else {

    mes "신랑님께서 반지를 받으신다면, 결혼식이 시작됩니다.";

    close;

     }

    }

    function SF_StartCeremony {

     mes "지금부터 결혼식을 시작하겠습니다.";

     set $wed_bride_progress,5;

     set $wed_groom_progress,5;

     set $@msg$,$wed_groom$;

     if (strcharinfo(0) == $wed_groom$)

    set $@msg$,$wed_bride$;

     if (marriage($@msg$) == 0) {

    next;

    mes "["+@name$+"]";

    mes $@msg$+"님는 어디있습니까?? 한분이라도 계시지 않으면 결혼식을 진행할 수 없습니다.";

    close;

     }

     set $wed_bride_progress,6;

     set $wed_groom_progress,6;

     close2;

     if ($@wedding_effect == 1)

    attachnpctimer $wed_bride$;

     if ($@wedding_effect == 2)

    attachnpctimer $wed_groom$;

     initnpctimer;

     end;

    //}

     

    OnTimer1000:

     npctalk "신부 "+$wed_bride$+", 신랑 "+$wed_groom$+"님은 서로를 남편, 아내로 맞이하며 평생동안 사랑하겠습니까?";

     end;

    OnTimer3000:

     npctalk "오늘 이 자리에서 두 사람의 영혼을 이어 드립니다. 불멸의 사랑을 만드시길 바랍니다.";

     end;

    OnTimer6000:

     npctalk "이시간부로 "+$wed_groom$+"님과 "+$wed_bride$+"님은 부부가 되었음을 선포합니다!";

     SF_wed_end();

     wedding;

    // stopnpctimer;

     if ($@wedding_effect)

    detachnpctimer;

     end;

    }

    //Subfunction: Checks that the groom/bride is still wearing their stuff.

    function SF_equip_check {

     if (Sex && getequipid(2) != 7170) {

    mes "["+@name$+"]";

    mes "당신, "+getitemname(7170)+"을 잊지 마세요.";

    emotion e_dots;

    return 0;

     }

     if (Sex == 0 && getequipid(2) != 2338) {

    mes "["+@name$+"]";

    mes "이런.. "+getitemname(2338)+"을 결혼식동안 입고 있으셔야합니다.";

    emotion e_dots;

    return 0;

     }

     if (Sex == 0 && $@wed_veil && getequipid(1) != 2206) {

    mes "["+@name$+"]";

    mes "아직 "+getitemname(2206)+"을 벗으시면 안됩니다.";

    emotion e_dots;

    return 0;

     }

     return 1;

    }

    //Subfunction: Resets wedding variables.

    function SF_wed_end {

     set $wed_groom$,"";

     set $wed_groom_sex, 0;

     set $wed_bride$,"";

     set $wed_bride_sex, 0;

     set $wed_groom_progress,0;

     set $wed_bride_progress,0;

     set $wed_progress,0;

    }

    OnInit:

     if ($wed_groom_progress==6) {

    SF_wed_end();

     }

     end;

    }

    //Registration & Status

    prt_church.gat,106,99,3 script 메리 수녀 67,{

     set @name$,"메리 수녀";

     if (getpartnerid() > 0) {

    mes "["+@name$+"]";

    mes "결혼 생활은 즐거우세요?";

    close; 

     }

     

     function SF_WedProgress;

     function SF_Principles;

     function SF_Procedure;

     function SF_Register;

     function SF_TryRegister;

     if ($wed_progress) {

    SF_WedProgress();

    end;

     }

     

     do {

    set @menu, select(

     "결혼용품을 구입",

     "결혼하는 방법을 설명해주세요.",

     "결혼 절차좀 설명해주세요.",

     "전 누군가와 결혼하고 싶습니다."

    );

    switch (@menu) {

    case 1: //Quit

     callshop "결혼상점",0;

     close;

     

    case 2: //Principles

     SF_Principles();

     break;

    case 3: //Procedure

     SF_Procedure();

     break;

    case 4: //Register

     SF_Register();

     break;

    }

     } while (@menu > 1);

     end;

    function SF_Register {

     if ($@wed_allow) { //Role select

    mes "["+@name$+"]";

    mes "어느 지위로 등록하시겠어요??";

    next;

    set @submenu, select("신랑","신부","취소");

     } else if (Sex) { //Groom

    mes "["+@name$+"]";

    mes "신랑으로 등록하시겠어요?";

    next;

    if (select("네","마음을 바꿨어요.")==1)

     set @submenu, 1;

    else

     set @submenu, 3;

     } else { //Bride

    mes "["+@name$+"]";

    mes "신부로 등록하시겠어요?";

    next;

    if (select("네","마음을 바꿨어요.")==1)

     set @submenu, 2;

    else

     set @submenu, 3;

     }

     switch (@submenu) {

     case 1: //Groom

    SF_TryRegister(0);

    setoption Option_Wedding,0;

    set $wed_progress,1;

    mes "["+@name$+"]";

    mes "지금 신랑으로 등록되었습니다.";

    mes "가능한 빨리 신부분께도 등록해달라고 말씀해주세요."; 

    emotion e_hmm;

    initnpctimer;

    close;

     case 2: //Bride

    SF_TryRegister(1);

    setoption Option_Wedding,1;

    set $wed_progress,1;

    mes "["+@name$+"]";

    mes "지금 신부로 등록되었습니다.";

    mes "가능한 빨리 신랑분께도 등록해달라고 말씀해주세요.";

    emotion e_hmm;

    initnpctimer; 

    close;

     default: //Cancel

    mes "["+@name$+"]";

    mes "준비가 되었을때 다시오세요.";

    close;

     }

     

    function SF_WedProgress {

     if (strcharinfo(0) == $wed_groom$) {

    mes "["+@name$+"]";

    if ($wed_bride_progress > 0)

     mes "신부님께서는 다른 결혼식을 진행중이십니다.";

    else

     mes "신부에게 등록해달라고 말씀하세요. 시간이 다 되어 갑니다.";

    close;

     }

     if (strcharinfo(0) == $wed_bride$) {

    mes "["+@name$+"]";

    if ($wed_groom_progress > 0)

     mes "신부님께서는 남은 결혼식절차를 진행중이십니다.";

    else

     mes "신랑에게 등록해달라고 말씀하세요. 시간이 다 되어 갑니다.";

    close;

     }

     if (($wed_groom_progress == 0) && (Sex == 1 || $@wed_allow == 1)) {

    mes "["+@name$+"]";

    mes $wed_bride$+"님은 지금 신랑의 등록을 기다리고 있습니다. 당신이 신랑인가요?";

    next;

    if (select("예, 접니다.","죄송합니다, 사람을 잘못보신것 같군요.") == 1) {

     SF_TryRegister(0);

     stopnpctimer;

     set $wed_groom_progress,1;

     mes "["+@name$+"]";

     mes "잘됐네요, 지금 신부님께 가셔서 서약을 재확인 하시면 결혼식이 시작될겁니다.";

     emotion e_no1;

     close2;

     npctalk "등록이 완료되었습니다. "+$wed_groom$+"님과 "+$wed_bride$+"님, 두분의 서약을 신부님께 재확인 해주세요.";

     emotion e_no1;

     end;

    } else {

     mes "["+@name$+"]";

     mes "알겠습니다. 제가 방해한것 같군요. 죄송합니다.";

     close;

    }

     }

     if (($wed_bride_progress == 0) && (Sex == 0 || $@wed_allow == 1)) {

    mes "["+@name$+"]";

    mes $wed_groom$+"님은 지금 신부의 등록을 기다리고 있습니다. 당신이 신부인가요?";

    next;

    if(select("예, 접니다.","죄송합니다, 사람을 잘못보신것 같군요.") == 1) {

     SF_TryRegister(1);

     stopnpctimer;

     mes "["+@name$+"]";

     mes "잘됐네요, 지금 신부님께 가셔서 서약을 재확인 하시면 결혼식이 시작될겁니다.";

     emotion e_no1;

     close2;

     npctalk "등록이 완료되었습니다. "+$wed_groom$+"님과 "+$wed_bride$+"님, 두분의 서약을 신부님께 재확인 해주세요.";

     emotion e_no1;

     end;

    } else {

     mes "["+@name$+"]";

     mes "알겠습니다. 제가 방해한것 같군요. 죄송합니다";

     close;

    }

     }

     mes "["+@name$+"]";

     mes "진행중인 결혼식이 있습니다.";

     mes "결혼식의 진행과정을 글로써 보시겠습니까?";

     next;

     if (select("네","아니요") != 1) {

    mes "["+@name$+"]";

    mes "결혼식을 즐겨주세요.";

    close;

     }

     //Display Progress

     mes "["+@name$+"]";

     switch ($wed_groom_progress) {

     case 0:

    mes "신랑이 아직 등록하지 않았습니다.";

    break;

     case 1:

    mes "신랑인 "+$wed_groom$+"님은 아직 신부를 받아들이지 않았습니다.";

    break;

     case 2:

    mes "신랑인 "+$wed_groom$+"님은 신부의 승낙을 기다리고 있습니다.";

    break;

     case 3:

    mes "신랑인 "+$wed_groom$+"님은 아직 결혼반지를 회수하지 않았습니다.";

    break;

     case 4:

    mes "신랑인 "+$wed_groom$+"님은 신부가 결혼반지를 회수하는 것을 기다리고 있습니다.";

    break;

     }

     switch ($wed_bride_progress) {

     case 0:

    mes "신부가 아직 등록하지 않았습니다.";

    break;

     case 1:

    mes "신부인 "+$wed_bride$+"님은 아직 신랑을 받아들이지 않았습니다.";

    break;

     case 2:

    mes "신부인 "+$wed_bride$+"님은 신랑의 승낙을 기다리고 있습니다.";

    break;

     case 3:

    mes "신부인 "+$wed_bride$+"님은 아직 결혼반지를 회수하지 않았습니다.";

    break;

     case 4:

    mes "신부인 "+$wed_bride$+"님은 신랑의 결혼반지 회수를 기다리고 있습니다."; 

    break;

     case 5:

    mes "우리는 "+$wed_groom$+"님과 "+$wed_bride$+"님은 결혼식 진행을 기다리고 있습니다.";

    break;

     case 6:

    mes $wed_groom$+"님과 "+$wed_bride$+"님의 결혼식은 이미 순조롭게 진행되고 있습니다.";

    break;

     }

     mes "결혼식의 뒷풀이를 즐겨주세요.";

     close;

    }

    OnInit:

     if ($wed_groom_progress + $wed_bride_progress == 1)

    initnpctimer;

     end;

    OnTimer60000:

     //Registration failed.

     if ($wed_bride_progress == 1)

    set $@msg$, $wed_bride$;

     else

    set $@msg$, $wed_groom$;

     npctalk "등록 기간이 지났습니다. "+$@msg$+"씨와 결혼하고 싶은사람이 아무도 없는겁니까..?";

     emotion e_hmm;

     

     set $wed_groom$,"";

     set $wed_groom_sex, 0;

     set $wed_bride$,"";

     set $wed_bride_sex, 0;

     set $wed_groom_progress,0;

     set $wed_bride_progress,0;

     set $wed_progress,0;

     stopnpctimer;

     end;

    //Subfunction SF_TryRegister (int bride)

    function SF_TryRegister {

     set @bride, getarg(0);

     set @type$, "신랑";

     if (@bride)

    set @type$, "신부";

     

     mes "["+@name$+"]";

     mes @type$+"(으)로 등록하기전에, 모든 요구사항이 충족되는지 체크해보겠습니다...";

     next;

     if (Upper == 2) {

    mes "["+@name$+"]";

    mes "오 이런, 당신은 너무 어려서 결혼을 생각할수 없어욧!";

    emotion e_gasp;

    close;

     }

     if (Sex)

    set @item, 7170;

     else

    set @item, 2338;

     

     if (getequipid(2) != @item) {

    mes "["+@name$+"]";

    mes "결혼하시길 원하신다면 "+getitemname(@item)+"를 입으셔야 합니다.";

    close;

     }

     if (Sex == 0 && $@wed_veil && getequipid(1) != 2206) {

    mes "["+@name$+"]";

    mes getitemname(2206)+"를 써주세요.";

    close;

     }

     if ($@wed_ring && countitem($@wed_ring) < 1) {

    mes "["+@name$+"]";

    mes "반지 교환을 위해 "+getitemname($@wed_ring)+"이 필요합니다.";

    close;

     }

     if (@bride)

    set @cost, $@wed_bride_reg;

     else

    set @cost, $@wed_groom_reg;

     if (Zeny < @cost) {

    mes "["+@name$+"]";

    mes "죄송합니다, 등록하실 요금이 부족하군요.";

    mes @cost+"제니를 모으신후에 다시와주세요.";

    close;

     }

     set Zeny,Zeny-@cost;

    // sc_start SC_WEDDING,360000,1; //Start Wedding Effect (SC_WEDDING)

     if (@bride) {

    set $wed_bride_progress,1;

    set $wed_bride$,strcharinfo(0);

    set $wed_bride_sex, Sex;

     } else {

    set $wed_groom_progress,1;

    set $wed_groom$,strcharinfo(0);

    set $wed_groom_sex, Sex;

     }

    }

    //Explain wedding principles...

    function SF_Principles {

     mes "["+@name$+"]";

     mes "주임 목사님께서 이 결혼식의 주례를 보실겁니다. 모든 이에게 자신의 고귀한 말씀으로 축복하시기 위해서죠.";

     next;

     mes "["+@name$+"]";

     mes "프로포즈는 반드시 엄숙하고 신중하게 이루어져야 합니다.";

     mes "혼인이 이루어진 뒤에는 무효화할 수 없기 때문입니다.";

     next;

     mes "["+@name$+"]";

     mes "결혼으로 맺어진 두 사람은 이 세상을 떠날때까지 반드시 서로 함께해야 합니다.";

     next;

     mes "["+@name$+"]";

     if ($@wed_allow == 1)

    mes "그리고, 남자와 여자, 여자와 남자만이 결혼할 수 있습니다..";

     else

    mes "이성/동성 결혼 모두 허가되었습니다.";

     next;

     mes "["+@name$+"]";

     mes "만약에 당신이 삶에서 함께하고 싶은 특별한 이를 만나면, 부끄러워하지 말고 프로포즈 하세요.";

     next;

     mes "["+@name$+"]";

     mes "오래오래 행복하게 살고 싶은 이들에게 축복이 있기를..";

     next;

    }

    //Explain the wedding procedure...

    function SF_Procedure {

     mes "["+@name$+"]";

     mes "신랑, 신부님 두분께서 결혼 등록을 해 주셔야 합니다.";

     next;

     if ($@wed_allow == 1) {

    mes "["+@name$+"]";

    mes "등록요구사항은 다음과 같습니다:";

    mes "- 남성은 "+getitemname(7170)+"를 입고 있어야한다.";

    mes "- 여성은 "+getitemname(2338)+"를 입고 있어야한다.";

    if ($@wed_veil) mes "- 여성은 또한 "+getitemname(2206)+"를 쓰고 있어야 한다.";

    if ($@wed_ring) mes "- 두사랑은 각각의 "+getitemname($@wed_ring)+"를 가지고 있어야한다.";

    if ($@wed_groom_reg > 0) mes "- 신랑의 등록금은 "+$@wed_groom_reg+"제니이다.";

    if ($@wed_bride_reg > 0) mes "- 신부의 등록금은 "+$@wed_bride_reg+"제니이다.";

     } else {

    mes "["+@name$+"]";

    mes "신랑측 필요물품:";

    mes "- 결혼식에 입을 "+getitemname(7170)+" 1개.";

    if ($@wed_ring) mes "- 서약을 증명할 "+getitemname($@wed_ring)+" 1개.";

    if ($@wed_groom_reg > 0) mes "- 결혼식 비용 "+$@wed_groom_reg+"z.";

    next;

    mes "["+@name$+"]";

    mes "신부측 필요물품:";

    mes "- 결혼식에 입을 "+getitemname(2338)+" 1개.";

    if ($@wed_veil) mes "- 신부를 곱게 해줄 "+getitemname(2206)+" 1개.";

    if ($@wed_ring) mes "- 서약을 증명할 "+getitemname($@wed_ring)+".";

    if ($@wed_bride_reg > 0) mes "- 결혼식 비용 "+$@wed_bride_reg+"z.";

     }

     next;

     mes "["+@name$+"]";

     mes "이건 왠만해서는 말하고싶지는 않지만, 양자는 너무 어려서 결혼을 할 수 없습니다.";

     mes "신랑과 신부는 각각 정해진 시간내에 등록을 해야합니다. 그렇지 않으면 결혼식은 취소됩니다. 그러므로 두분은 확실히 준비를 하시고 미리 등록요구사항을 충족시켜 놓으세요.";

     next;

     mes "["+@name$+"]";

     mes "두분이 저에게 등록을 하신후에, 두분은 서약을 하기위해 목사님께 가셔서 승인을 받아야 합니다. 만약 당신이 상대측과 등록하는것을 거절할 이유가 있다면, 결혼식은 취소됩니다...";

     next;

     mes "["+@name$+"]";

     mes "두분이 결혼하시기를 결정하시면 결혼식이 시작될 것입니다.";

     if ($@wed_ring) {

    mes "하지만 먼저, 미리 반지를 준비해놓으세요.";

    next;

    mes "["+@name$+"]";

    mes "한번더 목사님과 얘기를 하시면 목사님께서 "+getitemname($@wed_ring)+"를 결혼반지로 바꿔 주실겁니다. 두분께서 교환을 위한 결혼반지를 받으신 후에, 결혼식이 시작될 것입니다. ";

     }

     next;

     mes "["+@name$+"]";

     mes "만약 결혼하기는 희망하는 커플이 여러명 있다면, 목사님께서는 한번에 한커플만 결혼식을 진행하실수 있기 때문에 순서를 기다리셔야합니다.";

     next;

    }

    }

    prt_church.gat,94,99,4 script 리사 수녀 79,{

     set @name$,"리사 수녀";

     function SF_DivorceEnd;

     function SF_InProgress;

     

     if ($@divorce_progress==1) {

    SF_InProgress;

    end;

     }

     

     do {

    mes "["+@name$+"]";

    mes "이혼은 너무나도 슬픈일이죠...";

    if (getpartnerid() == 0) {

     mes "타인과 얕은 맹세를 하는건 정말 있어서는 안되는일이에요... 당신도 그렇게 생각하죠?";

     close;

    }

    mes "혹시.... 이혼을 원하시는건 아니죠?";

    next;

    set @menu, select(

     "저는 지금 행복합니다.",

     "이혼에 대해 설명해주세요.",

     "이혼절차를 설명해주세요.",

     "이혼하고 싶습니다."

    );

    switch (@menu) {

    case 1:

     mes "["+@name$+"]";

     mes "반가운 소리군요^^.";

     close;

    case 2: //Explanation

     mes "["+@name$+"]";

     mes "당신과 아무리 노력해도 맞지 않는다면 이혼하는것이 바람직하겠지요.";

     next;

     break;

    case 3: //Requirement

     mes "["+@name$+"]";

     mes "이혼서류를 작성하기 위해 부부의 동의가 필요합니다.";

     mes "서류를 작성하신 후에, 배우자에게 동의를 위한 1분의 시간이 주어집니다, 그러고 나면 이혼하시게 됩니다.";

     if ($@wed_divorce_fee > 0) mes "수수료는 "+$@wed_divorce_fee+"제니이고 이혼을 신청하신분이 아닌 이혼을 확인하신분이 지불합니다.";

     next;

     break;

    case 4: //Divorce

     mes "["+@name$+"]";

     mes "당신의 인생은 당신이 결정합니다.";

     mes "정말 이혼을 하시겠습니까?";

     next;

     if (select("잠시만요... 생각할 시간을 주세요.","이혼을 하겠습니다.") != 2) {

    mes "["+@name$+"]";

    mes "충분히 생각하셔야 합니다.";

    close;

     }

     mes "["+@name$+"]";

     set $@divorcee,getpartnerid();

     set $@divorcer$,strcharinfo(0);

     set $@divorce_progress,1;

     initnpctimer;

     mes "좋습니다. 배우자의 확인을 받은후에 이혼서류 수수료를 받겠습니다.";

     close;

    }

     } while (@menu > 1);

    end;

    function SF_InProgress {

     if (strcharinfo(0) == $@divorcer$) {

    mes "["+@name$+"]";

    mes "...저는 여전히 당신의 배우자가 이혼절차를 확인하길 기다리고 있습니다.";

    close;

     }

     if (getcharid(0) != $@divorcee) {

    mes "["+@name$+"]";

    mes $@divorcer$+"님의 이혼절차를 진행하고 있습니다.";

    mes "혹시 그분의 배우자가 누구인지 아세요?";

    close;

     }

     //Confirm...

     mes "["+@name$+"]";

     mes $@divorcer$+"님께서 당신과의 이혼을 요청하셨습니다. 당신이 이혼을 받아들이시고 "+$@wed_divorce_fee+"제니를 내신다면, 저는 두분의 이혼절차를 수행할것입니다.";

     mes "이혼에 동의하시겠습니까?";

     next;

     if (select("전 이혼을 원하지 않아요....","예 저도 동의합니다.")!=2) {

    mes "["+@name$+"]";

    mes "두분이 갈라서는일이 없었으면 좋겠군요.";

    emotion e_pat;

    callfunc SF_DivorceEnd;

    close;

     }

     if (Zeny < $@wed_divorce_fee) {

    mes "["+@name$+"]";

    mes "음... 이혼서류를 작성하기 위한 수수료가 부족합니다. 배우자분에게 조금 빌리시는게 어떠신가요?";

    close;

     }

     if (!(divorce())) {

    mes "["+@name$+"]";

    mes $@divorcer$+"님께서 안계시군요. 두분이 계시질 않으면 이혼하실수 없습니다...";

    emotion e_swt2;

    close;

     }

     set Zeny,Zeny-$@wed_divorce_fee;

     announce $@divorcer$+"님께서는 "+strcharinfo(0)+"님과 이혼하셨습니다...",bc_map;

     mes "["+@name$+"]";

     mes "이혼서류작성이 완료되었습니다. 두분은 더 이상 부부가 아닙니다.";

     emotion e_sob;

     SF_DivorceEnd;

     close;

    }

     

    function SF_DivorceEnd {

     stopnpctimer;

     set $@divorce_progress,0;

     set $@divorcee,0;

     set $@divorcer$,"";

    }

    OnTimer60000:

     npctalk "이혼확인의 시간이 지났습니다. "+$@divorcer$+"님의 배우자분께서는 어디로 가버리신건지...";

     emotion e_what;

     SF_DivorceEnd();

     end;

    }

    - shop 결혼상점 -1,2338:50000,7170:50000,745:10000,2613:100000,2206:50000


  8. wow this is a great script. Thank you AnnieRuru.

     

     

     

     if(getpartyleader(getcharid(1),2) == getcharid(0)) {
    getmapxy .@mapl$, .@xl, .@yl, 0;
    warpparty .@mapl$, .@xl, .@yl, getcharid(1), .@mapl$;
    }
     

    I believe it's this part but I think I'm going to go with this one for this very NPC of mine.

     

     

     atcommand "@partyrecall "+strcharinfo(1);

     

    I learned it form rAthena Board. Still, Thank you so much AnnieRuru. I'll keep this script in mind. I'm sure I'll be needing it later.


  9.  Hello.

     I am making a very simple party helping NPC and I was wondering if it's possible to summon partymembers. this is what I made so far:

     

    party warp

     

     

     //getpartymember(getcharid(1));
     if (getpartyleader(getcharid(1),2) != getcharid(0) ) {
     mes "Only party leader can use this service.";
     close;
     }
     warpparty "payon",158,225,getcharid(1);
     close;

     

    summoning / calling party members.

     

     if (getpartyleader(getcharid(1),2) != getcharid(0) ) {
     mes "Only party leaders can use this service.";
     close;
     }

     

     callparty getcharid(1);

     

     close;

     

     I am a newb so I could not find what to put on the red spot to summon party members to the location of party leader.

    I used to have a NPC that can do that 6 years ago but I just couldn't remember or find it in eathena, rathena, or wikis.

     

    Would you be kind enough to teach me please?

     

    Thank you.

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.