viewing paste Unknown #23116 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
-   script  Castle#1    -,{
OnAgitEnd:
    if (strnpcinfo(2) == "template") end;
    gvgoff strnpcinfo(2);
    if (getcastledata(strnpcinfo(2),1)) {
        .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
        killmonster strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena";
        donpcevent strnpcinfo(0)+"::OnReset";
        donpcevent "Steward#"+.@str$+"::OnStop";
 
        // Give winning guild reward items MOD.
        if(strnpcinfo(2) != "arug_cas01") end;
       
        .@item = 500;
        .@amount = 5;
 
        // Get a list of Guild Members Based on where the copied Manager NPC is located.
        getguildmember(getcastledata(strnpcinfo(2),1))
 
        // Loop trough the Members.
        for (.@i = 0; .@i < $@guildmembercount; ++.@i) {
            getitem .@item, .@amount, $@guildmemberaid[.@i];
        }
    }
end;
}
-   script  Castle#2    -,{
OnAgitEnd:
    if (strnpcinfo(2) == "template") end;
    gvgoff strnpcinfo(2);
    if (getcastledata(strnpcinfo(2),1)) {
        .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
        killmonster strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena";
        donpcevent strnpcinfo(0)+"::OnReset";
        donpcevent "Steward#"+.@str$+"::OnStop";
 
        // Give winning guild reward items MOD.
        if(strnpcinfo(2) != "arug_cas02") end;
       
        .@item = 500;
        .@amount = 5;
 
        // Get a list of Guild Members Based on where the copied Manager NPC is located.
        getguildmember(getcastledata(strnpcinfo(2),1))
 
        // Loop trough the Members.
        for (.@i = 0; .@i < $@guildmembercount; ++.@i) {
            getitem .@item, .@amount, $@guildmemberaid[.@i];
        }
    }
end;
}
Viewed 1124 times, submitted by Guest.