Exemplo n.º 1
0
bool call_script( const ScriptDef& script, 
                  BObjectImp* param0 )
{
    try
    {
        BObject ob(run_script_to_completion(script,param0));
        return ob.isTrue();
    }
    catch(std::exception&)//...
    {
        return false;
    }
}
Exemplo n.º 2
0
	bool JusticeRegion::RunLeaveScript( Mobile::Character* chr )
	{
	  if ( leave_script_.empty() )
		return false;

	  ScriptDef sd;
	  if ( !sd.config_nodie( leave_script_, 0, 0 ) )
		return false;
	  if ( !sd.exists() )
		return false;

      Bscript::BObjectImp* res = run_script_to_completion( sd, new Module::ECharacterRefObjImp( chr ), new Bscript::String( region_name_ ) );
	  return res->isTrue();
	}