Jump to content

Magnetix

Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Magnetix

  1. Test this first.

    prontera,162,193,5    script    Entrada PvP        943,{
    
        set .@n$, "[ ^cc0000Porteiro PvP^000000 ]";
    INICIO:
        mes .@n$;
        mes "Arena 01 : ^0000FFPVP Arena^000000";
        mes "Arena 02 : ^FF0000PVP Izlude^000000";
        mes "O que você gostaria de fazer ?";
        next;
        switch(select("^3366FFEscolher Arena^000000:^800080Visualizar Ranking^000000:^00FF00Ver Minha Posição^000000:Sair")) {
        case 1:
            mes .@n$;
            mes "Escolha a Arena que gostaria de entrar";
            mes "Arena 01 : ^0000FFPVP Arena^000000";
            mes "Arena 02 : ^FF0000PVP Izlude^000000";
            next;
            switch(select("- ^0000FFArena Fechada^000000 [ "+getmapusers($@map$[1])+" ]:- ^FF0000Arena Izlude^000000 [ "+getmapusers($@map$[2])+" ]:- Nenhuma")) {
            case 1:
                announce ""+strcharinfo(0)+" Entrou no PvP 1!!",bc,0xBAB9B9;
                warp $@map$[1],0,0;
                end;
    
            case 2:
                announce ""+strcharinfo(0)+" Entrou no PvP for All Room !!",bc,0xBAB9B9;
                warp $@map$[2],0,0;
                end;
    
            case 3: close;
            }
    
        case 2:
            mes .@n$;
            mes "Escolha a Arena do Rank:";
            next;
            switch(select("- Rank ^0000FFArena 01^000000:- Rank ^FF0000Arena 02^000000:- Voltar")) {
                case 1: callfunc("PvPS_Func","Ranking_Arena",1);close;
                case 2: callfunc("PvPS_Func","Ranking_Arena",2);close;
                case 3: goto INICIO;end;
            }
    
        case 3:
            mes .@n$;
            mes "Escolha o Tipo de PVP:";
            next;
            switch(select("- ^0000FFArena 01^000000:- ^FF0000Arena 02^000000:- Voltar")) {
                case 1: callfunc("PvPS_Func","MeuRanking",1);close;
                case 2: callfunc("PvPS_Func","MeuRanking",2);close;
                case 3: goto INICIO;end;
            }
    
        case 4: close;
        }
        end; // fallback
    
    }

     

    These are leftovers.

    close;
    }
    }
    }
    warp $@map$[4],0,0;
    end;
    
    case 5:
    if(Class < 4023 || Class > 4045){
    mes .@n$;
    mes "Só babys podem entrar nesse PvP !";
    close;
    }
    warp $@map$[5],128,114;
    end;
    
    case 6:
    close;

     

  2. -	script	Healer	-1,{
    OnTouch:
    	if((getgroupid() < 1)) goto normal_player;
    	if((getgroupid() >= 2)) goto vip_player_ouro;
    	if((getgroupid() >= 1)) goto vip_player_prata;
    	end;

    for this to work, add range or how far from the npc to trigger.


    example, change

    alberta,25,240,6	duplicate(Healer)	Curandeira#alb	936

    to

    alberta,25,240,6	duplicate(Healer)	Curandeira#alb	936,3,3

     

    • Like 1
  3. 1. We advise you to merge the pre-renewal files with the renewal. Doing this will save you the time of fixing the item/skill descriptions, maps and other client changes in renewal.

    2 & 3. You have to match the filenames of the files inside System folder with the Lub files when you patched your client. (See steps 11~14 under [ The kRO Client: Updating, Diffing, Hexing, Translating, and Customizing ])

  4. 1. For entrance

    	if ( agitcheck() || agitcheck2() || agitcheck3() ) {
    		mes "[Entrance Guard]";
    		mes "Woe is currently active can't enter right now"; // NPC message when woe is active
    		close;
    	} else {
    		/*
    		// your code when woe is off
    		*/
    	}

    2. Kick everyone when woe starts (I'm not sure if 'SavePoint' works but if it throws an error, you can change it to specific map/area)

    OnAgitStart:
    OnAgitStart2:
    OnAgitStart3:
    	mapwarp .map$, "SavePoint",0,0;
    	end;
    • Upvote 1
  5. Find

        //Check to see if the items is already +10
        if(getequiprefinerycnt(.@part) >= 10) {
            getitem 542,1;
            dispbottom "I can't refine this any more. This is as refined as it gets!";
            close;
        }

    replace with

        //Check refinement
        if ( getequiprefinerycnt(.@part) < 8 || getequiprefinerycnt(.@part) >= 10 ) {
            getitem 542,1;
            dispbottom "I can only refine +8 and +9 items!";
            close;
        }

     

  6. Please refer to my reply and ignore my suggestion at the bottom. I already mentioned that the script already offers a uid check, you just have to reuse it.

     

    veil,81,134,6	script	Quistis Trepe	10414,{
    	.gui = get_unique_id ();
    	.@nb = query_sql("SELECT `dailybbq` FROM `bloody_branch_uid` WHERE `unique_id` = "+.gui+" LIMIT 1", .@bbq);
    	
    	mes "[Quistis Trepe]";
    	mes "Say... do you want to play the MvP Ladder game? It cost 15 Vote Coins Per person, total of 30 Vote Coins now to get in.";
    	next;
    	switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) {
    		case 1:
    			if (.@bbq == 0) {
    				break;
    			} else if (.@bbq >= 1) {
    				mes "You have already completed the Bloody Branch Quest for today. Come back tomorrow after 12:00am server time.";
    				close;
    			}

     

    Here's the line of codes that verify party members' IP

    			//Check party member UniqueID and see if they have completed for the day.
    			if(.@cip == 0 && .@cuid == 1) {
    			set .@done, 1;
    			}
    			// If same IP is on party
    			else if(.@cip == 1 && .@cuid == 0) {
    			set .@dupli, 1;
    			}			
    			else if(.@cip == 0 && .@cuid == 0) {
    				// Add IP to party list for checking
    				.@party_list$ += "|" + .@ipd$ + "|";
    				// Add Unique_ID to party list for checking
    				.@party_list$ += "|" + .@pmbbq$ + "|";
    			}

    After this, all you have to do was to reuse/insert the uid check.

    ...and you already did the first few lines

    			.@pmu = query_sql("SELECT last_unique_id FROM `login` WHERE account_id ="+$@partymemberaid[.@i]+"", .@party_mem_uid$);
    			.@gpmu = query_sql("SELECT `dailybbq` FROM `bloody_branch_uid` WHERE `unique_id` = "+.@party_mem_uid$+" LIMIT 1", .@pmbbq$);

     

  7. 5 hours ago, DR4LUC0N said:

    Oops, should have been more specific, basically it would be to check the party member if they entered before against the sql(bloody_branch) table for the NPC. Because I can do a check at the beginning for the person attached to the NPC, but not the party member. So the party member can use same PC with different IP and get in.

    You can just re-use the check since you're already attaching the party members

    	.gui = get_unique_id();
    	.@nb = query_sql("SELECT `bloodybranch` FROM `bloody_branch` WHERE `unique_id` = "+.gui+" LIMIT 1", .@bbq);
    	if (.@nb) .@dupli = 1;

     

    There's a simpler way, instead of the checking the IPs and unique ID, you can also save their account ids.

  8. You can use SQL query to look for the mvp cards in a player's inventory, an account's storage, vendor's shop, if you have mail enabled include mail attachments and guild storages.

    SELECT SUM(amount) FROM `inventory` WHERE `nameid` = <card_id>"

    The above will only count the specified mvp card id from all of the player's inventory, you have to include other tables (storage, vendings, etc.),

    and you have to do it for ALL mvp cards (loop), and at the end sum everything for the grand total.

    To hasten searches and avoid lagging the server, you may want to alter the table and index columns with `nameid` (this will also increase storage)

    and also instead of pulling the data each time you speak to the npc, better to pull the data at certain time of the day and just include 'As of <datetime>'... something like that

  9. The tombstone tracks the time of the MvP's death. If you want to show MvPs that are alive, here's an idea:

    Save all MvP id or you can query the ids from the database if you're using sql for mob_db.

    setarray $mvp_id, <mvp_id>; // Add the ids you want to track

    Create a script where, when an MvP is killed (OnNPCKillEvent), blacklist its id or skip showing the dead ones.

    OR you can use the tombstone to track if the MvP is dead or alive. You can set your data each time the tombstone is summoned and removed.

  10. If you're using Notepad++, try using regular expressions (regex)

    OR you can import item_db_equip then run an SQL command, something like

    UPDATE `item_db` SET `slots` = 4 WHERE `type` = 'Weapon';

    ^this is for weapons, just change `type` for armors. Take note that using the above will make ALL weapons/armors 4 slotted.

    After making changes, you can export as csv and use the included tool csv2yaml. <---- not sure if it'll work since I haven't tried it myself

    I'm sure there are better ways of doing it.

  11. since you already have an IP check and you were already pulling their IP, you might as well pull their unique_id

    find the lines:

    			query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + $@partymemberaid[.@i] + "", .@ipd$);
    			// If same IP is on party
    			if(compare(.@party_list$, "|" + .@ipd$ + "|" ) == 1) {
    				set .@dupli, 1;

    and adjust to something like

    			query_sql ("SELECT `last_ip`,`last_unique_id` FROM `login` WHERE `account_id`=" + $@partymemberaid[.@i] + "", .@ipd$, .@unique_id$);
    			// If same IP is on party
    			if ( compare(.@party_list$, "|" + .@ipd$ + "|") || compare(.@party_list$, "|" + .@unique_id$ + "|") ) {
    				set .@dupli, 1;

     

    Haven't tested the code

  12. rAthena and the database server will run on the same machine. That's why in the guide, it was set to allow connection from localhost.

    If you want to remotely connect, you have to allow connection for the 'your-user'@'your-ip'. This part

    Also, if you have installed a firewall or enabled iptables, you have to open and allow connection to your mysql/mariadb port.

  13. Hi,

     

    I've recently setup a multi-map server, 1 login-server, 1 char-server and 2 and possibly more map-servers.

    Fortunately the setup was successful. So far these 2 are probably the most common issues i've encountered.

    • when using commands or skills that requires info(s) on certain map, no information is being retrieved from the other map-server
    • some statuses that were applied on one of the servers, the status disappears when loading to a different world (Yup, we know that map-server has its own "world" with diffent settings and etc)

    With these two, skills such as Emergency Call and commands like recall/recallall and @who/@who2/@who3 failed to pull information that were on a different map server.

     

    You may be wondering why I did this. Simple, I wanted to separate the load that is usually shouldered by the map server. In my mind i'm thinking what if I let the other map server handle

    few maps like leveling spots and give the towns to the other map server and then maybe let this other map server handle the gvg maps. This may also be handy when hosting events where

    you may need to alter map server settings...

     

    Edit: Wth, i'm pretty sure I clicked Source Discussion. I am requesting this thread to be moved.

  14. Try this

    comodo,191,157,4	script	Set of the day	83,{
    	if (rewarded > gettimetick(2)) close;
    	mes"[Set of the day]";
    	mes "Welcome to FiestaRO!";
    	mes "Ready to receive your set of the day?";
    	next;
    	mes "[Set of the day]";
    	mes "Today's set is called ^FF0000 The Great Madara ^000000.";
    	mes "Set of the day only last for ^00FF00 3 hours ^000000 so make it count!";
    	sleep 1000;
    	rentitem 31874,10800;
    	sleep 5000;
    	rentitem 31895,10800;
    	sleep 1000;
    	set rewarded, gettimetick(2) + 86400;
    	close;
    }
    
    • Upvote 1
×
×
  • Create New...