Code: Select all
use os;
use uo;
use unicode;
program textcommand(who, text, uc_text)
var last_time := GetObjProperty(who,"_last_message_time");
if((polcore().systime - last_time) < 15)
SendSysMessage(who,"You must wait 15 seconds...");
return 0;
endif
SetObjProperty(who,"_last_message_time",polcore().systime);
BroadCastUC(UC(who.name) + UC(": ") + uc_text, "RUS",0, 66 );
sleep(30);
endprogram
function UC(strs)
var result := array {};
if (TypeOf(strs) != "Array")
result := CAscZ(CStr(strs));
else
foreach str in (strs)
if (TypeOf(str) != "Array")
str := CAscZ(CStr(str));
endif
result := result + str; // POL 2003-06-19 or later required for this operation
foreach elem in (str)
result.append(elem);
endforeach
//
endforeach
endif
return result;
endfunction Thx, have a nice day.