/**
* block (<type> {, <duration> }) -> Blocks everything except talking. [Masao]
* <type> : 0 = disabled, 1 = enabled.
* <duration> : Duration in milliseconds.
**/
BUILDIN_FUNC(block) {
unsigned int type = 0, duration = 0;
TBL_PC *sd;
if( (sd = script_rid2sd(st)) == NULL )
return 0;
if( script_hasdata(st,2) )
{
type = script_getnum(st,2);
if( type > 1 )
{
ShowError("buildin_showdigit: Invalid type!");
return 1;
}
}
if( script_hasdata(st,3) )
duration = 1000 * script_getnum(st,3);
switch(type){
case 1: ; // Block usage of skills, items and walking.
default: ; // Enables usage of skills, items and walking.
}
return 0;
}