Issue Information
-
#006894
-
0 - None Assigned
-
Fixed
Issue Confirmations
-
Yes (0)No (0)
0
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:
Source Code (script.c):
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
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
You could pass it 0 for the RID and it will use the currently attached RID.
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!
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!
Fixed in [rev=16963], thanks!