56 #include "../bscript/berror.h" 57 #include "../bscript/dict.h" 58 #include "../bscript/execmodl.h" 59 #include "../bscript/executor.h" 60 #include "../bscript/impstr.h" 61 #include "../bscript/objmembers.h" 62 #include "../bscript/objmethods.h" 63 #include "../clib/stlutil.h" 121 using namespace Bscript;
148 BObjectImp* result = obj_->get_script_member_id(
id );
149 if ( result !=
nullptr )
158 if ( objmember !=
nullptr )
159 return this->get_member_id( objmember->
id );
170 result = obj_->set_script_member_id(
id, lng->
value() );
175 result = obj_->set_script_member_id(
id, str->
value() );
180 result = obj_->set_script_member_id_double(
id, dbl->
value() );
182 if ( result !=
nullptr )
191 if ( objmember !=
nullptr )
192 return this->set_member_id( objmember->
id, value, copy );
201 if ( !obj_->orphan() )
210 BObjectImp* imp = obj_->script_method_id(
id, ex );
211 if ( imp !=
nullptr )
214 return base::call_method_id(
id, ex );
217 return new BError(
"That object no longer exists" );
225 if ( methodname[0] ==
'_' )
231 forcebuiltin =
false;
233 if ( objmethod !=
nullptr )
234 return this->call_method_id( objmethod->
id, ex, forcebuiltin );
237 BObjectImp* imp = obj_->custom_script_method( methodname, ex );
241 return base::call_method( methodname, ex );
247 return ( !obj_->orphan() && obj_->logged_in() );
262 return ( chrref_imp->
obj_->serial == obj_->serial );
285 return ( chrref_imp->
obj_->serial < obj_->serial );
297 return "OfflineMobileRef";
301 return OTOfflineMobileRef;
311 return ( !obj_->orphan() );
330 BObjectImp* result = obj_->get_script_member_id(
id );
331 if ( result !=
nullptr )
340 if ( objmember !=
nullptr )
341 return this->get_member_id( objmember->
id );
352 result = obj_->set_script_member_id(
id, lng->
value() );
357 result = obj_->set_script_member_id(
id, str->
value() );
362 result = obj_->set_script_member_id_double(
id, dbl->
value() );
364 if ( result !=
nullptr )
373 if ( objmember !=
nullptr )
374 return this->set_member_id( objmember->
id, value, copy );
381 if ( !obj_->orphan() )
390 BObjectImp* imp = obj_->script_method_id(
id, ex );
391 if ( imp !=
nullptr )
395 return base::call_method_id(
id, ex );
400 return new BError(
"That object no longer exists" );
407 if ( methodname[0] ==
'_' )
413 forcebuiltin =
false;
416 if ( objmethod !=
nullptr )
417 return this->call_method_id( objmethod->
id, ex, forcebuiltin );
425 return base::call_method( methodname, ex );
431 return ( !obj_->orphan() );
446 return ( itemref_imp->
obj_->serial == obj_->serial );
469 return ( itemref_imp->
obj_->serial < obj_->serial );
472 return ( &eitemrefobjimp_type < aob->object_type() );
494 BObjectImp* result = obj_->get_script_member_id(
id );
495 if ( result !=
nullptr )
504 if ( objmember !=
nullptr )
505 return this->get_member_id( objmember->
id );
516 result = obj_->set_script_member_id(
id, lng->
value() );
521 result = obj_->set_script_member_id(
id, str->
value() );
526 result = obj_->set_script_member_id_double(
id, dbl->
value() );
528 if ( result !=
nullptr )
537 if ( objmember !=
nullptr )
538 return this->set_member_id( objmember->
id, value, copy );
545 if ( !obj_->orphan() )
547 BObjectImp* imp = obj_->script_method_id(
id, ex );
548 if ( imp !=
nullptr )
551 return base::call_method_id(
id, ex );
554 return new BError(
"That object no longer exists" );
560 if ( objmethod !=
nullptr )
561 return this->call_method_id( objmethod->
id, ex );
563 return base::call_method( methodname, ex );
568 return ( !obj_->orphan() );
583 return ( boatref_imp->
obj_->serial == obj_->serial );
597 if ( methodname[0] ==
'_' )
603 forcebuiltin =
false;
606 if ( objmethod !=
nullptr )
607 return this->call_method_id( objmethod->
id, ex, forcebuiltin );
615 return base::call_method( methodname, ex );
633 if ( imp !=
nullptr )
636 return base::call_method_id(
id, ex, forcebuiltin );
640 return new BError(
"That object no longer exists" );
660 BObjectImp* result = obj_->get_script_member_id(
id );
661 if ( result !=
nullptr )
670 if ( objmember !=
nullptr )
671 return this->get_member_id( objmember->
id );
682 result = obj_->set_script_member_id(
id, lng->
value() );
687 result = obj_->set_script_member_id(
id, str->
value() );
692 result = obj_->set_script_member_id_double(
id, dbl->
value() );
694 if ( result !=
nullptr )
702 if ( objmember !=
nullptr )
703 return this->set_member_id( objmember->
id, value, copy );
710 return ( !obj_->orphan() );
725 return ( multiref_imp->
obj_->serial == obj_->serial );
739 using namespace Bscript;
748 return new BLong( x );
751 return new BLong( y );
754 return new BLong( z );
760 return new BLong( objtype_ );
763 return new BLong( graphic );
766 return new BLong( serial );
769 return new BLong( color );
772 return new BLong( height );
775 return new BLong( facing );
778 return new BLong( dirty() ? 1 : 0 );
781 return new BLong( weight() );
784 if ( realm !=
nullptr )
787 if (
nullptr != ( multi = realm->find_supporting_multi( x, y, z ) ) )
790 return new BLong( 0 );
793 return new BLong( 0 );
796 if ( realm !=
nullptr )
797 return new String( realm->name() );
799 return new BError(
"object does not belong to a realm." );
802 return new BLong( specific_name() );
811 if ( objmember !=
nullptr )
812 return this->get_script_member_id( objmember->
id );
826 if ( ismobile() && ( value.empty() || isspace( value[0] ) ) )
827 return new BError(
"mobile.name must not be empty, and must not begin with a space" );
839 if ( objmember !=
nullptr )
840 return this->set_script_member_id( objmember->
id, value );
854 setgraphic( static_cast<unsigned short>( value ) );
855 return new BLong( graphic );
858 bool res = setcolor( static_cast<unsigned short>( value ) );
862 return new BLong( color );
872 if ( objmember !=
nullptr )
873 return this->set_script_member_id( objmember->
id, value );
887 if ( objmember !=
nullptr )
888 return this->set_script_member_id_double( objmember->
id, value );
896 using namespace Bscript;
900 BObjectImp* imp = base::get_script_member_id(
id );
901 if ( imp !=
nullptr )
907 return new BLong( amount_ );
910 return new BLong( layer );
913 return new BLong( tile_layer );
916 if ( container !=
nullptr )
917 return container->make_ref();
919 return new BLong( 0 );
922 return new String( on_use_script_ );
925 return new String( equip_script_ );
928 return new String( unequip_script_ );
931 return new String( description() );
934 return new BLong( movable() ? 1 : 0 );
937 return new BLong( invisible() ? 1 : 0 );
940 return new BLong( decayat_gameclock_ );
943 return new BLong( sellprice() );
946 return new BLong( buyprice() );
949 return new BLong( newbie() ? 1 : 0 );
952 return new BLong( insured() ? 1 : 0 );
955 return new BLong( item_count() );
958 return new BLong( stackable() ? 1 : 0 );
961 return new BLong( saveonexit() );
964 return new BLong( fire_resist().sum() );
967 return new BLong( cold_resist().sum() );
970 return new BLong( energy_resist().sum() );
973 return new BLong( poison_resist().sum() );
976 return new BLong( physical_resist().sum() );
979 return new BLong( fire_resist().mod );
982 return new BLong( cold_resist().mod );
985 return new BLong( energy_resist().mod );
988 return new BLong( poison_resist().mod );
991 return new BLong( physical_resist().mod );
994 return new BLong( fire_damage().sum() );
997 return new BLong( cold_damage().sum() );
1000 return new BLong( energy_damage().sum() );
1003 return new BLong( poison_damage().sum() );
1006 return new BLong( physical_damage().sum() );
1009 return new BLong( fire_damage().mod );
1012 return new BLong( cold_damage().mod );
1015 return new BLong( energy_damage().mod );
1018 return new BLong( poison_damage().mod );
1021 return new BLong( physical_damage().mod );
1024 if ( has_gotten_by() )
1027 return new BError(
"Gotten By nullptr" );
1038 return new BError(
"No script running" );
1043 const ItemDesc& itemdesc = this->itemdesc();
1048 return new Double( getQuality() );
1051 return new BLong( hp_ );
1054 return new BLong( maxhp_mod() );
1057 return new BLong( static_cast<int>( maxhp() * getQuality() ) );
1060 return new String( name_suffix() );
1063 if ( house() !=
nullptr )
1064 return house()->make_ref();
1065 return new BError(
"This is a not component of any house" );
1068 return new BLong( no_drop() );
1077 if ( objmember !=
nullptr )
1078 return this->get_script_member_id( objmember->
id );
1085 BObjectImp* imp = base::set_script_member_id(
id, value );
1086 if ( imp !=
nullptr )
1092 on_use_script_ = value;
1093 return new String( value );
1095 equip_script_ = value;
1096 return new String( value );
1098 unequip_script_ = value;
1099 return new String( value );
1104 name_suffix( value );
1105 return new String( value );
1115 if ( objmember !=
nullptr )
1116 return this->set_script_member_id( objmember->
id, value );
1123 BObjectImp* imp = base::set_script_member_id(
id, value );
1124 if ( imp !=
nullptr )
1130 restart_decay_timer();
1131 movable( value ?
true :
false );
1133 return new BLong( movable() );
1135 restart_decay_timer();
1136 invisible( value ?
true :
false );
1138 return new BLong( invisible() );
1140 decayat_gameclock_ = value;
1141 return new BLong( decayat_gameclock_ );
1144 return new BLong( value );
1147 return new BLong( value );
1149 restart_decay_timer();
1150 newbie( value ?
true :
false );
1152 return new BLong( newbie() );
1154 restart_decay_timer();
1155 insured( value ?
true :
false );
1157 return new BLong( insured() );
1159 setfacing( (
u8)value );
1160 return new BLong( facing );
1162 saveonexit( value ?
true :
false );
1163 return new BLong( saveonexit() );
1165 fire_resist( fire_resist().setAsMod( static_cast<short>( value ) ) );
1166 if ( container !=
nullptr )
1171 if ( chr !=
nullptr )
1175 return new BLong( fire_resist().mod );
1178 cold_resist( cold_resist().setAsMod( static_cast<short>( value ) ) );
1179 if ( container !=
nullptr )
1184 if ( chr !=
nullptr )
1188 return new BLong( cold_resist().mod );
1191 energy_resist( energy_resist().setAsMod( static_cast<short>( value ) ) );
1192 if ( container !=
nullptr )
1197 if ( chr !=
nullptr )
1201 return new BLong( energy_resist().mod );
1204 poison_resist( poison_resist().setAsMod( static_cast<short>( value ) ) );
1205 if ( container !=
nullptr )
1210 if ( chr !=
nullptr )
1214 return new BLong( poison_resist().mod );
1217 physical_resist( physical_resist().setAsMod( static_cast<short>( value ) ) );
1218 if ( container !=
nullptr )
1223 if ( chr !=
nullptr )
1227 return new BLong( physical_resist().mod );
1230 fire_damage( fire_damage().setAsMod( static_cast<short>( value ) ) );
1231 return new BLong( static_cast<short>( value ) );
1234 cold_damage( cold_damage().setAsMod( static_cast<short>( value ) ) );
1235 return new BLong( static_cast<short>( value ) );
1238 energy_damage( energy_damage().setAsMod( static_cast<short>( value ) ) );
1239 return new BLong( static_cast<short>( value ) );
1242 poison_damage( poison_damage().setAsMod( static_cast<short>( value ) ) );
1243 return new BLong( static_cast<short>( value ) );
1246 physical_damage( physical_damage().setAsMod( static_cast<short>( value ) ) );
1247 return new BLong( static_cast<short>( value ) );
1250 setQuality(
double( value ) );
1251 return new Double(
double( value ) );
1254 hp_ =
static_cast<unsigned short>( value );
1258 if ( container !=
nullptr )
1263 if ( chr !=
nullptr )
1268 return new BLong( hp_ );
1270 this->maxhp_mod( static_cast<s16>( value ) );
1273 if ( container !=
nullptr )
1278 if ( chr !=
nullptr )
1283 return new BLong( value );
1285 no_drop( value ?
true :
false );
1286 return new BLong( no_drop() );
1295 if ( objmember !=
nullptr )
1296 return this->set_script_member_id( objmember->
id, value );
1303 BObjectImp* imp = base::set_script_member_id_double(
id, value );
1304 if ( imp !=
nullptr )
1309 setQuality( value );
1310 return new Double( value );
1319 if ( objmember !=
nullptr )
1320 return this->set_script_member_id_double( objmember->
id, value );
1327 BObjectImp* imp = base::script_method_id(
id, ex );
1328 if ( imp !=
nullptr )
1335 unsigned short newx, newy;
1337 const String* realm_name;
1338 Item* new_stack(
nullptr );
1339 u16 item_amount = this->getamount();
1342 return new BError(
"Not enough parameters" );
1345 return new BError(
"Invalid parameter type" );
1347 return new BError(
"No amount specified to pull from existing stack" );
1348 else if ( amt > this->getamount() )
1349 return new BError(
"Amount must be less than or equal to the stack amount" );
1351 return new BError(
"Amount was less than 1" );
1352 else if ( this->inuse() )
1353 return new BError(
"Item is in use" );
1358 return new BError(
"Realm not found" );
1359 else if ( !newrealm->
valid( newx, newy, newz ) )
1360 return new BError(
"Invalid coordinates for realm" );
1363 if ( !this->stackable() && amt > 1 )
1367 for ( i = 1; i <= amt; i++ )
1369 if ( this->getamount() == 1 )
1370 new_stack = this->clone();
1372 new_stack = this->remove_part_of_stack( 1 );
1374 new_stack->
x = newx;
1375 new_stack->
y = newy;
1376 new_stack->
z =
static_cast<s8>( newz );
1377 new_stack->
realm = newrealm;
1379 move_item( new_stack, newx, newy, static_cast<signed char>( newz ), newrealm );
1383 if ( this->getamount() == 1 )
1387 if ( new_stack !=
nullptr )
1394 if ( amt == this->getamount() )
1395 new_stack = this->clone();
1397 new_stack = this->remove_part_of_stack( amt );
1399 new_stack->
x = newx;
1400 new_stack->
y = newy;
1401 new_stack->
z =
static_cast<s8>( newz );
1402 new_stack->
realm = newrealm;
1405 move_item( new_stack, newx, newy, static_cast<signed char>( newz ), newrealm );
1408 if ( amt == item_amount )
1423 return new BError(
"Not enough parameters" );
1425 return new BError(
"No container specified" );
1427 return new BError(
"No amount specified to pull from existing stack" );
1428 else if ( amt > this->getamount() )
1429 return new BError(
"Amount must be less than or equal to stack amount" );
1431 return new BError(
"Amount was less than 1" );
1432 else if ( this->inuse() )
1433 return new BError(
"Item is in use" );
1435 return new BError(
"Non-container selected as target" );
1441 Item* new_stack(
nullptr );
1442 u16 item_amount = this->getamount();
1444 if ( !this->stackable() && amt > 1 )
1446 for (
unsigned short i = 1; i <= amt; i++ )
1448 if ( this->getamount() == 1 )
1449 new_stack = this->clone();
1451 new_stack = this->remove_part_of_stack( 1 );
1458 if ( new_stack !=
this )
1459 this->add_to_self( new_stack );
1460 return new BError(
"Could not insert new stack into container" );
1469 if ( this->getamount() == 1 )
1473 if ( new_stack !=
nullptr )
1479 if ( amt == this->getamount() )
1480 new_stack = this->clone();
1482 new_stack = this->remove_part_of_stack( amt );
1484 auto create_new_stack = [&]() ->
BObjectImp* {
1490 if ( new_stack !=
this )
1491 this->add_to_self( new_stack );
1492 return new BError(
"Could not insert new stack into container" );
1500 if ( amt == item_amount )
1508 int add_to_existing_stack;
1510 ( ex.
getParam( 2, add_to_existing_stack ) && add_to_existing_stack != 0 ) )
1513 if ( existing_stack !=
nullptr && new_stack->
stackable() )
1519 if ( new_stack !=
this )
1520 this->add_to_self( new_stack );
1521 return new BError(
"Could not add to existing stack" );
1525 return create_new_stack();
1534 existing_stack, amount );
1536 if ( amt == item_amount )
1544 return create_new_stack();
1550 Item* cont =
nullptr;
1553 return new BError(
"Not enough params" );
1555 return new BError(
"No container specified" );
1556 else if ( this->inuse() )
1557 return new BError(
"Item is in use" );
1559 return new BError(
"Non-container selected as target" );
1565 if ( existing_stack !=
nullptr )
1580 if ( objmethod !=
nullptr )
1581 return this->script_method_id( objmethod->
id, ex );
1589 if (
id.method_script !=
nullptr )
1592 if (
id.method_script->FindExportedFunction(
1593 methodname, static_cast<unsigned int>( ex.
numParams() + 1 ), PC ) )
1594 return id.method_script->call( PC, make_ref(), ex.
fparams );
1602 return call_custom_method( methodname, noparams );
1608 if (
id.method_script !=
nullptr )
1611 if (
id.method_script->FindExportedFunction(
1612 methodname, static_cast<unsigned int>( pmore.size() + 1 ), PC ) )
1616 std::string message;
1617 message =
"Method script for objtype " +
id.objtype_description() +
1618 " does not export function " + std::string( methodname ) +
" taking " +
1625 return BObject(
new BError(
"No method script defined for " +
id.objtype_description() ) );
1635 using namespace Bscript;
1661 BObjectImp* imp = base::get_script_member_id(
id );
1662 if ( imp !=
nullptr )
1668 return new BLong( warmode() );
1671 return new BLong( gender );
1674 return new BLong( race );
1677 return new BLong( trueobjtype );
1680 return new BLong( truecolor );
1683 return new BLong( ar_mod() );
1686 return new BLong( delay_mod() );
1689 return new BLong( hidden() ? 1 : 0 );
1692 return new BLong( concealed() );
1695 return new BLong( frozen() ? 1 : 0 );
1698 return new BLong( paralyzed() ? 1 : 0 );
1701 return new BLong( poisoned() ? 1 : 0 );
1704 return new BLong( stealthsteps_ );
1707 return new BLong( mountedsteps_ );
1710 return new BLong( squelched() ? 1 : 0 );
1713 return new BLong( dead() );
1716 return new BLong( ar() );
1721 if ( bp !=
nullptr )
1724 return new BError(
"That has no backpack" );
1730 if ( trading_with !=
nullptr )
1733 return new BError(
"That has no active tradewindow" );
1737 if ( weapon !=
nullptr )
1738 return weapon->make_ref();
1740 return new BLong( 0 );
1743 if ( shield !=
nullptr )
1744 return shield->make_ref();
1746 return new BLong( 0 );
1749 if ( acct !=
nullptr )
1750 return new String( acct->name() );
1752 return new BError(
"Not attached to an account" );
1756 if ( acct !=
nullptr )
1759 return new BError(
"Not attached to an account" );
1762 return new BLong( cmdlevel() );
1768 return new BLong( is_criminal() ? 1 : 0 );
1771 return new BLong( is_temporally_criminal() ? 1 : 0 );
1774 if ( client !=
nullptr )
1775 return new String( client->ipaddrAsString() );
1780 return new BLong( gold_carried() );
1784 return new String( title_prefix() );
1787 return new String( title_suffix() );
1790 return new String( title_guild() );
1793 return new String( title_race() );
1796 return new String( uclang );
1799 return new BLong( guildid() );
1805 return new BError(
"Not a member of a guild" );
1809 return new BLong( is_murderer() ? 1 : 0 );
1812 if ( script_ex ==
nullptr )
1813 return new BError(
"No script attached." );
1818 if ( client !=
nullptr )
1819 return new String( client->getversion() );
1821 return new String(
"" );
1824 if ( client !=
nullptr )
1826 std::unique_ptr<BStruct> info(
new BStruct );
1828 info->addMember(
"major",
new BLong( version.
major ) );
1829 info->addMember(
"minor",
new BLong( version.
minor ) );
1830 info->addMember(
"rev",
new BLong( version.
rev ) );
1831 info->addMember(
"patch",
new BLong( version.
patch ) );
1832 return info.release();
1836 std::unique_ptr<BStruct> info(
new BStruct );
1837 info->addMember(
"major",
new BLong( 0 ) );
1838 info->addMember(
"minor",
new BLong( 0 ) );
1839 info->addMember(
"rev",
new BLong( 0 ) );
1840 info->addMember(
"patch",
new BLong( 0 ) );
1841 return info.release();
1846 if ( client !=
nullptr )
1847 return client->getclientinfo();
1849 return new BLong( 0 );
1853 return new BLong( created_at );
1857 return GetReportables();
1861 if ( opponent_ !=
nullptr )
1862 return opponent_->make_ref();
1864 return new BError(
"Mobile does not have any opponent selected." );
1867 return new BLong( connected() ? 1 : 0 );
1870 if ( trading_with !=
nullptr )
1871 return trading_with->make_ref();
1873 return new BError(
"Mobile is not currently trading with anyone." );
1876 return new BLong( client !=
nullptr ? client->ClientType : 0 );
1879 if ( client !=
nullptr )
1880 return new BLong( target_cursor_busy() ? 1 : 0 );
1882 return new BLong( 0 );
1885 if ( client !=
nullptr )
1886 return new BLong( has_active_gump() ? 1 : 0 );
1888 return new BLong( 0 );
1891 if ( client !=
nullptr )
1892 return new BLong( has_active_prompt() ? 1 : 0 );
1894 return new BLong( 0 );
1898 std::string mode =
"";
1907 return new String( mode );
1911 return new BLong( hitchance_mod() );
1914 return new BLong( evasionchance_mod() );
1917 return new BLong( carrying_capacity_mod() );
1920 return new BLong( carrying_capacity() );
1923 return new BLong( fire_resist().value );
1926 return new BLong( cold_resist().value );
1929 return new BLong( energy_resist().value );
1932 return new BLong( poison_resist().value );
1935 return new BLong( physical_resist().value );
1938 return new BLong( fire_resist().mod );
1941 return new BLong( cold_resist().mod );
1944 return new BLong( energy_resist().mod );
1947 return new BLong( poison_resist().mod );
1950 return new BLong( physical_resist().mod );
1953 return new BLong( skillstatcap().statcap );
1956 return new BLong( skillstatcap().skillcap );
1959 return new BLong( luck() );
1962 return new BLong( followers().followers_max );
1965 return new BLong( tithing() );
1968 return new BLong( followers().followers );
1971 return new BLong( fire_damage().value );
1974 return new BLong( cold_damage().value );
1977 return new BLong( energy_damage().value );
1980 return new BLong( poison_damage().value );
1983 return new BLong( physical_damage().value );
1986 return new BLong( fire_damage().mod );
1989 return new BLong( cold_damage().mod );
1992 return new BLong( energy_damage().mod );
1995 return new BLong( poison_damage().mod );
1998 return new BLong( physical_damage().mod );
2004 return new BError(
"Not a member of a party" );
2007 return new BLong( party_can_loot() );
2009 if ( has_candidate_of() )
2012 return new BError(
"Not a candidate of a party" );
2015 return new Double( movement_cost().walk );
2018 return new Double( movement_cost().
run );
2021 return new Double( movement_cost().walk_mounted );
2024 return new Double( movement_cost().run_mounted );
2028 return GetAggressorTo();
2031 return GetLawFullyDamaged();
2035 return new BLong( client !=
nullptr ? client->UOExpansionFlagClient : 0 );
2039 return new BLong( deafened() ? 1 : 0 );
2043 if ( ( client !=
nullptr ) && ( client->isConnected() ) )
2044 return client->make_ref();
2046 return new BError(
"No client attached." );
2049 return new BLong( is_house_editing() ? 1 : 0 );
2052 if ( client !=
nullptr )
2054 std::unique_ptr<BStruct> lastcoord(
new BStruct );
2055 lastcoord->addMember(
"lastx",
new BLong( lastx ) );
2056 lastcoord->addMember(
"lasty",
new BLong( lasty ) );
2057 lastcoord->addMember(
"lastz",
new BLong( lastz ) );
2058 return lastcoord.release();
2060 return new BError(
"No client attached." );
2062 return new BLong( skill_ex_active() );
2064 return new BLong( casting_spell() );
2066 return new BLong( last_textcolor() );
2075 if ( objmember !=
nullptr )
2076 return this->get_script_member_id( objmember->
id );
2083 BObjectImp* imp = base::set_script_member_id(
id, value );
2084 if ( imp !=
nullptr )
2091 title_prefix( value );
2092 ret =
new String( value );
2095 title_suffix( value );
2096 ret =
new String( value );
2099 title_guild( value );
2100 ret =
new String( value );
2103 title_race( value );
2104 ret =
new String( value );
2111 if ( this->has_active_client() )
2119 if ( objmember !=
nullptr )
2120 return this->set_script_member_id( objmember->
id, value );
2127 BObjectImp* imp = base::set_script_member_id(
id, value );
2128 if ( imp !=
nullptr )
2138 return new BLong( gender );
2149 return new BLong( race );
2151 return new BLong( trueobjtype = static_cast<unsigned int>( value ) );
2153 return new BLong( truecolor = static_cast<unsigned short>( value ) );
2155 ar_mod( static_cast<short>( value ) );
2157 return new BLong( ar_mod() );
2159 delay_mod( static_cast<short>( value ) );
2160 return new BLong( delay_mod() );
2164 hidden( value ?
true :
false );
2165 return new BLong( hidden() );
2168 concealed( static_cast<unsigned char>( value ) );
2169 return new BLong( concealed() );
2171 mob_flags_.change( MOB_FLAGS::FROZEN, value ?
true :
false );
2172 return new BLong( frozen() );
2174 mob_flags_.change( MOB_FLAGS::PARALYZED, value ?
true :
false );
2175 return new BLong( paralyzed() );
2177 poisoned( value ?
true :
false );
2178 return new BLong( poisoned() );
2180 return new BLong( stealthsteps_ = static_cast<unsigned short>( value ) );
2182 return new BLong( mountedsteps_ = static_cast<unsigned int>( value ) );
2185 cmdlevel( static_cast<unsigned char>(
Core::gamestate.cmdlevels.size() ) - 1,
true );
2187 cmdlevel( static_cast<unsigned char>( value ),
true );
2188 return new BLong( cmdlevel() );
2191 make_murderer( value ?
true :
false );
2192 return new BLong( is_murderer() );
2194 hitchance_mod( static_cast<short>( value ) );
2195 return new BLong( hitchance_mod() );
2197 evasionchance_mod( static_cast<short>( value ) );
2198 return new BLong( evasionchance_mod() );
2200 carrying_capacity_mod( static_cast<short>( value ) );
2201 if ( client !=
nullptr )
2205 return new BLong( carrying_capacity_mod() );
2208 return new BLong( 0 );
2209 on_facing_changed();
2210 return new BLong( 1 );
2212 fire_resist( fire_resist().setAsMod( static_cast<short>( value ) ) );
2214 return new BLong( fire_resist().mod );
2217 cold_resist( cold_resist().setAsMod( static_cast<short>( value ) ) );
2219 return new BLong( cold_resist().mod );
2222 energy_resist( energy_resist().setAsMod( static_cast<short>( value ) ) );
2224 return new BLong( energy_resist().mod );
2227 poison_resist( poison_resist().setAsMod( static_cast<short>( value ) ) );
2229 return new BLong( poison_resist().mod );
2232 physical_resist( physical_resist().setAsMod( static_cast<short>( value ) ) );
2234 return new BLong( physical_resist().mod );
2238 auto val = skillstatcap();
2239 val.statcap =
static_cast<short>( value );
2240 skillstatcap( val );
2242 on_aos_ext_stat_changed();
2243 return new BLong( skillstatcap().statcap );
2247 auto val = skillstatcap();
2248 val.skillcap =
static_cast<u16>( value );
2249 skillstatcap( val );
2250 return new BLong( skillstatcap().skillcap );
2253 luck( static_cast<short>( value ) );
2255 on_aos_ext_stat_changed();
2256 return new BLong( luck() );
2260 auto val = followers();
2261 val.followers_max =
static_cast<u8>( value );
2264 on_aos_ext_stat_changed();
2265 return new BLong( followers().followers_max );
2268 tithing( static_cast<s32>( value ) );
2270 on_aos_ext_stat_changed();
2271 return new BLong( tithing() );
2275 auto val = followers();
2276 val.followers =
static_cast<u8>( value );
2279 on_aos_ext_stat_changed();
2280 return new BLong( followers().followers );
2283 fire_damage( fire_damage().setAsMod( static_cast<short>( value ) ) );
2285 return new BLong( fire_damage().mod );
2288 cold_damage( cold_damage().setAsMod( static_cast<short>( value ) ) );
2290 return new BLong( cold_damage().mod );
2293 energy_damage( energy_damage().setAsMod( static_cast<short>( value ) ) );
2295 return new BLong( energy_damage().mod );
2298 poison_damage( poison_damage().setAsMod( static_cast<short>( value ) ) );
2300 return new BLong( poison_damage().mod );
2303 physical_damage( physical_damage().setAsMod( static_cast<short>( value ) ) );
2305 return new BLong( physical_damage().mod );
2309 auto val = movement_cost();
2310 val.walk =
static_cast<double>( value );
2311 movement_cost( val );
2312 return new Double( movement_cost().walk );
2316 auto val = movement_cost();
2317 val.run =
static_cast<double>( value );
2318 movement_cost( val );
2319 return new Double( movement_cost().
run );
2323 auto val = movement_cost();
2324 val.walk_mounted =
static_cast<double>( value );
2325 movement_cost( val );
2326 return new Double( movement_cost().walk_mounted );
2330 auto val = movement_cost();
2331 val.run_mounted =
static_cast<double>( value );
2332 movement_cost( val );
2333 return new Double( movement_cost().run_mounted );
2346 auto val = movement_cost();
2348 movement_cost( val );
2349 return new Double( movement_cost().walk );
2353 auto val = movement_cost();
2355 movement_cost( val );
2356 return new Double( movement_cost().
run );
2360 auto val = movement_cost();
2361 val.walk_mounted = value;
2362 movement_cost( val );
2363 return new Double( movement_cost().walk_mounted );
2367 auto val = movement_cost();
2368 val.run_mounted = value;
2369 movement_cost( val );
2370 return new Double( movement_cost().run_mounted );
2380 if ( objmember !=
nullptr )
2381 return this->set_script_member_id( objmember->
id, value );
2388 BObjectImp* imp = base::script_method_id(
id, ex );
2389 if ( imp !=
nullptr )
2409 return new BError(
"Invalid parameter type" );
2414 if ( newval != poisoned() )
2421 if ( uoexec !=
nullptr && uoexec->
controller_.get() )
2424 if ( !attacker->
orphan() )
2433 return new BLong( 1 );
2451 return new BError(
"Invalid parameter type" );
2456 if ( newval != paralyzed() )
2459 mob_flags_.change( MOB_FLAGS::PARALYZED, newval );
2463 if ( uoexec !=
nullptr && uoexec->
controller_.get() )
2466 if ( !attacker->
orphan() )
2475 return new BLong( 1 );
2488 return new BError(
"Invalid parameter type" );
2490 return new BError(
"Level must be >= 0" );
2494 make_criminal( level );
2495 return new BLong( 1 );
2500 int level, duration;
2502 return new BError(
"Not enough parameters" );
2505 lightoverride( level );
2507 if ( duration == -1 )
2508 lightoverride_until( ~0u );
2509 else if ( duration == 0 )
2510 lightoverride_until( 0 );
2514 check_region_changes();
2515 if ( duration == -1 )
2516 return new BLong( duration );
2517 return new BLong( lightoverride_until() );
2524 int season_id, playsound;
2527 return new BError(
"Not enough parameters" );
2530 if ( season_id < 0 || season_id > 4 )
2531 return new BError(
"Invalid season id" );
2533 if ( client && client->getversiondetail().major >= 1 )
2536 msg->Write<
u8>(
static_cast<u16>( season_id ) );
2537 msg->Write<
u8>(
static_cast<u16>( playsound ) );
2539 return new BLong( 1 );
2548 return new BError(
"Not enough parameters" );
2552 if ( duration == -1 )
2554 squelched_until( ~0u );
2555 return new BLong( -1 );
2557 else if ( duration == 0 )
2558 squelched_until( 0 );
2561 return new BLong( squelched_until() );
2568 return new BError(
"Not enough parameters" );
2572 if ( has_privilege( pstr->
data() ) )
2575 set_setting( pstr->
data(), true );
2576 return new BLong( 1 );
2579 return new BError(
"Mobile doesn't have that privilege" );
2587 return new BError(
"Not enough parameters" );
2592 set_setting( pstr->
data(), false );
2593 return new BLong( 1 );
2601 return new BError(
"Not enough parameters" );
2604 return new BLong( setting_enabled( pstr->
data() ) ? 1 : 0 );
2610 std::unique_ptr<BDictionary> dict(
new BDictionary );
2613 while ( istrm >> tmp )
2615 dict->addMember(
new String( tmp ),
new BLong( setting_enabled( tmp.c_str() ) ) );
2617 return dict.release();
2624 return new BError(
"Not enough parameters" );
2632 cmdlevel( pcmdlevel->
cmdlevel,
true );
2633 return new BLong( 1 );
2636 return new BError(
"No such command level" );
2644 return new BError(
"Invalid parameter type" );
2646 if ( gold_carried() <
static_cast<unsigned int>( amt ) )
2647 return new BError(
"Insufficient funds" );
2650 return new BLong( 1 );
2659 return new BError(
"Invalid parameter type" );
2663 make_murderer( lnewval ?
true :
false );
2664 return new BLong( 1 );
2669 return new BError(
"Not enough parameters" );
2674 clear_reportable( repserial, gameclock );
2675 return new BLong( 1 );
2680 if ( has_gotten_item() )
2683 return new BError(
"Gotten Item nullptr" );
2686 if ( has_gotten_item() )
2688 clear_gotten_item();
2689 return new BLong( 1 );
2692 return new BError(
"No Gotten Item" );
2698 return new BError(
"Not enough parameters" );
2699 if ( ex.
getParam( 0, newmode, 0, 1 ) )
2701 set_warmode( ( newmode == 0 ) ?
false :
true );
2705 return new BLong( warmode() );
2713 if ( corpse_obj !=
nullptr && !corpse_obj->
orphan() )
2716 return new BError(
"No corpse was found." );
2723 return new BError(
"Not enough parameters" );
2727 return new BError(
"Time must be >= 0" );
2730 return new BLong( manual_set_swing_timer( clocks ) ? 1 : 0 );
2742 return new BError(
"Character is dead" );
2743 if ( is_attackable( chr ) )
2746 return new BError(
"Opponent is not attackable" );
2749 return new BError(
"Invalid parameter type" );
2753 chr = get_attackable_opponent();
2754 if ( chr !=
nullptr )
2759 return new BError(
"Character is dead" );
2762 return new BError(
"No opponent" );
2764 return new BLong( 1 );
2775 return new BError(
"That is already dead!" );
2778 return new BLong( 1 );
2786 return new BError(
"Invalid flags for parameter 1" );
2793 return new BError(
"Invalid string for parameter 0" );
2797 BLong* blong =
static_cast<BLong*
>( param0 );
2801 return new BError(
"Invalid type for parameter 0" );
2803 if ( !face( i_facing, flags ) )
2804 return new BLong( 0 );
2806 on_facing_changed();
2807 return new BLong( 1 );
2811 if ( client !=
nullptr )
2814 return new BError(
"Not enough parameters" );
2819 return new BError(
"Invalid parameter type" );
2822 return new BError(
"No client attached" );
2831 this->make_aggressor_to( chr );
2832 return new BLong( 1 );
2835 return new BError(
"Invalid parameter type" );
2838 return new BError(
"Not enough parameters" );
2847 this->make_lawfullydamaged_to( chr );
2848 return new BLong( 1 );
2851 return new BError(
"Invalid parameter type" );
2854 return new BError(
"Not enough parameters" );
2862 this->remove_as_aggressor_to( chr );
2863 return new BLong( 1 );
2866 return new BError(
"Invalid parameter type" );
2869 return new BError(
"Not enough parameters" );
2877 this->remove_as_lawful_damager( chr );
2878 return new BLong( 1 );
2881 return new BError(
"Invalid parameter type" );
2884 return new BError(
"Not enough parameters" );
2890 return new BError(
"Not enough parameters" );
2894 if ( duration == -1 )
2896 deafened_until( ~0u );
2897 return new BLong( -1 );
2899 else if ( duration == 0 )
2900 deafened_until( 0 );
2903 return new BLong( deafened_until() );
2911 return new BError(
"Not enough parameters" );
2915 return new BError(
"Duration must be >= 0" );
2917 return new BLong( static_cast<int>( disable_skills_until() ) );
2930 return new BError(
"Not enough parameters" );
2934 if ( !( icon && cl_name && cl_descr ) )
2935 return new BError(
"Invalid parameters" );
2939 return new BError(
"Unicode array exceeds maximum size." );
2941 size_t textlen = oText->
ref_arr.size();
2943 return new BError(
"Invalid value in Unicode array." );
2947 std::vector<u32> arguments;
2948 arguments.reserve( textlen );
2949 for (
size_t i = 0; i < textlen; i++ )
2950 arguments.insert( arguments.end(), cltext[i] );
2952 addBuff( icon, duration, cl_name, cl_descr, arguments );
2953 return new BLong( 1 );
2961 return new BLong( 1 );
2969 return new BError(
"Not enough parameters" );
2973 return new BError(
"Invalid parameter" );
2975 if ( !delBuff( icon ) )
2976 return new BError(
"Buff not found" );
2978 return new BLong( 1 );
2985 return new BError(
"Invalid parameter type" );
2992 if ( objmethod !=
nullptr )
2993 return this->script_method_id( objmethod->
id, ex );
3004 methodname, static_cast<unsigned int>( ex.
numParams() + 1 ), PC ) )
3013 std::unique_ptr<ObjArray> arr(
new ObjArray );
3015 for ( ReportableList::const_iterator itr = reportable_.begin(), end = reportable_.end();
3020 std::unique_ptr<BObjectImp> kmember(
nullptr );
3025 kmember.reset(
new BError(
"Mobile not found" ) );
3027 std::unique_ptr<BStruct> elem(
new BStruct );
3028 elem->addMember(
"serial",
new BLong( rt.
serial ) );
3029 elem->addMember(
"killer", kmember.release() );
3032 arr->addElement( elem.release() );
3034 return arr.release();
3039 std::unique_ptr<ObjArray> arr(
new ObjArray );
3041 for ( Character::MobileCont::const_iterator itr = aggressor_to_.begin(),
3042 end = aggressor_to_.end();
3045 std::unique_ptr<BObjectImp> member(
nullptr );
3050 member.reset(
new BError(
"Mobile not found" ) );
3052 std::unique_ptr<BStruct> elem(
new BStruct );
3053 elem->addMember(
"serial",
new BLong( ( *itr ).first->serial ) );
3054 elem->addMember(
"ref", member.release() );
3058 arr->addElement( elem.release() );
3060 return arr.release();
3065 std::unique_ptr<ObjArray> arr(
new ObjArray );
3067 for ( Character::MobileCont::const_iterator itr = lawfully_damaged_.begin(),
3068 end = lawfully_damaged_.end();
3071 std::unique_ptr<BObjectImp> member(
nullptr );
3076 member.reset(
new BError(
"Mobile not found" ) );
3078 std::unique_ptr<BStruct> elem(
new BStruct );
3079 elem->addMember(
"serial",
new BLong( ( *itr ).first->serial ) );
3080 elem->addMember(
"ref", member.release() );
3084 arr->addElement( elem.release() );
3086 return arr.release();
3091 BObjectImp* imp = base::get_script_member_id(
id );
3092 if ( imp !=
nullptr )
3098 return new String( script );
3101 return new String( template_name );
3106 if ( master !=
nullptr && !master->
orphan() )
3109 return new BLong( 0 );
3117 return new BError(
"No script running" );
3122 return new BLong( ex->eventmask );
3124 return new BError(
"No script running" );
3128 return new BLong( speech_color() );
3131 return new BLong( speech_font() );
3134 return new BLong( use_adjustments() ? 1 : 0 );
3137 return new BLong( run_speed );
3140 return new BLong( this->template_.alignment );
3143 return new BLong( saveonexit() );
3146 return new BLong( no_drop_exception() );
3155 if ( objmember !=
nullptr )
3156 return this->get_script_member_id( objmember->
id );
3163 BObjectImp* imp = base::set_script_member_id(
id, value );
3164 if ( imp !=
nullptr )
3169 return new String( script = value );
3178 if ( objmember !=
nullptr )
3179 return this->set_script_member_id( objmember->
id, value );
3186 BObjectImp* imp = base::set_script_member_id(
id, value );
3187 if ( imp !=
nullptr )
3192 speech_color( static_cast<unsigned short>( value ) );
3193 return new BLong( speech_color() );
3195 speech_font( static_cast<unsigned short>( value ) );
3196 return new BLong( speech_font() );
3198 use_adjustments( value ?
true :
false );
3199 return new BLong( use_adjustments() );
3201 return new BLong( run_speed = static_cast<unsigned short>( value ) );
3203 saveonexit( value ?
true :
false );
3204 return new BLong( saveonexit() );
3206 no_drop_exception( value ?
true :
false );
3207 return new BLong( no_drop_exception() );
3215 if ( objmember !=
nullptr )
3216 return this->set_script_member_id( objmember->
id, value );
3223 BObjectImp* imp = base::script_method_id(
id, executor );
3224 if ( imp !=
nullptr )
3232 return new BError(
"Not enough parameters" );
3238 return new BLong( 1 );
3243 return new BLong( 0 );
3255 if ( objmethod !=
nullptr )
3256 return this->script_method_id( objmethod->
id, executor );
3263 if ( template_.method_script !=
nullptr )
3266 if ( template_.method_script->FindExportedFunction(
3267 methodname, static_cast<unsigned int>( executor.
numParams() + 1 ), PC ) )
3268 return template_.method_script->call( PC, make_ref(), executor.
fparams );
3275 using namespace Bscript;
3280 if ( imp !=
nullptr )
3286 return new BLong( locked() ? 1 : 0 );
3296 if ( objmember !=
nullptr )
3297 return this->get_script_member_id( objmember->
id );
3305 if ( imp !=
nullptr )
3310 locked( value ?
true :
false );
3311 return new BLong( locked() );
3320 if ( objmember !=
nullptr )
3321 return this->set_script_member_id( objmember->
id, value );
3328 BObjectImp* imp = base::get_script_member_id(
id );
3329 if ( imp !=
nullptr )
3335 return new BLong( max_items_mod() );
3338 return new BLong( max_weight_mod() );
3341 return new BLong( max_slots_mod() );
3344 return new BLong( no_drop_exception() );
3353 if ( objmember !=
nullptr )
3354 return this->get_script_member_id( objmember->
id );
3361 BObjectImp* imp = base::set_script_member_id(
id, value );
3362 if ( imp !=
nullptr )
3367 max_items_mod( static_cast<s16>( value ) );
3370 max_weight_mod( static_cast<s16>( value ) );
3373 max_slots_mod( static_cast<s8>( value ) );
3376 no_drop_exception( value ?
true :
false );
3377 return new BLong( no_drop_exception() );
3381 return new BLong( value );
3387 if ( objmember !=
nullptr )
3388 return this->set_script_member_id( objmember->
id, value );
3395 BObjectImp* imp = base::get_script_member_id(
id );
3396 if ( imp !=
nullptr )
3402 return new BLong( corpsetype );
3405 return new BLong( ownerserial );
3415 if ( objmember !=
nullptr )
3416 return this->get_script_member_id( objmember->
id );
3423 BObjectImp* imp = base::script_method_id(
id, ex );
3424 if ( imp !=
nullptr )
3433 return new BError(
"Not enough parameters" );
3437 return new BError(
"SpellID must be >= 1" );
3438 if ( this->has_spellid( static_cast<unsigned int>( sid ) ) )
3439 return new BLong( 1 );
3441 return new BLong( 0 );
3447 std::unique_ptr<ObjArray> arr(
new ObjArray );
3448 for (
u16 i = 0; i < 64; ++i )
3453 if ( this->spell_school == 3 )
3456 sid = this->spell_school * 100 + i + 1;
3458 if ( this->has_spellid( sid ) )
3459 arr->addElement(
new BLong( sid ) );
3461 return arr.release();
3468 return new BError(
"Not enough parameters" );
3472 return new BError(
"SpellID must be >= 1" );
3473 if ( this->remove_spellid( static_cast<unsigned int>( sid ) ) )
3474 return new BLong( 1 );
3476 return new BLong( 0 );
3484 return new BError(
"Not enough parameters" );
3488 return new BError(
"SpellID must be >= 1" );
3489 if ( this->add_spellid( static_cast<unsigned int>( sid ) ) )
3490 return new BLong( 1 );
3492 return new BLong( 0 );
3500 return new BError(
"Invalid parameter type" );
3506 if ( objmethod !=
nullptr )
3507 return this->script_method_id( objmethod->
id, ex );
3514 using namespace Bscript;
3528 BObjectImp* imp = base::get_script_member_id(
id );
3529 if ( imp !=
nullptr )
3536 Item* cp = tillerman;
3537 if ( cp !=
nullptr )
3540 return new BError( std::string(
"This ship doesn't have that component" ) );
3545 Item* cp = portplank;
3546 if ( cp !=
nullptr )
3549 return new BError( std::string(
"This ship doesn't have that component" ) );
3554 Item* cp = starboardplank;
3555 if ( cp !=
nullptr )
3558 return new BError( std::string(
"This ship doesn't have that component" ) );
3564 if ( cp !=
nullptr )
3567 return new BError( std::string(
"This ship doesn't have that component" ) );
3598 return items_list();
3601 return mobiles_list();
3604 return new BLong( has_offline_mobiles() ? 1 : 0 );
3607 return new BLong( multiid );
3614 BObjectImp* UBoat::get_script_member(
const char* membername )
const 3617 if ( objmember !=
nullptr )
3618 return this->get_script_member_id( objmember->
id );
3625 BObjectImp* imp = base::script_method_id(
id, ex );
3626 if ( imp !=
nullptr )
3642 if ( !realm->valid( newx, newy, newz ) )
3643 return new BError(
"Coordinates are out of range" );
3646 move_offline_mobiles( newx, newy, newz, realm );
3647 return new BLong( 1 );
3650 return new BError(
"Invalid parameter type" );
3663 return new BError(
"Realm not found" );
3665 if ( !newrealm->
valid( newx, newy, newz ) )
3666 return new BError(
"Coordinates are out of range" );
3669 move_offline_mobiles( newx, newy, newz, newrealm );
3670 return new BLong( 1 );
3673 return new BError(
"Invalid parameter type" );
3676 return new BError(
"Not enough parameters" );
3688 if ( objmethod !=
nullptr )
3689 return this->script_method_id( objmethod->
id, ex );
3702 return new BError(
"No boat attached" );
3705 return base::get_script_member_id(
id );
3709 BObjectImp* UPlank::get_script_member(
const char* membername )
const 3712 if ( objmember !=
nullptr )
3713 return this->get_script_member_id( objmember->
id );
3715 return base::get_script_member( membername );
3720 using namespace Bscript;
3724 BObjectImp* imp = base::get_script_member_id(
id );
3725 if ( imp !=
nullptr )
3731 return new BLong( xeast );
3734 return new BLong( xwest );
3737 return new BLong( ynorth );
3740 return new BLong( ysouth );
3743 return new BLong( gumpwidth );
3746 return new BLong( gumpheight );
3749 return new BLong( facetid );
3752 return new BLong( editable ? 1 : 0 );
3762 if ( objmember !=
nullptr )
3763 return this->get_script_member_id( objmember->
id );
3770 BObjectImp* imp = base::set_script_member_id(
id, value );
3771 if ( imp !=
nullptr )
3776 return new BLong( xeast = static_cast<unsigned short>( value ) );
3778 return new BLong( xwest = static_cast<unsigned short>( value ) );
3780 return new BLong( ynorth = static_cast<unsigned short>( value ) );
3782 return new BLong( ysouth = static_cast<unsigned short>( value ) );
3784 return new BLong( gumpwidth = static_cast<unsigned short>( value ) );
3786 return new BLong( gumpheight = static_cast<unsigned short>( value ) );
3788 return new BLong( facetid = static_cast<unsigned short>( value ) );
3790 return new BLong( editable = value ?
true :
false );
3798 if ( objmember !=
nullptr )
3799 return this->set_script_member_id( objmember->
id, value );
3811 return new BError(
"Not enough parameters" );
3814 return new BLong( script_isa( static_cast<unsigned>( isatype ) ) );
3820 return new BError(
"Not enough parameters" );
3829 ret = set_script_member( mname->
value().c_str(), lng->
value() );
3834 ret = set_script_member_double( mname->
value().c_str(), dbl->
value() );
3839 ret = set_script_member( mname->
value().c_str(), str->
value() );
3842 return new BError(
"Invalid value type" );
3844 if ( ret !=
nullptr )
3848 std::string message = std::string(
"Member " ) + std::string( mname->
value() ) +
3849 std::string(
" not found on that object" );
3850 return new BError( message );
3858 return new BError(
"Not enough parameters" );
3864 if ( ret !=
nullptr )
3868 std::string message = std::string(
"Member " ) + std::string( mname->
value() ) +
3869 std::string(
" not found on that object" );
3870 return new BError( message );
3877 bool changed =
false;
3884 return new BError(
"Invalid parameter type" );
3891 if ( objmethod !=
nullptr )
3892 return this->script_method_id( objmethod->
id, ex );
3895 bool changed =
false;
3907 if ( objmethod !=
nullptr )
3908 return this->script_method_id( objmethod->
id, ex );
3916 if ( imp !=
nullptr )
3922 return new BLong( is_open() ? 1 : 0 );
3932 if ( objmember !=
nullptr )
3933 return this->get_script_member_id( objmember->
id );
3940 BObjectImp* imp = base::script_method_id(
id, ex );
3941 if ( imp !=
nullptr )
3958 return new BLong( 1 );
3964 if ( objmethod !=
nullptr )
3965 return this->script_method_id( objmethod->
id, ex );
3972 using namespace Bscript;
3977 if ( imp !=
nullptr )
3983 return new BLong( is_intrinsic() );
3992 if ( objmember !=
nullptr )
3993 return this->get_script_member_id( objmember->
id );
4001 if ( imp !=
nullptr )
4015 if ( objmember !=
nullptr )
4016 return this->set_script_member_id( objmember->
id, value );
4024 if ( imp !=
nullptr )
4038 if ( objmember !=
nullptr )
4039 return this->set_script_member_id_double( objmember->
id, value );
4048 if ( imp !=
nullptr )
4054 return new BLong( damage_mod() );
4057 return new BLong( speed_mod() );
4063 return new String( hit_script_.relativename( tmpl->pkg ) );
4072 if ( objmember !=
nullptr )
4073 return this->get_script_member_id( objmember->
id );
4081 if ( imp !=
nullptr )
4087 set_hit_script( value );
4088 return new BLong( 1 );
4096 if ( objmember !=
nullptr )
4097 return this->set_script_member_id( objmember->
id, value );
4104 if ( is_intrinsic() )
4105 return new BError(
"Cannot alter an instrinsic NPC weapon member values" );
4111 if ( imp !=
nullptr )
4117 damage_mod( static_cast<s16>( value ) );
4120 speed_mod( static_cast<s16>( value ) );
4125 return new BLong( value );
4131 if ( objmember !=
nullptr )
4132 return this->set_script_member_id( objmember->
id, value );
4139 if ( is_intrinsic() )
4140 return new BError(
"Cannot alter an instrinsic NPC weapon member values" );
4144 return base::set_script_member_id_double(
id, value );
4150 if ( objmember !=
nullptr )
4151 return this->set_script_member_id_double( objmember->
id, value );
4153 return base::set_script_member_double( membername, value );
4159 if ( imp !=
nullptr )
4165 return new BLong( ar_mod() );
4168 return new BLong( ar() );
4171 return new BLong( ar_base() );
4174 return new String( onhitscript_.relativename( tmpl->pkg ) );
4184 if ( objmember !=
nullptr )
4185 return this->get_script_member_id( objmember->
id );
4193 if ( imp !=
nullptr )
4198 set_onhitscript( value );
4199 return new BLong( 1 );
4208 if ( objmember !=
nullptr )
4209 return this->set_script_member_id( objmember->
id, value );
4217 if ( imp !=
nullptr )
4223 this->ar_mod( static_cast<s16>( value ) );
4224 if ( container !=
nullptr )
4229 if ( chr !=
nullptr )
4233 return new BLong( value );
4242 if ( objmember !=
nullptr )
4243 return this->set_script_member_id( objmember->
id, value );
4250 using namespace Bscript;
4264 if ( value().exists() )
4265 return value()->make_ref();
4267 return new BError(
"Client is disconnected" );
4272 return ( value().exists() && value()->isConnected() );
4287 if ( clientref_imp->
value().
exists() && value().exists() &&
4288 ( clientref_imp->
value()->chr != nullptr ) && ( value()->chr != nullptr ) )
4289 return ( clientref_imp->
value()->chr->serial == value()->chr->serial );
4304 if ( ( !obj_.exists() ) || ( !obj_->isConnected() ) )
4310 if ( obj_->acct !=
nullptr )
4323 std::unique_ptr<BStruct> info(
new BStruct );
4325 info->addMember(
"major",
new BLong( version.
major ) );
4326 info->addMember(
"minor",
new BLong( version.
minor ) );
4327 info->addMember(
"rev",
new BLong( version.
rev ) );
4328 info->addMember(
"patch",
new BLong( version.
patch ) );
4352 return base::get_member_id(
id );
4357 if ( ( !obj_.exists() ) || ( !obj_->isConnected() ) )
4360 if ( objmember !=
nullptr )
4361 return this->get_member_id( objmember->
id );
4368 if ( !obj_.exists() || !obj_->isConnected() )
4371 if ( objmember !=
nullptr )
4372 return this->set_member_id( objmember->
id, value, copy );
4379 if ( !obj_.exists() || !obj_->isConnected() )
4386 if ( !obj_.exists() || !obj_->isConnected() )
4387 return new BError(
"Client not ready or disconnected" );
4389 if ( objmethod !=
nullptr )
4390 return this->call_method_id( objmethod->
id, ex );
4396 if ( !obj_.exists() || !obj_->isConnected() )
4397 return new BError(
"Client not ready or disconnected" );
4404 return new BError(
"Not enough parameters" );
4408 return new BError(
"Invalid parameter type" );
4412 return base::call_method_id(
id, ex );
4417 addMember(
"type",
new BLong( type ) );
4425 addMember(
"text",
new String( speech ) );
4431 addMember(
"text",
new String( speech ) );
4432 addMember(
"texttype",
new String( texttype ) );
4436 const u16* wspeech,
const char lang[4],
4442 addMember(
"text",
new String( speech ) );
4444 while ( wspeech[wlen] != L
'\0' )
4447 addMember(
"uc_text",
new BError(
"Invalid Unicode speech received." ) );
4450 addMember(
"uc_text", arr );
4451 addMember(
"langcode",
new String( lang ) );
4453 if ( speechtokens !=
nullptr )
4454 addMember(
"tokens", speechtokens );
4457 const char* texttype,
const u16* wspeech,
4458 const char lang[4],
ObjArray* speechtokens )
4463 addMember(
"text",
new String( speech ) );
4465 while ( wspeech[wlen] != L
'\0' )
4468 addMember(
"uc_text",
new BError(
"Invalid Unicode speech received." ) );
4471 addMember(
"uc_text", arr );
4472 addMember(
"langcode",
new String( lang ) );
4474 addMember(
"texttype",
new String( texttype ) );
4475 if ( speechtokens !=
nullptr )
4476 addMember(
"tokens",
new ObjArray( *speechtokens ) );
4483 if ( source !=
nullptr )
4486 addMember(
"source",
new BLong( 0 ) );
4488 addMember(
"damage",
new BLong( damage ) );
4498 item_.set( item_given );
4516 std::string given_time_str;
4517 if ( !item->
getprop(
"GivenTime", given_time_str ) )
4518 given_time_str =
"";
4525 int gts =
static_cast<BLong*
>( given_value.
impptr() )->value();
4533 if ( backpack !=
nullptr && !chr->
dead() )
4535 if ( backpack->
can_add( *item ) )
4549 backpack->
add( item );
4588 return ( isatype ==
POLCLASS_DOOR ) || base::script_isa( isatype );
4598 return ( isatype ==
POLCLASS_MAP ) || base::script_isa( isatype );
4639 bool UMulti::script_isa(
unsigned isatype )
const 4644 bool UBoat::script_isa(
unsigned isatype )
const 4649 bool UHouse::script_isa(
unsigned isatype )
const
virtual Bscript::BObjectImp * call_method_id(const int id, Bscript::Executor &ex, bool forcebuiltin=false) POL_OVERRIDE
virtual void on_insert_add_item(Mobile::Character *mob, MoveType move, Items::Item *new_item)
unsigned short doubleclick_range
virtual Bscript::BObjectImp * call_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
void register_with_supporting_multi(Item *item)
virtual Bscript::BObjectImp * call_method_id(const int id, Bscript::Executor &ex, bool forcebuiltin=false) POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
BApplicObjType echaracterrefobjimp_type
bool can_add_to_slot(u8 &slotIndex)
virtual Bscript::BObjectImp * copy() const POL_OVERRIDE
virtual Bscript::BObjectImp * custom_script_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
const std::string & value() const
Character * chr_from_wornitems(UContainer *wornitems)
virtual Bscript::BObjectRef set_member_id(const int id, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member(const char *membername, const std::string &value) POL_OVERRIDE
id test
virtual Bscript::BObjectImp * make_ref() POL_OVERRIDE
virtual Bscript::BObjectImp * copy() const POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
virtual Bscript::BObjectImp * script_method_id(const int id, Bscript::Executor &ex) POL_OVERRIDE
virtual Bscript::BObjectImp * copy() const POL_OVERRIDE
virtual Bscript::BObjectImp * script_method(const char *methodname, Bscript::Executor &ex)
virtual bool can_add(const Items::Item &item) const
void add_item_to_world(Items::Item *item)
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
bool operator<(T *ptr, const ref_ptr< T > &rptr)
virtual Bscript::BObjectRef get_member(const char *membername) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member_id_double(const int id, double value) POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
BApplicObjType eitemrefobjimp_type
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
bool isa(BObjectType type) const
void setprop(const std::string &propname, const std::string &propvalue)
Core::gameclock_t given_time_
virtual Bscript::BObjectRef set_member(const char *membername, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
virtual Bscript::BObjectImp * call_method_id(const int id, Bscript::Executor &ex, bool forcebuiltin=false) POL_OVERRIDE
DamageEvent(Mobile::Character *source, unsigned short damage)
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
virtual Bscript::BObjectImp * script_method_id(const int id, Bscript::Executor &ex) POL_OVERRIDE
virtual Bscript::BObjectRef set_member(const char *membername, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member(const char *membername, const std::string &value) POL_OVERRIDE
id test
const unsigned POLCLASS_WEAPON
Core::polclock_t polclock
virtual Bscript::BObjectImp * copy() const POL_OVERRIDE
virtual Bscript::BObjectRef get_member(const char *membername) POL_OVERRIDE
ObjMember * getKnownObjMember(const char *token)
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
virtual bool operator==(const Bscript::BObjectImp &objimp) const POL_OVERRIDE
virtual bool isTrue() const POL_OVERRIDE
std::string decint(unsigned short v)
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
virtual Bscript::BObjectRef set_member_id(const int id, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
const unsigned POLCLASS_BOAT
virtual ~ItemGivenEvent()
BObjectImp * CreatePartyRefObjImp(Core::Party *party)
const unsigned POLCLASS_ARMOR
virtual Bscript::BObjectRef get_member_id(const int id) POL_OVERRIDE
const unsigned POLCLASS_MULTI
virtual void repsys_on_help(Character *recipient)
[15] Mobile (MA) Helps Mobile (MB)
virtual std::string getStringRep() const POL_OVERRIDE
const unsigned POLCLASS_OBJECT
virtual Bscript::BObjectImp * script_method_id(const int id, Bscript::Executor &ex) POL_OVERRIDE
Character * UpdateCharacterWeight(Item *item)
virtual Bscript::BObjectImp * set_script_member(const char *membername, const std::string &value)
id test
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member_id(const int id, int value) POL_OVERRIDE
virtual Bscript::BObjectImp * custom_script_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
virtual void repsys_on_damage(Character *defender)
[14] Mobile (MA) Damages Mobile (MB)
virtual u8 typeOfInt() const POL_OVERRIDE
BApplicObjType echaracterequipobjimp_type
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
id test
virtual Bscript::BObjectImp * set_script_member(const char *membername, int value) POL_OVERRIDE
id test
void addMember(const char *name, BObjectRef val)
virtual Bscript::BObjectImp * set_script_member_double(const char *membername, double value) POL_OVERRIDE
id test
Core::CharacterRef controller_
virtual Bscript::BObjectImp * set_script_member(const char *membername, const std::string &value) POL_OVERRIDE
id test
ObjMethod * getKnownObjMethod(const char *token)
virtual const char * typeOf() const POL_OVERRIDE
Bscript::BObject call_custom_method(const char *methodname, Bscript::BObjectImpRefVec &pmore)
const unsigned POLCLASS_HOUSE
virtual Bscript::BObjectImp * set_script_member_id(const int id, const std::string &value) POL_OVERRIDE
virtual u8 typeOfInt() const POL_OVERRIDE
void add_to_self(Item *&item)
virtual Bscript::BObjectImp * get_script_member_id(const int id) const
const char * paramAsString(unsigned param)
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
virtual bool operator==(const Bscript::BObjectImp &objimp) const POL_OVERRIDE
virtual void add(Items::Item *item)
virtual bool isTrue() const POL_OVERRIDE
virtual bool script_isa(unsigned isatype) const
virtual Bscript::BObjectRef get_member(const char *membername) POL_OVERRIDE
virtual Bscript::BObjectImp * script_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
virtual Items::Item * remove(u32 serial, UContainer **found_in=nullptr)
virtual bool operator==(const Bscript::BObjectImp &objimp) const POL_OVERRIDE
BApplicObjType emultirefobjimp_type
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
static gameclock_t gameclock
virtual u8 typeOfInt() const POL_OVERRIDE
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
virtual Bscript::BObjectImp * custom_script_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
std::string hexint(unsigned short v)
const BApplicObjType * object_type() const
Items::Item * find_addable_stack(const Items::Item *adding_item) const
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
virtual Bscript::BObjectImp * call_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
virtual Bscript::BObjectImp * script_method_id(const int id, Bscript::Executor &ex)
virtual Bscript::BObjectImp * copy() const POL_OVERRIDE
virtual Bscript::BObjectImp * script_method_id(const int id, Bscript::Executor &ex) POL_OVERRIDE
bool getCharacterParam(Bscript::Executor &exec, unsigned param, Mobile::Character *&chrptr)
BApplicObjType eclientrefobjimp_type
bool getprop(const std::string &propname, std::string &propvalue) const
Bscript::BObjectImp * CallPropertyListMethod_id(PropertyList &proplist, const int id, Bscript::Executor &ex, bool &changed)
virtual Bscript::BObjectImp * script_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
void setamount(u16 amount)
virtual u8 typeOfInt() const POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
Core::CharacterRef given_by_
virtual Bscript::BObjectImp * script_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
id test
Bscript::ObjArray * GetReportables() const
virtual Bscript::BObjectImp * script_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
virtual const char * typeOf() const POL_OVERRIDE
const unsigned POLCLASS_MAP
virtual Bscript::BObjectImp * script_method_id(const int id, Bscript::Executor &ex) POL_OVERRIDE
virtual bool operator==(const Bscript::BObjectImp &objimp) const POL_OVERRIDE
void destroy_item(Item *item)
virtual Bscript::BObjectRef get_member(const char *membername) POL_OVERRIDE
virtual bool isTrue() const POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member_id_double(const int id, double value) POL_OVERRIDE
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
virtual bool isTrue() const POL_OVERRIDE
virtual bool operator==(const Bscript::BObjectImp &objimp) const POL_OVERRIDE
void eraseprop(const std::string &propname)
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
NetworkManager networkManager
ExecutorModule * findModule(const std::string &name)
BApplicObjType storage_area_type
std::vector< BObjectRef > fparams
bool convertArrayToUC(Bscript::ObjArray *&in_text, u16 *out_wtext, size_t textlen, bool ConvToBE, bool nullterm)
void Send(Client *client, int len=-1) const
const unsigned POLCLASS_ITEM
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
const unsigned POLCLASS_LOCKABLE
virtual Bscript::BObjectImp * copy() const POL_OVERRIDE
virtual Bscript::BObjectRef set_member(const char *membername, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
id test
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
virtual Bscript::BObjectRef get_member_id(const int id) POL_OVERRIDE
const unsigned POLCLASS_CONTAINER
static UninitObject * create()
virtual Bscript::BObjectImp * set_script_member_id(const int id, const std::string &value)
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
virtual Bscript::BObjectImp * call_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
virtual const char * typeOf() const POL_OVERRIDE
ItemGivenEvent(Mobile::Character *chr_givenby, Items::Item *item_given, Mobile::NPC *chr_givento)
void on_insert_increase_stack(Mobile::Character *mob, MoveType move, Items::Item *existing_item, unsigned short amt_added)
BApplicObjType euboatrefobjimp_type
virtual Bscript::BObjectImp * make_ref() POL_OVERRIDE
static void on_change(Character *chr)
virtual u8 typeOfInt() const POL_OVERRIDE
Bscript::ObjArray * GetAggressorTo() const
bool getItemParam(Executor &exec, unsigned param, Items::Item *&itemptr)
ObjMethod * getObjMethod(int id)
static BObjectImp * unpack(const char *pstr)
void add_at_random_location(Items::Item *item)
bool convertUCtoArray(const u16 *in_wtext, Bscript::ObjArray *&out_text, size_t textlen, bool ConvFromBE)
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
Core::UContainer * container
const unsigned POLCLASS_MOBILE
gameclock_t read_gameclock()
Reads the current value of the game clock.
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
void send_full_statmsg(Network::Client *client, Mobile::Character *chr)
virtual Bscript::BObjectImp * set_script_member_id_double(const int id, double value)
void move_item(Item *item, UFACING facing)
SpeechEvent(Mobile::Character *speaker, const char *speech)
virtual Bscript::BObjectImp * set_script_member(const char *membername, const std::string &value) POL_OVERRIDE
id test
virtual const char * typeOf() const POL_OVERRIDE
const unsigned POLCLASS_SPELLBOOK
Mobile::Character * system_find_mobile(u32 serial)
virtual Bscript::BObjectImp * set_script_member_id_double(const int id, double value) POL_OVERRIDE
const unsigned POLCLASS_EQUIPMENT
virtual Bscript::BObjectRef set_member_id(const int id, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member_id(const int id, int value) POL_OVERRIDE
id test
bool IsCharacter(u32 serial)
virtual bool isTrue() const POL_OVERRIDE
virtual Bscript::BObjectImp * call_method_id(const int id, Bscript::Executor &ex, bool forcebuiltin=false) POL_OVERRIDE
Items::Item * system_find_item(u32 serial)
#define PKTIN_02_FACING_MASK
virtual Bscript::BObjectRef get_member_id(const int id) POL_OVERRIDE
Core::UContainer * backpack() const
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
virtual u8 typeOfInt() const POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member(const char *membername, int value) POL_OVERRIDE
id test
virtual Bscript::BObjectImp * set_script_member_id(const int id, int value) POL_OVERRIDE
id test
virtual Bscript::BObjectImp * call_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member_id(const int id, const std::string &value) POL_OVERRIDE
const unsigned POLCLASS_DOOR
virtual Bscript::BObjectImp * set_script_member(const char *membername, int value) POL_OVERRIDE
id test
const String * getStringParam(unsigned param)
UnicodeSpeechEvent(Mobile::Character *speaker, const char *speech, const u16 *wspeech, const char lang[4], Bscript::ObjArray *speechtokens=nullptr)
virtual Bscript::BObjectImp * set_script_member_id(const int id, const std::string &value) POL_OVERRIDE
D explicit_cast(const S &s)
virtual Bscript::BObjectImp * set_script_member(const char *membername, int value) POL_OVERRIDE
id test
CmdLevel * find_cmdlevel(const char *name)
virtual const char * typeOf() const POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
SourcedEvent(Core::EVENTID type, Mobile::Character *source)
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
Realms::Realm * find_realm(const std::string &name)
virtual Bscript::BObjectRef get_member_id(const int id) POL_OVERRIDE
virtual Bscript::BObjectImp * call_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member(const char *membername) const
bool can_insert_increase_stack(Mobile::Character *mob, MoveType move, Items::Item *existing_item, unsigned short amt_to_add, Items::Item *adding_item)
bool hasParams(unsigned howmany) const
virtual Bscript::BObjectImp * get_script_member_id(const int id) const POL_OVERRIDE
bool isa(UOBJ_CLASS uobj_class) const
Bscript::BObjectImp * CallPropertyListMethod(PropertyList &proplist, const char *methodname, Bscript::Executor &ex, bool &changed)
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
virtual Bscript::BObjectRef get_member_id(const int id) POL_OVERRIDE
virtual void refresh_ar()
virtual bool operator<(const Bscript::BObjectImp &objimp) const POL_OVERRIDE
virtual Bscript::BObjectImp * make_ref() POL_OVERRIDE
virtual Bscript::BObjectImp * script_method(const char *methodname, Bscript::Executor &ex) POL_OVERRIDE
Bscript::ObjArray * GetLawFullyDamaged() const
virtual Bscript::BObjectRef get_member(const char *membername) POL_OVERRIDE
static Bscript::BObjectImp * CreateGuildRefObjImp(Core::Guild *guild)
virtual Bscript::BObjectRef set_member(const char *membername, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member_id(const int id, int value) POL_OVERRIDE
id test
bool valid(unsigned short x, unsigned short y, short z) const
virtual bool isTrue() const POL_OVERRIDE
std::vector< ref_ptr< BObjectImp > > BObjectImpRefVec
virtual Bscript::BObjectImp * set_script_member_double(const char *membername, double value)
bool run(int argc, char **argv)
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
virtual Bscript::BObjectRef set_member_id(const int id, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member_id(const int id, int value) POL_OVERRIDE
id test
void send_object_cache_to_inrange(const UObject *obj)
virtual Bscript::BObjectRef set_member_id(const int id, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member_double(const char *membername, double value) POL_OVERRIDE
id test
virtual Bscript::BObjectImp * custom_script_method(const char *methodname, Bscript::Executor &ex)
bool getObjArrayParam(unsigned param, ObjArray *&pobjarr)
const unsigned POLCLASS_CORPSE
const char * data() const
const polclock_t POLCLOCKS_PER_SEC
virtual Bscript::BObjectImp * set_script_member_id_double(const int id, double value) POL_OVERRIDE
const unsigned POLCLASS_NPC
ref_ptr< Core::UContainer > cont_
bool DecodeFacing(const char *dir, Core::UFACING &facing)
virtual const char * typeOf() const POL_OVERRIDE
virtual std::string pack() const POL_OVERRIDE
Bscript::BObjectImp * make_offline_ref()
BObjectImp * getParamImp(unsigned param)
void update_item_to_inrange(const Item *item)
virtual bool operator<(const Bscript::BObjectImp &objimp) const POL_OVERRIDE
virtual Bscript::BObjectImp * call_method_id(const int id, Bscript::Executor &ex, bool forcebuiltin=false) POL_OVERRIDE
virtual Bscript::BObjectImp * set_script_member(const char *membername, int value) POL_OVERRIDE
id test
virtual Bscript::BObjectRef set_member(const char *membername, Bscript::BObjectImp *value, bool copy) POL_OVERRIDE
virtual Bscript::BObjectImp * get_script_member(const char *membername) const POL_OVERRIDE
bool getParam(unsigned param, int &value)
bool can_insert_add_item(Mobile::Character *mob, MoveType move, Items::Item *new_item)
virtual Bscript::BObjectImp * set_script_member_double(const char *membername, double value) POL_OVERRIDE
id test
virtual Bscript::BObjectImp * set_script_member_id(const int id, const std::string &value) POL_OVERRIDE