Jump to content

RagEmp

Members
  • Posts

    10
  • Joined

Posts posted by RagEmp

  1. 7 hours ago, Sergardo said:

    Request after kiling naght siger or  finish Endless tower give prize  "id)

    Look for this:

    OnTimer10500:
    	set .@map$, instance_mapname("6@tower");
    	mapannounce .@map$,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";
    	stopnpctimer;
    	monster .@map$,156,147,"Nacht Sieger",1956,1,instance_npcname("#4th Beeper")+"::OnMyMobDead";
    	end;
    
    OnMyMobDead:
    	// You can add 'getitem 501, 100;'  or something here..
    	donpcevent instance_npcname("Lost Soul#102")+"::OnEnable";
    	end;

    Assuming you only want to give item to the one who killed.

    If you want to give to each party member, just run a loop to distribute the item instead..

    	getpartymember getcharid(1), 2;
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    		attachrid $@partymemberaid[.@i];
    		getitem 501, 100; 
    		detachrid;
    	}

     

  2. 4 minutes ago, Desryuu said:

    Hey @Emistry! It works like a charm! Thanks a lot!

    Thanks to you too @RagEmp

    Just a final request: how can I condition/limit the number of different items drop in the list? If I include 3 possible different items, I would like to set it manually to 2 (1 to 2).

    Thanks!!

     

    Change these:

    	.item_id_size = getarraysize(.item_id);
    
    ----------------------------------------------------------
    
    	.@t = rand(.item_id_size);
    	callfunc "F_ShuffleNumbers", 0, .@t, .@id;
    	for ( .@i = 0; .@i < .@t; .@i++ )

    To these:

    	.item_id_size = 1; // To how ever much you want to put
    
    ----------------------------------------------------------
    
    	//.@t = rand(.item_id_size);
    	callfunc "F_ShuffleNumbers", 0, .@t, .@id;
    	for ( .@i = 0; .@i < .item_id_size; .@i++ )

     

  3. // -- This function was originally from Annieruru
    function	script	F_ShuffleNumbers	{
    	deletearray getarg(2);
    	.@static = getarg(0);
    	.@range = getarg(1) +1 - .@static;
    	.@count = getarg(3, .@range);
    	if (.@range <= 0 || .@count <= 0)
    		return 0;
    	if (.@count > .@range)
    		.@count = .@range;
    	for (.@i = 0; .@i < .@range; ++.@i)
    		.@temparray[.@i] = .@i;
    	for (.@i = 0; .@i < .@count; ++.@i) {
    		.@rand = rand(.@range);
    		set getelementofarray( getarg(2), .@i ), .@temparray[.@rand] + .@static;
    		.@temparray[.@rand] = .@temparray[--.@range];
    	}
    	return .@count;
    }
    
    -	script	Dropped	-1,{
    OnInit:
    	setarray .item_id, 501, 645, 533; // Possible items to receive (ID, amount)
    	setarray .item_qty, 25, 5, 30;
    	monster "jupe_ele",0,0,"--ja--",1004,1,strnpcinfo(0)+"::OnDropping";
    	end;
    
    OnDropping:
    	getmapxy(@map$, @x, @y, BL_PC);
    	.@t = rand(getarraysize(.item_id));
    	callfunc "F_ShuffleNumbers", 0, .@t, .@id;
    	callfunc "F_ShuffleNumbers", 0, .@t, .@qt;
    	for ( .@i = 0; .@i < .@t; .@i++ )
    		makeitem .item_id[.@id[.@i]], .item_qty[.@qt[.@i]], @map$, @x, @y;
    	monster "jupe_ele",0,0,"--ja--",1004,1,strnpcinfo(0)+"::OnDropping";
    	end;  
    }

     

    I was using annieruru's number shuffler function because it is reliable (at least for me)

  4. On 10/23/2022 at 11:58 PM, ekowsd said:

    How can I remove the B.S.S partner position restriction and decrease the number of acolytes from 2 to 1? I want it to behave like the Bard/Dancer ensemble songs.

    skill.cpp


    Not really sure/tried but you can try to change 2 = 1.

    	if (skill_id == PR_BENEDICTIO) {
    		if (*c >= 2) // Check for two companions for Benedictio. [Skotlex]
    			return 0;
    	

     

  5. just replicate the codes bonus given by Field Manuals [SC_EXPBOOST] and rename to a unique one. Use notepad++ and find in Files > input  SC_EXPBOOST > Find all.

     

    Do the same for job exp and/or item drop rate bonus

     

    (optional) It may need some client modifications  as well to make it show as a status effect icon.

  6. 7 hours ago, GM Winter said:

    hello i would like to ask is there any script how to disable body relocation in an npc coordinates  or npc location so that they cant cover the npc thanks in advance


    Go to skill.cpp and do this:
     

    	case MO_BODYRELOCATION:
    +		if ( map_count_oncell(src->m,x,y,BL_NPC,0) ) {
    +			clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    +			return 0;
    +		}
    		if (unit_movepos(src, x, y, 2, 1)) {
    #if PACKETVER >= 20111005
    			clif_snap(src, src->x, src->y);

     

    Dont forget to recompile

    • Upvote 2
×
×
  • Create New...