Jump to content

Virtue

Members
  • Posts

    354
  • Joined

  • Days Won

    6

Posts posted by Virtue

  1. I was looking all over for a guide on how to make the World Map feature usable / customizable but I wasn't able to locate one. So, I just spent some time and figure it out. I was able to finish this little project and was satisfied with the outcome. I figured I'd share how it looks like.

    Special thanks to @Vy Low for letting me use his World Map jpeg.

    Video Preview:

    Screenshots:

    Changed a few colors here and there, but overall it looks good. Minimal Issue at all.

    Initial version : no mob levels yet, but will have this soon average level per map / dungeon.

    PS: No place to share it so I just selected the Client Support section.

    • Love 2
    • Like 1
  2. to just announce on map, change

    announce "[ Lotti Girl ]: Player "+ .@name$ +" obtained 1 x "+ getitemname(.item_ID[.@i]) +" with "+ .item_Rate[.@i] +"%.",0; 

    to

    announce "[ Lotti Girl ]: Player "+ .@name$ +" obtained 1 x "+ getitemname(.item_ID[.@i]) +" with "+ .item_Rate[.@i] +"%.",bc_map; 

    then if you want it to only announce by specific chances do something like,

    if(.item_Rate[.@i] == <chance you want>){
    	announce part of the script
    }

     

    • Love 1
  3. If you would want to add refine/upgrade requirements, you'd have to modify the script to your needs. you might want to look into this part.

    function Add {
    	if (getitemname(getarg(1)) == "null") {
    		debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
    		return;
    	}
    	setarray .@j[0],getarg(2),getarg(3),getarg(4);
    	for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
    		if (getitemname(getarg(.@i)) == "null") {
    			debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
    			return;
    		} else
    			setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
    	}
    	copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j);
    	npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
    	return;
    }

    Add(1,5022,1,0,0,7086,1,10);

    add(1 = getarg(0), 5022 = getarg(1), 1 = getarg(2), 0 = getarg(3), 0 = getarg(4), 7086 = getarg(5), and so on.. you would need to know how or where you'd insert the related refinement script commands in that function.

  4. On 12/31/2022 at 4:38 PM, Virtue said:

    duon mo sisimulan buuin ung quest mo brader, hindi pa sya gagana as is if gusto mo ng quest. sinalpak ko as a tip para may starting point sa pag gawa nung requirement. 

     

    itong line na to -> if (gettimetick(2) - credscd < (3600 * 24 * credsdays)) { is ng line mo para sa 24 hour cooldown check. so if mag lalagay ka ng requirement na need mag quest ni magpapapalit sa taas nyan mo sisimulan buuin un condition na yun. then separate pa para sa quest mo. pwedeng separate npc or separate section lang within the same npc.

    5 hours ago, Cyborg said:

    meron ako error at paturo na rin saan ko ilalagay yun code para dun sa quest

        parse_callfunc: expected ')' to close argument list
        32 :     if (gettimetick(2) - credscd < (3600 * 24 * credsdays)) {
        33 :             mes .@npcname$;
        34 :             //Basic notification na gamit na ung npc today
        35 :             // -> mes "You've already used your chance today.";
        36 :             //Notification with date and time until next usage
    *   37 :             mes "Exchange again in : "+gettimestr("%m-%d-%Y %I:%M:%S %p",23','.creds);
        38 :             mes "Time left : "+callfunc("Time2Str",.creds);
        39 :             close;
        40 :         }
        41 :         mes .@npcname$;
        42 :         mes "I Can Change Credits to Zeny";

     

    same answer pa din about sa quest. hindi magbabago yun brader, aralin mo paano mo sya makakabitan na ng quest.

     

    Kung updated ung rAthena mo ganito dapat lalabas dyan, no errors same script exactly dun sa binigay ko from above. wala issue sa latest rAthena.

    image.png.a21d94233430838f5269cebed654092c.png

  5. 7 minutes ago, Cyborg said:

    saan ko part ito ilalagay ito code na ito para iwas error na rin?

    duon mo sisimulan buuin ung quest mo brader, hindi pa sya gagana as is if gusto mo ng quest. sinalpak ko as a tip para may starting point sa pag gawa nung requirement. 

     

    itong line na to -> if (gettimetick(2) - credscd < (3600 * 24 * credsdays)) { is ng line mo para sa 24 hour cooldown check. so if mag lalagay ka ng requirement na need mag quest ni magpapapalit sa taas nyan mo sisimulan buuin un condition na yun. then separate pa para sa quest mo. pwedeng separate npc or separate section lang within the same npc.

  6. 1 hour ago, Cyborg said:

    paano siya lagyan ng requirments po parang quest bago po nila gamit ito?

    lagyan mo ng conditions at variables ng quest mo. sample sa taas neto

    if(QUEST VARIABLES < 1) {
    mes .@npcname$;
    mes "you need to complete the quest before you can use my services";
    close;
    }
    if (gettimetick(2) - credscd < (3600 * 24 * credsdays)) {
                mes .@npcname$;
                //Basic notification na gamit na ung npc today

    ayan idea, tapos buuin mo na sya gawan mo ng sariling quest either sa same npc or sa ibang npc.

  7. Try mo to.

    24 Hours cooldown

    Spoiler
    prontera,138,184,5    script    Credit Agent    828,{
    //===== Configure misc details here=====
    set .@npcname$,"^000088[ Mr. Credit ]^000000";
    set .@creditscolor$,"^FF0000Credits^000000";
    set .@zenycolor$,"^0000FFZeny^000000";
    //computation
    //credscd = time script was engaged using gettimetick(2)
    //credsdays = cool down to next usage in days e.g: 1
    set credsdays,1;
    set .creds,credscd + (credsdays * 24 * 3600);
    //conversion amt.
    set .@cnvcz,10000000;
    
    //THIS LINE MAKES THE NPC TOTALLY UNUSABLE BY ANYONE 
    //Kung gusto mo gumana sa gm lagi use the one below instead
    // -> (gettimetick(2) - credscd < (3600 * 24 * credsdays) && getgmlevel() > 90)
    
        if (gettimetick(2) - credscd < (3600 * 24 * credsdays)) {
                mes .@npcname$;
                //Basic notification na gamit na ung npc today
                // -> mes "You've already used your chance today.";
                //Notification with date and time until next usage
                mes "Exchange again in : "+gettimestr("%m-%d-%Y %I:%M:%S %p",23,.creds);
                mes "Time left : "+callfunc("Time2Str",.creds);
                close;
            }
            mes .@npcname$;
            mes "I Can Change Credits to Zeny";
            mes "and Zeny to Credits";
            mes "Remember 1 Credit = ^64000010,000,000z^000000.";
            mes "Max Zeny is ^6400002,000,000,000z^000000 so be careful with your Credits";
            mes "Exchanging Credits with Max Zeny your Credits will be Wasted";
            mes "So what do you want?";
            next;
            switch(select("~ "+.@creditscolor$+" to "+.@zenycolor$+":~ "+.@zenycolor$+" to "+.@creditscolor$+":~ Nothing")){
                case 1:
                    mes .@npcname$;
                    mes "Are you sure you want to exchange your Credits to Zeny?";
                    next;
                    switch(select("~ Yes:~ No")){
                        case 1:
                            mes .@npcname$;
                            mes "How many Credits do you want to exchange?";
                            next;
                            input .@t;
                            if(countitem(8055) < .@t) goto L_NOCreds;
                            delitem 8055,.@t;
                            set Zeny,Zeny+(.@cnvcz * .@t);
                            set credscd,gettimetick(2);
                            close;
                            
                        case 2:
                            mes .@npcname$;
                            mes "Please use my service next time";
                            close;
                        }
                        
                case 2:
                    mes .@npcname$;
                    mes "Are you sure you want to exchange your Zeny to Credits?";
                    next;
                    switch(select("~ Yes:~ No")){
                        case 1:
                            mes .@npcname$;
                            mes "How many Credits do you want to get?";
                            next;
                            input .@t;
                            if(Zeny < (.@cnvcz * .@t)) goto L_NOZen;
                            set Zeny,Zeny-(.@cnvcz * .@t);
                            getitem 8055,.@t;
                            set credscd,gettimetick(2);
                            close;
                            
                        case 2:
                            mes .@npcname$;
                            mes "Please use my service next time";
                            close;
                        }
                
                case 3:
                    mes .@npcname$;
                    mes "Please use my service next time";
                    close;
            
            }
    
    L_NOCreds:
       mes .@npcname$;
       mes "You don't have enough credits.";
       close;
       
    L_NOZen:
       mes .@npcname$;
       mes "You don't have enough zeny.";
       close;
    
    }

     

     

    12mn reset

     

    Spoiler
    prontera,138,184,5    script    Credit Agent    828,{
    //===== Configure misc details here=====
    set .@npcname$,"^000088[ Mr. Credit ]^000000";
    set .@creditscolor$,"^FF0000Credits^000000";
    set .@zenycolor$,"^0000FFZeny^000000";
    //conversion amt.
    set .@cnvcz,10000000;
    
        if (credscd == gettime(DT_YYYYMMDD)) {
                mes .@npcname$;
                mes "You've already used your chance today.";
                mes "Come back after 12:00mn after reset";
                close;
            }
            mes .@npcname$;
            mes "I Can Change Credits to Zeny";
            mes "and Zeny to Credits";
            mes "Remember 1 Credit = ^64000010,000,000z^000000.";
            mes "Max Zeny is ^6400002,000,000,000z^000000 so be careful with your Credits";
            mes "Exchanging Credits with Max Zeny your Credits will be Wasted";
            mes "So what do you want?";
            next;
            switch(select("~ "+.@creditscolor$+" to "+.@zenycolor$+":~ "+.@zenycolor$+" to "+.@creditscolor$+":~ Nothing")){
                case 1:
                    mes .@npcname$;
                    mes "Are you sure you want to exchange your Credits to Zeny?";
                    next;
                    switch(select("~ Yes:~ No")){
                        case 1:
                            mes .@npcname$;
                            mes "How many Credits do you want to exchange?";
                            next;
                            input .@t;
                            if(countitem(8055) < .@t) goto L_NOCreds;
                            delitem 8055,.@t;
                            set Zeny,Zeny+(.@cnvcz * .@t);
                            set credscd,gettime(DT_YYYYMMDD);
                            close;
                            
                        case 2:
                            mes .@npcname$;
                            mes "Please use my service next time";
                            close;
                        }
                        
                case 2:
                    mes .@npcname$;
                    mes "Are you sure you want to exchange your Zeny to Credits?";
                    next;
                    switch(select("~ Yes:~ No")){
                        case 1:
                            mes .@npcname$;
                            mes "How many Credits do you want to get?";
                            next;
                            input .@t;
                            if(Zeny < (.@cnvcz * .@t)) goto L_NOZen;
                            set Zeny,Zeny-(.@cnvcz * .@t);
                            getitem 8055,.@t;
                            set credscd,gettime(DT_YYYYMMDD);
                            close;
                            
                        case 2:
                            mes .@npcname$;
                            mes "Please use my service next time";
                            close;
                        }
                
                case 3:
                    mes .@npcname$;
                    mes "Please use my service next time";
                    close;
            
            }
    
    L_NOCreds:
       mes .@npcname$;
       mes "You don't have enough credits.";
       close;
       
    L_NOZen:
       mes .@npcname$;
       mes "You don't have enough zeny.";
       close;
    
    }

     

     

     

    Did not try / test any of the script too time consuming para maghintay ng oras for the conditions, but it should work as intended, post any errors kung meron.

  8. 1 hour ago, Tero said:

    I put up a guide on how to make a custom pet in another part of the forum which goes over everything about making them in a lot of detail.

    The short version is that you need to modify petinfo.lub, which is stored inside the datainfo folder (you can just search for it with GRF editor).  Of course, you need to add the new illustration to the GRF file as well.  If you want to make the pets talk, that's also in the GRF file, in pettalktable.xml.  The thread explains more about how to modify these.

     

    As for the images, I'd love to say there's an easy way to get these, but there's not really.  I just search for the pet I want to make on Google, and if there's a good piece of fanart, I use that, if not, I meticulously edit the card art.  In some cases I even have to redraw parts of the art that are cut off, for example in the picture above the card art actually cuts off Pere's fingers on one hand so I had to draw them, luckily the resolution is low so you can't tell.  Of course, if you're not a crazy person you could just use one of their sprites or something, which I did for a couple monsters whose card art wasn't suitable.

    Ohh. There's that, I didn't check earlier, but I'll look into this. Thank you. 

  9. On 11/23/2022 at 2:25 PM, Tero said:

    A small update this time, but something I'm quite pleased with.

     

    Meet Pere!  Players of Renewal might recognize Pere from Jitterbug of Nightmare, which I recently implemented on my server.  (Which, as mentioned above, is PRE-RE, I've been porting all of Renewal's content to it).

    Pere1.png.ea996710610f08f05134c18f49f30b83.png

    Pere is quite special.  Besides being super cute, she can also serve as your ensemble partner!

    Pere2.png.57ff313584615ee5da19159f4a536737.png

    There are two Peres that you can get as pets, one dances and one plays the guitar, and whichever one you are, you need the other one.

    Someone on my server has been complaining since day 1 about the necessity of being joined at the hip with a Bard and I think this is a good compromise that preserves the intent of the ensemble skills while also making them a little more accessible.

     

    If you want to add this functionality to your server, it's actually pretty easy from a coding perspective.  You just have to find the method "skill_check_condition_castbegin" in skill.cpp, then find this code:

    	else if(inf2[INF2_ISENSEMBLE]) {
    	    if (skill_check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1 && !(sc && sc->data[SC_KVASIR_SONATA])) {
    		    clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    		    return false;
    	    }
    	}

    And replace it with this:

    	else if(inf2[INF2_ISENSEMBLE]) {
    		// check to see if we have the ensemble pet
    		bool ensemblepet = false;
    		if (sd && sd->pd) {
    			if ((sd->status.class_ == JOB_BARD || sd->status.class_ == JOB_CLOWN) && sd->pd->pet.class_ == 3069 && sd->pd->pet.intimate > PET_INTIMATE_LOYAL) {
    				ensemblepet = true;
    			}
    			if ((sd->status.class_ == JOB_DANCER || sd->status.class_ == JOB_GYPSY) && sd->pd->pet.class_ == 3070 && sd->pd->pet.intimate > PET_INTIMATE_LOYAL) {
    				ensemblepet = true;
    			}
    		}
    		if (!ensemblepet && skill_check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1 && !(sc && sc->data[SC_KVASIR_SONATA])) {
    		    clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    		    return false;
    	    }
    	}

    Of course, you also have to pull everything from Jitterbug of Nightmare into PRE-RE, then implement the Peres as custom pets, but at least the coding part is simple!  (alternatively, you could just use a different pet, like maybe a Rocker or something, you can just change the id number it looks for in the pet.class_ part).

    Really cool. Where do you get those pet images and how do you put them on the client?

  10.   - Id: 13697
        AegisName: J_Blessing10_Box
        Name: Blessing Scroll 10 Box
        Type: Cash
        Weight: 10
        Flags:
          UniqueId: true
        Trade:
          NoDrop: true
          NoTrade: true
          NoSell: true
          NoCart: true
          NoGuildStorage: true
          NoMail: true
          NoAuction: true
        Script: |
          getitem 12215,10;

     

    ###########################################################################
    #
    # Item Settings
    #
    ###########################################################################
    # - Id                      Item ID.
    #   AegisName               Server name to reference the item in scripts and lookups, should use no spaces.
    #   Name                    Name in English for displaying as output.
    #   Type                    Item type. (Default: Etc)
    #   SubType                 Weapon, Ammo or Card type. (Default: 0)
    #   Buy                     Buying price. When not specified, becomes double the sell price. (Default: 0)
    #   Sell                    Selling price. When not specified, becomes half the buy price. (Default: 0)
    #   Weight                  Item weight. Each 10 is 1 weight. (Default: 0)
    #   Attack                  Weapon's attack. (Default: 0)
    #   MagicAttack             Weapon's magic attack. (Default: 0)
    #   Defense                 Armor's defense. (Default: 0)
    #   Range                   Weapon's attack range. (Default: 0)
    #   Slots                   Available slots in item. (Default: 0)
    #   Jobs                    Jobs that can equip the item. (Map default is 'All: true')
    #   Classes                 Upper class types that can equip the item. (Map default is 'All: true')
    #   Gender                  Gender that can equip the item. (Default: Both)
    #   Locations               Equipment's placement. (Default: None)
    #   WeaponLevel             Weapon level. (Default: 1 for Weapons)
    #   ArmorLevel              Armor level. (Default: 1 for Armors)
    #   EquipLevelMin           Minimum required level to equip. (Default: 0)
    #   EquipLevelMax           Maximum level that can equip. (Default: 0)
    #   Refineable              If the item can be refined. (Default: false)
    #   Gradable                If the item can be graded. (Default: false)
    #   View                    View sprite of an item. (Default: 0)
    #   AliasName               Another item's AegisName that will be sent to the client instead of this item's AegisName. (Default: null)
    #   Flags:                  Item flags. (Default: null)
    #     BuyingStore           If the item is available for Buyingstores. (Default: false)
    #     DeadBranch            If the item is a Dead Branch. (Default: false)
    #     Container             If the item is part of a container. (Default: false)
    #     UniqueId              If the item is a unique stack. (Default: false)
    #     BindOnEquip           If the item is bound to the character upon equipping. (Default: false)
    #     DropAnnounce          If the item has a special announcement to self on drop. (Default: false)
    #     NoConsume             If the item is consumed on use. (Default: false)
    #     DropEffect            If the item has a special effect on the ground when dropped by a monster. (Default: None)

     

    So you can either remove

        Flags:
          UniqueId: true

    UniqueId - If the item is a unique stack. (Default: false), this is unique every purchase on shops (npc shops,cash shop etc) which is the one in your example

    or use the following script commands to combine them into one stack

    ---------------------------------------
    
    *mergeitem({,<char_id>});
    
    Open merge item window to merge available item can be merged.
    
    Examples
    1. See the NPC 'npc/re/other/merge_item.txt'.
    2. Simple usage:
        mes "Let's check if any item can be merged.";
        close2;
        mergeitem;
        end;
    
    ---------------------------------------
    
    *mergeitem2({<item_id>{,<char_id>}});
    *mergeitem2({"<item name>"{,<char_id>}});
    
    Merge all stackable items that separated by GUID flags
    (UniqueId in item_db or in item_group).
    If no item ID/name given, all possible items in player's inventory will be merged.
    
    ---------------------------------------

     

  11. On 4/6/2021 at 9:10 PM, Mael said:

    Check msgstringtable.txt

    Yeah this does work, you have to edit lines 1934 1935 1936 and E X P rate, Drop rate & Death Penalty it changes but where it says (PCCafe 0.0% TPlus 0.0% + <server name> Server XX.XX%) is at line 3033 but doesn't do a thing however I want to change it. I can remove the rest but doesn't look useful. Maybe something in src needs to be changed, but I'm not sure.

  12.  

    Yes my DB usernames is moonlight...

     

    I went back to change everything and again the same error

    Unable to connect to your database server using the provided settings.
    
    Filename: core/Loader.php
    
    Line Number: 346
    
    

    Mysql version ( VPS ):

    Variable_name           | Value                   |
    +-------------------------+-------------------------+
    | innodb_version          | 5.5.41                  |
    | protocol_version        | 10                      |
    | slave_type_conversions  |                         |
    | version                 | 5.5.41-0ubuntu0.14.10.1 |
    | version_comment         | (Ubuntu)                |
    | version_compile_machine | x86_64                  |
    | version_compile_os      | debian-linux-gnu  
    

    wondering how was this solved? i am getting this error for the loader right now, anybody knows?

  13. Hi Guys, 

     

    I know this has been posted over and over again, but I think i have read and check all the other topics about this and still can't find the answer.

    what I think everybody wants/need/asks for is this.

     

    I found this script made by annie.

     

    prontera,159,179,4    script    Team Wars::teamwar    899,{
        if (getgmlevel() >= 99){
            menu "standard menu",standard,"reset",lend;
        }
    standard:
        set $@members,2; // number of party members change this to your party size you want
        set $@start,0;
        getpartymember(getcharid(1));
        set @partymembercount,$@partymembercount;
        if ( $@start == 1 ) {
            mes "The Sign Ups are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";
            close;
        }
        if ( @partymembercount == $@members ) {
            if ( $@TeamID1 == getcharid(1) ) {
                mes "Do you wish to sign out your team?";    
                next;    
                if (select("I Give up ~.","Never Say Quit !!")==2) close;    
                announce "Team 1 : [ " + getpartyname($@TeamID1) + " ] has sign out. We need another Party to sign up now!",bc_yellow|bc_map;    
                set $@TeamID1, 0;
                close;    
            }
            if ($@TeamID2==getcharid(1)) {    
                mes "Do you wish to sign out your team?";    
                next;    
                if (select("I Give up ~.","Never Say Quit !!")==2) close;
                announce "Team 2 : [ " + getpartyname($@TeamID2) + " ] has sign out. We need another Party to sign up now!",bc_yellow|bc_map;    
                set $@TeamID2, 0;    
                close;    
            }
            mes "Hello "+strcharinfo(0)+" what do you want?";
            if (($@TeamID1!=0) && ($@TeamID2!=0)) {
                mes "The Sign Ups are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";
                close;
            }
            if ( getpartyleader(getcharid(1),2) != getcharid(0) ) {
                mes "Only party leader have the right to sign up / out from the game with me..";
                close;
            }
            mes "Choose your team to register.";
            switch(select("Red Team - [" + GetPartyName($@TeamID1) + "] :Blue Team - [" + GetPartyName($@TeamID2) + "]")) {
            case 1:    mes "[  Team War  ]";
                if ($@TeamID1==0 || getpartyname($@TeamID1)=="null") {
                    getpartymember(getcharid(1)),1;
                    getpartymember(getcharid(1)),2;
                    copyarray $@partymembercidt1[0],$@partymembercid[0],$@members;
                    copyarray $@partymemberaidt1[0],$@partymemberaid[0],$@members;
                    for (set .@i,0; .@i<$@members; set .@i,.@i+1) {
                        if(isloggedin($@partymemberaidt1[.@i],$@partymembercidt1[.@i]))  set .@count,.@count+1;
                    }
                    if(.@count < $@members) {
                        mes "You need all your party members to be online to Register";
                        close;
                    }
                    set $@TeamID1, getcharid(1);    
                    initnpctimer;    
                    mes "Your Party is now subscribed, good luck!";    
                    announce "Team 1 : [ " +getpartyname($@TeamID1)+ " ] has sign up For the Team War!",bc_blue|bc_map;    
                    doevent "teamwar::OnSubscriptionTeam";    
                    close;    
                } else {
                    mes "I'm sorry! Another Team has sign up before you...";    
                    close;    
                }
            case 2:    mes "[  Team War  ]";
                if ($@TeamID2==0 || getpartyname($@TeamID2)=="null") {    
                    getpartymember(getcharid(1)),1;
                    getpartymember(getcharid(1)),2;
                    copyarray $@partymembercidt2[0],$@partymembercid[0],$@members;
                    copyarray $@partymemberaidt2[0],$@partymemberaid[0],$@members;
                    for (set .@i,0; .@i<$@members; set .@i,.@i+1) {
                        if(isloggedin($@partymemberaidt2[.@i],$@partymembercidt2[.@i])) set .@count,.@count+1;
                    }
                    if(.@count < $@members) {
                        mes "You need all your party members to be online to Register";
                        close;
                    }
                    set $@TeamID2, getcharid(1);    
                    initnpctimer;    
                    mes "Your Party is now subscribed, good luck!";    
                    announce "Team 2 : [ " +getpartyname($@TeamID2)+ " ] has sign up For the Team War!",bc_blue|bc_map;
                    doevent "teamwar::OnSubscriptionTeam";    
                    close;    
                } else {    
                    mes "I'm sorry! Another Team has sign up before you...";    
                    close;
                }
            }
        } else {
            mes "[Event Handler]";
            mes "Please contact your party leader.";
            mes "Your team must have a party consisting of "+$@members+" members.";
            close;
        }
    
    
    OnSubscriptionTeam:
        getpartymember($@TeamID2),1;
        getpartymember($@TeamID2),2;
        copyarray $@partymembercidtc2[0],$@partymembercid[0],$@members;
        copyarray $@partymemberaidc2[0],$@partymemberaid[0],$@members;
        for (set .@i,0; .@i<$@members; set .@i,.@i+1) {
            if(isloggedin($@partymemberaidc2[.@i],$@partymembercidtc2[.@i])) set .@countx,.@countx+1;
        }
        if(.@countx < $@members) {
            announce "Team War : "+getpartyname($@TeamID2)+"are not all online the match has been canceled",0;
            announce "Team War : registration for 2 new teams are now available",0;
            goto lend;
        }
        if ( $@TeamID2 && $@partymembercount != $@members ) {
            announce getpartyname($@TeamID2) +" has extra party members !", 0;
            goto lend;
        }
        getpartymember($@TeamID1),1;
        getpartymember($@TeamID1),2;
        copyarray $@partymembercidtc1[0],$@partymembercid[0],$@members;
        copyarray $@partymemberaidc1[0],$@partymemberaid[0],$@members;
        for (set .@i,0; .@i<$@members; set .@i,.@i+1) {
            if(isloggedin($@partymemberaidc1[.@i],$@partymembercidtc1[.@i])) set .@countz,.@countz+1;
        }
        if(.@countz < $@members) {
            announce "Team War : "+getpartyname($@TeamID1)+"are not all online the match has been canceled",0;
            announce "Team War : registration for 2 new teams are now available",0;
            goto lend;
        }
        if ( $@TeamID1 &&  $@partymembercount != $@members ) {
            announce getpartyname($@TeamID1) +" has extra party members !", 0;
            goto lend;
        }
        if($@TeamID1!=0 && $@TeamID2!=0){
            announce "Team War : We have 2 Teams signed up now : "+getpartyname($@TeamID1)+" and "+getpartyname($@TeamID2)+".",bc_blue|bc_map;
            set @win1, 0;
            set @win2, 0;
            goto Onstart;
        }
        end;
    
    
    OnTimer50000:
        if (($@TeamID1!=0) && ($@TeamID2!=0)) {
            stopnpctimer;
            end;
        }
        stopnpctimer;
        set $@TeamID1, 0;
        set $@TeamID1, 0;
        announce "Team War : we lack teams to start registration for two teams are now available",0;
        end;
        
    OnStart:
        warpparty "guild_vs2",89,49,$@TeamID1;
        warpparty "guild_vs2",11,49,$@TeamID2;
        set $@start,1;
        end;
    
    
    lend:
        stopnpctimer;
        set $@TeamID1,0;
        set $@TeamID2,0;
        set $@start,0;
        set @win1,0;
        set @win2,0;
        set @partymembercount,$@members;
        announce "Thanks for playing",0;
        end;
    
    
    OnTimer250000:
        Announce "Team War : No Party won due to time limit!",0;
        mapwarp "guild_vs2","prontera",156,191;
        goto lend;
        end;
    
    
    OnPCDieEvent:
    OnPCLogoutEvent:
        if(strcharinfo(3) != "guild_vs2") end;
        warp "prontera",156,191;
        for(set .@i, 0; .@i < $@members; set .@i, .@i + 1) {
            if ( $@partymembercidt1[.@i] == getcharid(0)) {
                deletearray $@partymembercidt1[.@i], 1;
                deletearray $@partymemberaidt1[.@i], 1;
                if( getarraysize($@partymembercidt1) == 0 ) {
                    set @win2,getarraysize($@partymembercidt2);
                    goto onwin;
                }
            }
            if ( $@partymembercidt2[.@i] == getcharid(0) ) {
                deletearray $@partymembercidt2[.@i], 1;
                deletearray $@partymemberaidt2[.@i], 1;
                if( getarraysize($@partymembercidt2)  == 0 ) {
                    set @win1,getarraysize($@partymembercidt1);
                    goto onwin;
                }
            }
        }
        end;
    
    
    
    
    onwin:
        if (@win1==0) {
            warpparty "prontera",156,191,$@TeamID1;
            warpparty "prontera",156,191,$@TeamID2;
            Announce "Team War :"+GetPartyName($@TeamID2)+" won",0;
            for ( .@i = 0; .@i < @win2; .@i++ )
                getitem 7588, rand(6,10), $@partymemberaidt2[.@i];
            goto lend;
        }
        if (@win2==0) {
            warpparty "prontera",156,191,$@TeamID1;
            warpparty "prontera",156,191,$@TeamID2;
            Announce "Team War :"+GetPartyName($@TeamID1)+" won",0;
            for ( .@i = 0; .@i < @win1; .@i++ )
                getitem 7588, rand(6,10), $@partymemberaidt1[.@i];
            goto lend;
        }
        end;
    }
    
    
    guild_vs2    mapflag    nosave    SavePoint
    guild_vs2    mapflag    nomemo
    guild_vs2    mapflag    nobranch
    guild_vs2    mapflag    pvp_noguild
    guild_vs2    mapflag    nocommand    60
    guild_vs2    mapflag    noicewall
    guild_vs2    mapflag    pvp
    guild_vs2    mapflag    partylock
     

     

    Now the script itself is amazing, but it just lacks one function, A Job check. since it would really be nice to have no duplicate jobs ( knight:knight = denied | knight:crusader = allowed )

     

    so i continued my search for it, then I found this 

    Annakid's Post at some support thread.

     

     

    getpartymember(getcharid(1),2);
    
    copyarray .@partyids[0],$@partymembercid[0],$@partymembercount;
    
    set .@count, $@partymembercount;
    
    for (set .@a, 0; .@a < .@count; set .@a, .@a + 1) {
    attachrid .@partyids[.@a];
    
    set .@jobs[.@a], Class;
    
    // Check Job from other current jobs
    for (set .@b, 0; .@b < getarraysize(.@jobs); set .@b, .@b + 1) {
    if (Class == .@jobs[.@b]) {
    set .@matches, .@matches + 1;
    }
    }
    
    // Check if this job as too many
    if (.@matches > 2) { // Too Many of the Same Job }
    
    // Less than 2, so reset counter for next player
    set .@matches, 0;
    
    }
     

     

    but I tried to merge it to annie's script and no luck, it didn't work, so i decided to use annakid's script as a portal to get to annie's partyvsparty script but even though I have 2 Blacksmiths at my party it does not block my party from warping.

     

    What I really want to ask for is how do we put a DUAL JOB/CLASS Restriction on Annie's PVP Party vs Party Script.

     

    • Upvote 1
×
×
  • Create New...