Jump to content

  •  

Alayne

Member Since 26 Jun 2014
Offline Last Active Jun 01 2017 06:23 AM
-----

Topics I've Started

Issue with battleground warping

04 March 2017 - 06:53 PM

Hi peoples,

 

I have serious issue with custom battleground addons.

Even the base mechs doesn't work, as I can't get players to be warped to fighting zone as awaited.

 

Here's the associated code:

 

bat_room,120,157,4	script	Registration::Fl2R_Croixs	414,{
	end;
OnInit:
	waitingroom "Team Croix",5,"Flavius_BG2_Custom::OnCroixJoin",1;
	end;
OnEnterBG:
	if($@FlaviusBG2 == 0) {
		set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",10,290,"Flavius_BG2_Custom::OnCroixQuit","");
		bg_warp $@FlaviusBG2_id2,"bat_b02",10,290;
		//debugmes "C: " + $@FlaviusBG2_id2;
		//sleep 10000;
		end;
	}
	if($@FlaviusBG2 == 1) {
		debugmes "single join";
		waitingroom2bg_single($@FlaviusBG2_id2,"bat_b02",10,290,"");
		warp "bat_b02",10,290;
	}	
	end;
}

for both registration npcs,

 


OnReadyCheck:
	set .@Guillaume, getwaitingroomstate(0,"Fl2R_Guillaumes");
	set .@Croix, getwaitingroomstate(0,"Fl2R_Croixs");
	set .@currentGuillaumePlayer, bg_get_data($@FlaviusBG2_id1, 0);
	set .@currentCroixPlayer, bg_get_data($@FlaviusBG2_id2, 0);
	//debugmes "G: " + (.@Guillaume + .@currentGuillaumePlayer) + ", C: " + (.@Croix + .@currentCroixPlayer);
	if($@FlaviusBG2 == 0) {
		if( .@Guillaume + .@currentGuillaumePlayer < .BGMinPlayer || .@Croix + .@currentCroixPlayer < .BGMinPlayer ) {
			mapannounce "prontera","Battleground G: " + .@Guillaume + ", C: " + .@Croix,1,0x808000;
			end;
		} else {
			donpcevent "Fl2R_Guillaumes::OnEnterBG";
			donpcevent "Fl2R_Croixs::OnEnterBG";
		}
	}
	if($@FlaviusBG2 == 1) {
		debugmes "join";
		donpcevent "Fl2R_Guillaumes::OnEnterBG";
		donpcevent "Fl2R_Croixs::OnEnterBG";
		goto OnUpdateScoreBoard;
	}

and the starting bg part.

I got all the debugmes as they should be, but nothing works, players aren't warped.

 

Right there there should be two different warps: starting ones (2 players, one in each waitingroom), and a second one for anybody joining once the match is started (with the waitingroom2bg_single).

 

Can anybody give me a hint on what I'm missing?


Programatically trigger a specific npc event

09 February 2017 - 10:06 AM

Hi peoples,

 

I'd like to programatically trigger a specific event of a specific npc.

I'm really newb to code sourcing, so if anybody can tell me how to do that, I'd be greatly thankfull ^^

 

Here's the name of the npc and event to call:

 

alapcusk for the npc unique name, and OnEventTriggered for the event!

 

I guess it should be something like "npc->event(sd, "alapcusk::OnEventTriggered", 0)", but it didn't worked...

 

Thanks!


Custom skill add

08 February 2017 - 07:10 AM

Hi peoples,

 

I'm currently trying to add custom skills, but encounter an issue I don't quite understand.

 

I've added 6 skills, from id 1301 to 1306. I did have an error, saying that the id were doubled (while I can't find a clue of where to find them, as they were not used in skill_db.conf).

 

I've try to take the last entered in this file (10014, skill GD_DEVELOPMENT), and started at 11000 (to let enough space for future adding), the id isn't recognized at all (id 0 when starting map server).

 

Finally, while reading the guide again, I used the id 8443, which worked for first skill, but 8444 to 8448 for following ones failed with the same error, id allready in use.

 

Can anybody enlight me? Which id am I supposed to use? Can't give a try to each id between 1300 and 11000...


Trouble understanding hooking skill methods

04 February 2017 - 11:03 AM

Hi everybody.

 

I'm currently trying to write a hooking plugin enabling to hook skill use from players.

I've hooked (pre) the castend_pos2 and castend_nodamage method, which I've confirmed to be the two I need for my use.

 

If I use those initial methods to display the infos I need (id, x and y pos), the infos displayed are okay.

But on the other hand, if use my hooked ones, the castend_nodamage doesn't display the good coordinates.

 

On top of that, I'd like to add a check for players only, to prevent raise from mob skills.

But this doesn't work either, I don't get any output of the infos anymore, meaning my check isn't good, but I don't know why.

 

Can anybody help me?

 

Here's my code:

 


int skill_castend_nodamage_id_pre(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag)
{
	//ShowInfo( "hook castend nodamage %i/%i", src->type, BL_PC );
	//	TBL_PC *sd = BL_CAST(BL_PC, src);
	//if ( src->type == BL_PC || sd ) {
		ShowInfo(" hook castend nodamage id %i: %i / %i", *skill_id, bl->x, bl->y);
		ShowInfo(" hook castend nodamage id %i: %i / %i", *skill_id, src->x, src->y);
	//}
	return 0;
}

/* run when server starts */
HPExport void plugin_init (void) {
	//init hook
	ShowInfo("[%s] I'm being run from the '%s' filename\n", SERVER_NAME);
	addHookPre( skill, castend_pos2, skill_castend_pos2_pre);
	addHookPre( skill, castend_nodamage_id, skill_castend_nodamage_id_pre);
}

Just to explain, the "sd" was used just in case, as the type must be okay. But as it doesn't, I've used to double check. Doesn't work either...I always get a "hook castend nodamage id 2006: 0 / -10368" (notice that the y may change, but I've never seen anything over than 0 for the x).

 

Thanks for any help you'd be able to give me!


Another way of playing RO

06 December 2016 - 07:23 AM

Hi guys,

 

I'd like to have some opinion before starting to work on something.

It's been a long time I didn't work on a server RO, cause I think the game itself start to be a bit...oldish.

Therefor, I'd like to offer RO universe, without the RO drawbacks we all know for years. And I'd like to have your opinion: is it possible for this idea to be followed by some?

 

So here's the main ideas:

-No class (only one, Gangsi or Dark collector as they don't have skills)

-Skills bound to weapon (skill list depending on the weapon type and level, skills levels depending on weapon refine rate)

-No Mvp, except in main line

-Increased crafting possibilities, to fill the lack of mvp lootings

-Limited lifes (10, with a specific system to regain one).

 

It'll probably be paired with a progressive system, allowing players to access to area after defeating a Mvp in the main line.

 

Any opinion? I'd like not to work for nothing ^^'