Jump to content

Reborn

Members
  • Posts

    290
  • Joined

  • Last visited

Posts posted by Reborn

  1. is there a way that there will only be one player is allowed to transact or talk to the NPC? If there is already transacting a conversation to the npc other player wont be able to talk to the NPC unless the current player is done with the transaction or if the player cancel the transaction to the NPC then by then the other player will be able to transact to the NPC but one at a time only. If this is possible can anyone share the code?

    I have already tried the getattachedrid and playerattached but this 2 doesnt work. other player still able to transact to the NPC even though there is already doing a transaction to the NPC.

  2. Would it be possible to attack a specific monster if the player is has a specific item in his inventory?

    For example:

    A player can only attack a poring if the player has an item stone in his/her inventory.

    Thanks

  3. Is there a way to modify it directly at src map/skill.cpp. because this 3x3 cell will only trigger if there the player is wearing a special item and if the player is not wearing this item the heal effect will work as the original.

  4. Hi guys. I just wanted to know, how can I make the regular heal to be an aoe heal by 3x3?

    For example if I use a skill to my party member or guild member the heal and the effect will be spread by 3x3 cell from the target member of the guild or party. and if someone uses the heal to a non member of the party or guild the effect of the heal will be the same as the normal heal...

    I know this is something that needs to be modified in src/map/skill.cpp and I really dont know how to make it aoe.

    I tried to use this code and its not working. 

    map_foreachinrange(skill_area_sub, bl, skill_get_splash(skill_id, skill_lv) * 3, BL_CHAR, src, skill_id, skill_lv, tick, flag | BCT_PARTY | BCT_SAMEGUILD | 1, skill_castend_nodamage_id);

    the compilation is successful but when I tried it the server is shutting down without giving me any error.

    I hope someone can help me.

    thank in advance.

  5. BCT_ALLY is for party and guild right so meaning you wont be able to use this skill to a target player if that player is not member of your party or guild. Is there a way to make it work for every target player? whether they are not you party or guild mate?

    and also one more thing. the effect should also affect those within the 3x3 cell of the target player.

  6. Can anyone help me modifying the Assumptio Skill?
    Current Assumptio Skill can only be casted to 1 player at a time but can it be possible to cast it to a player then the effect will spread by 3x3 cell from the target?
    I think it is a src code that you need to do. Please help me I tried to modify the skill code from map/skill.c

    I tried to modify this line 6793

    int splash = skill_get_splash(skill_id, skill_lv);
    map_foreachinallrange(skill_area_sub, bl, splash, splash_target(src), src, skill_id, skill_lv, tick, flag | 1, skill_castend_nodamage_id);
    clif_skill_nodamage(src, bl, skill_id, skill_lv, sc_start(src, bl, type, 100, skill_lv, skill_get_time(skill_id, skill_lv)));

    This one is working fine and I am not getting any error or the client is not crushing however the issue is the effect is same as the old one. It can be casted to 1 player only and the effect is not spreading by 3x3 cell.
    I know I have a mistake here but I dont know how to fix it and make it the way I needed it to be.

    Please help me ?

  7. @Patskie I dont have a map named ay_fild04.rsw because I am using an existing map pay_fild04.rsw. its an instance so basically it should create a copy map from an existing map right

    [UPDATE]

    This is not just happening to some existing map but this also happens to all new maps that I have.

    When I tried a repository prior on changing the instance_db.txt to instance_db.yml everything works fine.

    Now that its in yml file, am I missing some steps that's why its not working on my end?

  8. I am having a problem with the instance especially for maps.

    I tried to use the instancing.txt inside the Doc folder and its working fine, but when I changed the instance map  "abyss_03" to a different map like "pay_fild04" I am getting a client error.
    PS: When I change the mapname inside the script into "pay_fild04" I also changed the mapname in instance_db.yml

    Script:

    prontera,151,190,6	script	Sample Instance	101,{
    	.@instance$ = "Abyss Lake Instance";
    
    	if (instance_live_info(ILI_NAME, instance_id(IM_PARTY)) == .@instance$) {
    		mes "[Sample Instance]";
    		mes "You are already part of an instance.";
    		next;
    		switch(select("Enter Instance.:Cancel.")) {
    		case 1:
    			break;
    		case 2:
    			mes "[Sample Instance]";
    			mes "You don't want to try again?";
    			emotion ET_CRY;
    			close;
    		}
    	}
    	else if (instance_id(IM_PARTY)) {
    		mes "[Sample Instance]";
    		mes "You are part of the instance " + instance_live_info(ILI_NAME, instance_id(IM_PARTY)) + ".";
    		close;
    	}
    	else {
    		mes "[Sample Instance]";
    		mes "Would you like to try the sample instance in Abyss Lake 3?";
    		next;
    		switch(select("Create Instance.:Cancel.")) {
    		case 1:
    			.@create = instance_create(.@instance$);
    			if (.@create < 0) {
    				mes "[Sample Instance]";
    				switch (.@create) {
    					case -1: mes "ERROR: Invalid type."; break;
    					case -2: mes "ERROR: Party not found."; break;
    					case -3: mes "ERROR: Instance already exists."; break;
    					case -4: mes "ERROR: No free instances."; break;
    				}
    				mes " ";
    				mes "Instance creation ^FF0000failed^000000.";
    				emotion ET_HUK;
    				close;
    			}
    			mes "[Sample Instance]";
    			mes "Instance created.";
    			mes " ";
    			mes "Now entering the instance...";
    			next;
    			break;
    		case 2:
    			mes "[Sample Instance]";
    			mes "Okay. Maybe next time!";
    			close;
    		}
    	}
    	.@enter = instance_enter(.@instance$);
    	if (.@enter != 0) {
    		mes "[Sample Instance]";
    		switch (.@enter) {
    			case 1: mes "ERROR: Party not found."; break;
    			case 2: mes "ERROR: Party does not have an instance."; break;
    			case 3: mes "ERROR: Unknown error."; break;
    		}
    		mes " ";
    		mes "Instance entry ^FF0000failed^000000.";
    		emotion ET_HUK;
    		close;
    	}
    	close;
    }
    
    // Instance Scripts
    //============================================================
    pay_fild04,131,207,3	script	Instance NPC#start	101,{
    	mes "[Instance NPC]";
    	mes "Are you ready to begin?";
    	next;
    	switch(select("Yes.:No.")) {
    	case 1:
    		mes "[Instance NPC]";
    		mes "Good luck.";
    		close2;
    		donpcevent instance_npcname("#ins_abyss03_mobs")+"::OnEnable";
    		delwaitingroom;
    		disablenpc instance_npcname(strnpcinfo(0));
    		end;
    	case 2:
    		mes "[Instance NPC]";
    		mes "Take your time.";
    		close;
    	}
    	end;
    
    	OnInit:
    		disablenpc strnpcinfo(0);
    	end;
    	OnInstanceInit:
    		waitingroom "Click here to start!",0;
    	end;
    }
    
    pay_fild04,0,0,0	script	#ins_abyss03_mobs	-1,{
    	end;
    	OnEnable:
    		initnpctimer;
    	end;
    	OnTimer1000:
    		mapannounce strnpcinfo(4),"Instance NPC: The Abyss Lake instance has begun.",bc_all;
    	end;
    	OnTimer4000:
    		mapannounce strnpcinfo(4),"Instance NPC: Smash the Treasure Chest in the center of the map for a prize.",bc_all;
    	end;
    	OnTimer5000:
    		stopnpctimer;
    		.@map$        = instance_mapname("pay_fild04");
    		.@label$      = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
    		.@label_boss$ = instance_npcname(strnpcinfo(0))+"::OnMyBossDead";
    		monster .@map$,0,0,"Huge Poring",1002,20,.@label$,2;
    		monster .@map$,0,0,"Huge Drops",1113,15,.@label$,2;
    		monster .@map$,0,0,"Huge Poporing",1031,10,.@label$,2;
    		monster .@map$,0,0,"Huge Marin",1242,10,.@label$,2;
    		monster .@map$,0,0,"Tiny Zombie",1015,30,.@label$,1;
    		monster .@map$,0,0,"Huge Mime Monkey",1585,2,.@label$,2;
    		monster .@map$,97,102,"Treasure Chest",1732,1,.@label_boss$,2;
    	end;
    	OnMyMobDead:
    		dispbottom "What am I doing? I should be attacking the Treasure Chest!";
    		viewpoint 0,97,102,0,0xFF0000;
    		switch (rand(6)) {
    			case 0: sc_start SC_STONE,5000,0; break;
    			case 1: sc_start SC_FREEZE,5000,0; break;
    			case 2: sc_start SC_STUN,5000,0; break;
    			case 3: sc_start SC_SLEEP,5000,0; break;
    			case 4: sc_start SC_CONFUSION,5000,0; break;
    			case 5: sc_start SC_BLIND,5000,0; break;
    		}
    	end;
    	OnMyBossDead:
    		specialeffect2 EF_MVP;
    		getitem 512,1;
    		.@map$   = instance_mapname("pay_fild04");
    		.@label$ = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
    		killmonster .@map$,.@label$;
    		mapannounce .@map$,"Instance NPC: Good work! Please speak to me as soon as possible.",bc_all;
    		donpcevent instance_npcname("Instance NPC#finish")+"::OnEnable";
    	end;
    }
    
    pay_fild04,246,197,4	script	Instance NPC#finish	101,{
    	mes "[Instance NPC]";
    	mes "Congratulations! You've finished the instance.";
    	mes "I'll send you back to town now.";
    	emotion ET_BEST;
    	close2;
    	warp "prontera",156,191;
    	instance_destroy();
    	end;
    
    	OnInit:
    		disablenpc strnpcinfo(0);
    	end;
    	OnInstanceInit:
    		disablenpc instance_npcname(strnpcinfo(0));
    	end;
    	OnEnable:
    		enablenpc instance_npcname(strnpcinfo(0));
    		specialeffect EF_HIDING;
    	end;
    }

    instance_db.yml

    Header:
      Type: INSTANCE_DB
      Version: 1
    
    Body:
      - Id: 100
        Name: Abyss Lake Instance
        TimeLimit: 3600
        IdleTimeOut: 0
        Enter:
          Map: pay_fild04
          X: 130
          Y: 200

    After the NPC warped me to the map I am getting this client error message

     Untitled1.thumb.png.fed4368140d4366fc445b1e243e12f95.png

    Untitled2.thumb.png.8a8f59ce6fb17ddbf29fdedb72761f0f.png

    And then the client will close.

    Am I missing something here? What I am thinking is there might something that I need to compile within yml? Im not sure. Please help me out.

  9. 14 minutes ago, sader1992 said:

    without src edit and creating a custom event for each time like on attack event (I don't recommend that ) You can't do Exactly what you are thinking of

    however you can create a while loop that check all the GIDs of the mobs that you want to check (ofc don't forget the sleep in the while loop)

    I would say once every 250~500 is good , just make sure that your scripts in the while loop cover all the exceptions like (unitexists <GID>;) 

    Ill try this one. Ill update you what happen

  10. 14 minutes ago, sader1992 said:
    
    *getunitdata <GID>,<arrayname>;
      UMOB_TARGETID

     

    @sader1992 But this one should be run by a script right and it will function only each time the player touches the npc.

    The Monster 1 should have a target so that the monster 2 will be vulnerable because as soon as the Monster 1 become idle or not attacking a player, the Monster will be taking 1 damage only.

  11. Hello guys. I am creating a selection scripts and I would like to know how to remove duplicate results from the list.

    prontera,154,150,5	script	SampleTest	123,{
    	
    	.@bonus0 = 1;	// Reflect 10% Short-Range Damage
    	.@bonus1 = 3;	// Reduce 10% Aftercast Delay
    	.@bonus2 = 0;
    	.@bonus3 = 0;
    
    	setarray .@ItemBonus$[0],
    		"Reflect 10% Short-Range Damage",1100000,7561,690,1063,730,
    		"8 Mdef",1500000,7118,275,7162,700,
    		"Reduce 10% Aftercast Delay",1700000,7567,500,1036,800,
    		"Full HP/SP on Resurrection",2000000,951,730,7149,750,
    		"10% Damage more with Shield Chain",2000000,7194,580,7215,890,
    		"10% Increase Healing Power",1400000,6032,400,1096,790,
    		"Uninterruptable Cast",1400000,7125,400,7263,480,
    		"Increase Holy and Grand Cross Damage by 20%",2000000,7223,300,7215,900,
    		"Indestructible",1400000,6023,380,7197,800;
    
    	mes "Sample";
    
    	for (.@i=0; .@i<getarraysize(.@ItemBonus$); .@i=.@i+6){
    		for (.@k=0; .@k<4; .@k++){
    			if (getd(".@bonus"+ .@k)){
    				if (.@ItemBonus$[(getd(".@bonus"+ .@k)-1)*6] != .@ItemBonus$[.@i]){
    					if (getd(".@dup"+ (.@i/6) +"$") != .@ItemBonus$[.@i]){
    						mes "~ "+ .@ItemBonus$[.@i];
    					}
    				}
    				setd(".@dup"+ (.@i/6) +"$", .@ItemBonus$[.@i]);
    			}
    		}
    	}
    
    	close;
    }

    If I run this script the bonus 1 will be remove from the list but when the selection continue the bonus 2 is still showing up from the list. Its like to bonus 2 onwards is not being recognize by this script. I want the bonus 1 and 2 not appear from the list.

    Its like removing the duplicate result.

     

    Thanks in advance.

×
×
  • Create New...