Jump to content

Emistry

Forum Moderator
  • Posts

    10017
  • Joined

  • Days Won

    407

Posts posted by Emistry

  1. query_sql("SELECT `id`, `name_endlish` FROM `mob_db` WHERE `card_id` > 0 AND `id` NOT IN (1083,1084) ORDER BY RAND() LIMIT 1",.@mob_id,.@mob_name$);

    if u have a complete mob_db , just filter all the mob using the sql query.

    NOT IN (1083,1084)

    just fill in more mob_id that you want to blacklist.

  2. this? conf/battle/gm.conf#L38-L42

    // requires RENEWAL_EXP or RENEWAL_DROP to be enabled (src/config/renewal.hpp)
    // modifies @mobinfo to display the users' real drop rate as per renewal_drop formula
    // modifies @iteminfo to not display the minimum item drop rate (since it can't tell the mob level)
    // modifies @whodrops to display the users' real drop rate as per renewal_drop formula
    atcommand_mobinfo_type: 1

     

  3. -	script	sample	-1,{
    
    	OnNPCKillEvent:
    		if (.player_count >= 20) {
    			if (rand(1, 100) == 1) 
    				getitem 40003, 1;
    		}
    		end;
    		
    	OnPCLoginEvent:
    		.player_count++;
    		end;
    		
    	OnPCLogoutEvent:
    		.player_count--;
    		end;
    		
    	OnUpdate:
    		if (.player_count < 20) {
    			announce "There is "+.player_count+"/20 players online, a drop event will start when there is a total of 20 players online!", bc_all;
    		}
    		else if (.player_count == 20) {
    			announce "A total "+.player_count+" player is online now, mini event will start, all monster will now drop Gatcha ticket by 1%", bc_all;
    		}
    		end;
    }

     

  4. -	script	atcmd_example	-1,{
    OnInit:
    	bindatcmd "dice",strnpcinfo(3) + "::OnAtcommand";
    	end;
    OnAtcommand:
    	switch (atoi(.@atcmd_parameters$)) {
    		case 1:
    			emotion ET_DICE1, getcharid(3);
    			break;
    		case 2:
    			emotion ET_DICE2, getcharid(3);
    			break;
    		case 3:
    			emotion ET_DICE3, getcharid(3);
    			break;
    		case 4:
    			emotion ET_DICE4, getcharid(3);
    			break;
    		case 5:
    			emotion ET_DICE5, getcharid(3);
    			break;
    		case 6:
    			emotion ET_DICE6, getcharid(3);
    			break;
    		default:
    			dispbottom "Invalid. " + .@atcmd_command$ + " <1-6>";
    			break;
    	}
    	end;
    }

     

  5. the account_id field has been dropped from the guild_member table, unless you rollback the commits that did this, else no point to re-add it since the field wont have value stored there

    alternatively, you could just rewrite the SQL to do a INNER JOIN or LEFT JOIN, to get your data.

    but since you're not really using .Options & 4 ... I guess its fine if you do the easier way.

    find

    SELECT account_id,char_id FROM `guild_member`....

    and replace into

    SELECT account_id,char_id FROM `char`....

     

  6. On 6/16/2022 at 5:39 AM, iraciz said:

    Bindatcommands are not working in the item scripts.

    *useatcmd "<command>";
    
    This command will execute a script-bound atcommand for the attached RID. If the
    supplied command is not bound to any script, this command will act like 'atcommand'
    and attempt to execute a source-defined command.
    
    The three .@atcmd_***** variables will NOT be set when invoking script-bound atcommands
    in this way.

     

    • Upvote 1
  7. 
    				if (instance_create(.@md_name$) < 0) {
    					mes "Party Name: "+ getpartyname(.@party_id);
    					mes "Party Leader: "+strcharinfo(0);
    					mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
    					close;
    				}

    try change to

    if (.instance_id) {
    	if (instance_live_info(ILI_MODE, .instance_id) != -1) {
    		mes "Someone already started before you.";
    		mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
    		close;
    	}
    }
    .@instance_id = instance_create(.@md_name$);
    if (.@instance_id < 0) {
    	mes "Party Name: "+ getpartyname(.@party_id);
    	mes "Party Leader: "+strcharinfo(0);
    	mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
    	close;
    }
    .instance_id = .@instance_id;

     

  8. On 5/31/2022 at 7:28 PM, powkda said:

    to check if in any member of the group at @autotrade and if you don't give the cash to that member.

    if (checkvending(convertpcinfo($@partymemberaid[.@i], CPC_NAME)) & 2) 
    	continue;

     

  9. 3 hours ago, kalabasa said:

    the given range slots of NPC that you mentioned or

    range slot, when the server startup it will auto allocate some space to hold the npc view data

    if you assigned too much free slot, you are just wasting ur resources.

    3 hours ago, kalabasa said:

    higher NPC id's ?

    and value shouldn't exceed NPC_RANGE3_END (unless you know exactly what you are trying to do), else no resources will be allocated for the npc view data.

    • Like 1
  10. function deleteItem {
    	.@item_req_ratio = 1;
    	if (@rebirth_type == 1 && )
    		.@item_req_ratio = max(1, (rebirth_no / 20));
    	
    	for (.@i=0 ; .@i < .size_item; .@i += 3 ){
    		if ( !( getarg(0)&(.item_req[.@i+2]) ) ){continue;}
    		delitem .item_req[.@i], ( .item_req[ .@i+1 ] * .@item_req_ratio);
    	}
    	return;
    }
    function CheckItemNeed {
    	if ( Weight > 200000 ) {
    		mes "You must reduce your weight to 2000 to do Rebirth.";
    		close;
    	}
    	.@item_req_ratio = 1;
    	if (@rebirth_type == 1 && )
    		.@item_req_ratio = max(1, (rebirth_no / 20));
    	
    	.@error = 0;
    	for (.@i=0 ; .@i < .size_item; .@i += 3 ){
    		if ( !( getarg(0)&(.item_req[.@i+2]) ) ){continue;}
    		if ( countitem( .item_req[.@i] ) < (.item_req[ .@i+1 ] * .@item_req_ratio) ) {
    			mes "You Require [^ff0000"+countitem( .item_req[.@i] )+" / "+ (.item_req[ .@i+1 ] * .@item_req_ratio) +"^000000] ^112FD9"+getitemname( .item_req[.@i] )+"^000000";
    			.@error = 1;
    		}else{
    			mes "You Require [^00ff00"+countitem( .item_req[.@i] )+" / "+ (.item_req[ .@i+1 ] * .@item_req_ratio) +"^000000] ^112FD9"+getitemname( .item_req[.@i] )+"^000000";
    		}
    	}
    	if (.@error && !getarg(1,0)){close;}
    	
    	return;
    }

    change the both script function that calculate and display then delete the required items.

  11. OnPCLoginEvent:
    	if (#GetCashFree) {
    		dispbottom "You gained 100,000 cashpoint!!! Enjoy!";
    		#CASHPOINTS += 100000;
    		#GetCashFree = 1;
    	}
    	end;

    A permanent global account variable stored by the login server is more than enough, unless ur server support multiple different char-server

  12. if you're running NPC script, use this instead

    *successrefitem <equipment slot>{,<count>{,<char_id>}};
    
    This command will refine an item in the specified equipment slot of the invoking
    character by +1, or a count if given. For a list of equipment slots see 'getequipid'.
    This command will also display a 'refine success' effect on the character and put
    appropriate messages into their chat window. It will also give the character fame
    points if a weapon reached +10 this way, even though these will only take effect for
    blacksmith who will later forge a weapon.
    if (getrefine() >= 6) 
    	successrefitem EQI_ARMOR, 1;

     

  13. On 4/5/2022 at 7:13 AM, Redao said:

    he ghostring monster from pay_fild04, is there any way I can block the DROP of his card "only on this MAP?"

    1.

    instead of removing it, why not just remove the other ghostring from other map ? spawn a clone of ghosting using new mob_id (or existing event mob) that has no item drops.

    2.

    But of course, you could also remove this from payon map, then spawn it using NPC script that run an event label to simulate the item drops if you willing to sacrifice some processing power and do calculation for item drop penalty or bubble gum bonus.

     

    On 4/5/2022 at 7:13 AM, Redao said:

    Is there a way to block the Drop of a certain card in the Endless Tower?

    For example: Blocking the Boss Scene Card drop on the Endless Tower map.

    read point 2 above, by default all instance monster are spawned by NPC script, they run event label when died.

×
×
  • Create New...