Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #006894

  • 0 - None Assigned

  • Fixed

Issue Confirmations

  • Yes (0)No (0)
Photo

Wrong description for script function pcblockmove(<id>,<flag>);

Posted by Hercules Bot on 13 November 2012 - 05:19 PM

Originally posted by _Okuz_
Hello,

I'm here to report some issues related to this command.

script_commands.txt:

*pcblockmove <id>,<option>;

Prevents the given ID from moving when the option != 0, 0 enables the ID to move again.
ID should be able to be GID of a monster/NPC or AID from a character.

Examples:

//prevents the current char from moving away;
pcblockmove getcharid(3),1;

//enables the current char to move again.
pcblockmove getcharid(3),0;


Source Code (script.c):

BUILDIN_FUNC(pcblockmove)
{
	int id, flag;
	TBL_PC *sd = NULL;

	id = script_getnum(st,2);
	flag = script_getnum(st,3);

	if (id)
		sd = map_id2sd(id);
	else
		sd = script_rid2sd(st);

	if (sd)
		sd->state.blockedmove = flag > 0;

	return 0;
}

BUILDIN_DEF(pcblockmove,"ii"),

According to source code, ID is not really necessary because it'll use player's RID instead of ID if ID was not found. But, WTF? The BUILDIN_DEF says that I must put ID.. So, something is wrong here.. And besides that, I'm not sure if it'll block Monsters and NPCs because sd is a pointer to TBL_PC.

Anyways, can someone take a look please?

Thanks.

PS: I'm sorry about my grammar haha

Originally posted by Brian
pcblockmove 0, <flag>;

You could pass it 0 for the RID and it will use the currently attached RID.

Originally posted by _Okuz_
Well, I'm just suggesting you to change the description in script_commands.txt to something like: ID can be AID from a character or 0 for current RID. I just noticed that some commands in script_commands.txt sometimes have lack of information or wrong information, so I decided to help you guys by reporting what I think is wrong.

Thanks!

Edited by _Okuz_, 13 November 2012 - 08:56 PM.


Originally posted by Akkarin

Updating status to: Started




Originally posted by Euphy
Fixed in [rev=16963], thanks!