activeworlds_ffi 4.2.77.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/LICENSE +33 -0
- data/PostInstall.txt +21 -0
- data/README.txt +91 -0
- data/activeworlds_ffi.gemspec +23 -0
- data/examples/base_bot.rb +1185 -0
- data/examples/bot_logger.rb +21 -0
- data/examples/bot_template.rb +61 -0
- data/examples/bots_config.yml +26 -0
- data/examples/hello.rb +75 -0
- data/examples/tracker.rb +103 -0
- data/examples/worlds.yml +9 -0
- data/lib/activeworlds_ffi.rb +2077 -0
- metadata +99 -0
data/History.txt
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
This gem is licensed under the MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2009 Adam Ingram-Goble
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10
|
+
|
11
|
+
Because this is software related to the Active Worlds, Inc. platform that the license for the specific version of their SDK this software is coupled to is included here.
|
12
|
+
|
13
|
+
==================
|
14
|
+
|
15
|
+
The Active Worlds License BY USING THE ACTIVE WORLDS SDK MODULE OR THE ACTIVE WORLDS API ITSELF, AS PART OF, OR IN CONJUNCTION WITH, APPLICATIONS DEVELOPED, DISTRIBUTED OR IMPLEMENTED BY YOU OR ON YOUR BEHALF, YOU ARE CONSENTING TO BE BOUND BY THIS AGREEMENT, BY THE APPLICABLE PROVISIONS OF THE LICENSE AGREEMENT OF THE ACTIVE WORLDS SOFTWARE. IF YOU DO NOT AGREE, DO NOT USE THE ACTIVE WORLDS SDK MODULE OR THE ACTIVE WORLDS API ITSELF.
|
16
|
+
|
17
|
+
ACTIVE WORLDS SDK LICENSE AGREEMENT. This Agreement sets forth the terms and conditions of use of the Active Worlds software that enables use of Active Worlds by other applications ("SDK Module") and the Active Worlds API itself (hereafter collectively or separately referred to as "Active Worlds SDK")
|
18
|
+
|
19
|
+
GRANT OF LICENSE. Subject to the provisions contained herein, Activeworlds Inc. hereby grants to you a non-exclusive, non- transferable license (without the right to sublicense) to use the Active Worlds SDK as part of, or in conjunction with, Applications developed, distributed or implemented by you or on your behalf (the "SDK Applications"). This license does not grant you any right to any version enhancement update, or to a continuous availability of the Active Worlds SDK and the functionality of the Active Worlds End User Software (The "Software"), or to any support or telephone assistance. Activeworlds Inc. may revise or cease to provide the Active Worlds SDK, the Software or its functionality or any part thereof including without limitation, loss of compatibility, denial of access to the functionality of the Software or the Active Worlds Network from any SDK Application, from time to time without notice.
|
20
|
+
|
21
|
+
SOME LIMITATIONS. You may not use the Active Worlds SDK to: (a) modify, translate, reverse engineer, decompile, disassemble (except and solely to the extent an applicable statute expressly and specifically prohibits such restrictions), or create derivative works of the Active Worlds Software and network; (b) create applications for unlawful or illegal purposes or activities; MISSION CRITICAL AND CONTENT SENSITIVE APPLICATIONS. Do not create, distribute or otherwise use any SDK Application which uses or relies on the Active Worlds Software, the Active Worlds network, the Activeworlds Inc. websites, including but not limited to, message boards, directories, databases, ("Active Worlds Services and Information") or any other program, information or service whatsoever related thereto for "Mission Critical" or "Content Sensitive" applications and use. "Content Sensitive" shall mean any information or data you do not wish to be freely accessible and generally available to Internet users. "Mission Critical" application and use shall mean applications and use that may result in damage if failed, for any reason whatsoever including without limitation, for fraud, eavesdropping, electronic trespassing, sniffing, spoofing, imposturing, breaking passwords, harassment, for reaching erroneous address or recipient, or out of negligence.
|
22
|
+
|
23
|
+
NO WARRANTY. The Active Worlds SDK is available on an "AS IS" basis, without warranty of any kind, including without limitation the warranties it is free of defects, merchantable, fit for a particular purpose or non- infringing. The entire risk as to the quality and performance of the Active Worlds SDK is borne by you. Should the Active Worlds SDK prove defective or inaccurate or should the Active Worlds SDK cease to operate, as the case may be you and not Activeworlds Inc. or its suppliers assume the entire cost of any damage, service and repair. This disclaimer of warranty constitutes an essential part of the agreement.
|
24
|
+
|
25
|
+
TERM AND TERMINATION. This license shall continue for a year or until terminated, whichever is first. The license will terminate automatically with no delay, if (1) you fail to comply with the limitations described herein; or (2) Activeworlds Inc. gave you a 72 hours prior notice of termination; or (3) Activeworlds Inc. posted a notice of termination on the Activeworlds Inc. website; or (4) you have reached the Copies Limit. Upon termination of this License you agree to immediately destroy all copies of the SDK Applications in your possession and not to use the Active Worlds SDK for SDK Applications, without a special license from Activeworlds Inc.
|
26
|
+
|
27
|
+
LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR OTHERWISE, SHALL ACTIVEWORLDS Inc. BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, LOSS OF POTENTIAL REVENUES, LOSS OF BUSINESS OPPORTUNITIES, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES. IN NO EVENT WILL ACTIVEWORLDS Inc. BE LIABLE FOR ANY DAMAGES, EVEN IF ACTIVEWORLDS Inc. HAD BEEN INFORMED OR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION AND EXCLUSION MAY NOT APPLY TO YOU.
|
28
|
+
|
29
|
+
RIGHTS. Title, ownership rights, and intellectual property rights in the Active Worlds Software and the Active Worlds SDK shall remain in Activeworlds Inc. The Active Worlds Software and the Active Worlds SDK is protected by copyright and other intellectual property laws and by international treaties. Title and related rights in the content accessed through the Active Worlds Software or the Active Worlds SDK is the property of the applicable content owner and is protected by applicable law. The license granted under this Agreement gives you no rights to such content.
|
30
|
+
|
31
|
+
MISCELLANEOUS. This Agreement represents the complete agreement and understanding concerning the license granted hereunder and may be amended only in writing executed by both parties. This Agreement shall be governed by Massachusetts law, excluding conflict of law provisions (except to the extent applicable law, if any, provides otherwise). This license is granted to you personally and you agree not to assign your rights herein. Any attempted assignment by you shall be null and void. If any provision of this Agreement is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
32
|
+
|
33
|
+
SPECIAL LICENSE. Any use of the Active Worlds SDK which is not detailed in this License Agreement is prohibited without a special License from Activeworlds Inc.
|
data/PostInstall.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
= activeworlds-ffi
|
2
|
+
|
3
|
+
== Description
|
4
|
+
|
5
|
+
A Ruby/FFI wrapper for the Active Worlds, Inc. SDK providing for the rapid
|
6
|
+
creation and deployment of "bots".
|
7
|
+
|
8
|
+
== Requirements
|
9
|
+
|
10
|
+
You must have the Active Worlds SDK (currently only the linux version, build
|
11
|
+
77), and the ffi gem version 0.3.5 installed. The SDK must be on your
|
12
|
+
LD_LIBRARY_PATH. This is a 32-bit only library because of the AW SDK, and so
|
13
|
+
for linking purposes you must have 32-bit versions of all libraries used, in
|
14
|
+
particular libstdc++.so.6 (if you have a different c++ lib, change the name in
|
15
|
+
lib/activeworlds_ffi.rb).
|
16
|
+
|
17
|
+
Also, you may need to modify your SELinux settings in order for the aw_sdk
|
18
|
+
library to be loaded.
|
19
|
+
|
20
|
+
Check the gem install directory for examples of bots built with this library.
|
21
|
+
|
data/README.txt
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
= activeworlds-ffi
|
2
|
+
|
3
|
+
== Description
|
4
|
+
|
5
|
+
A Ruby/FFI wrapper for the Active Worlds, Inc. SDK providing for the rapid creation and deployment of "bots".
|
6
|
+
|
7
|
+
== Requirements
|
8
|
+
|
9
|
+
You must have the Active Worlds SDK (currently only the linux version, build 77), and the ffi gem version 0.3.5 installed. The SDK must be on your LD_LIBRARY_PATH. This is a 32-bit only library because of the AW SDK, and so for linking purposes you must have 32-bit versions of all libraries used, in particular libstdc++.so.6 (if you have a different c++ lib, change the name in lib/activeworlds_ffi.rb).
|
10
|
+
|
11
|
+
== Examples
|
12
|
+
|
13
|
+
See the examples directory in the gem to see full examples. A simple activity tracking bot is provided there. It is based on a nice support library that handles a number of events such as disconnects, and asynchronous creation, login, and entrance of batches of bots.
|
14
|
+
|
15
|
+
For ease though, here is a translation of the Active Worlds sample hello bot.
|
16
|
+
|
17
|
+
#! /usr/bin/env ruby19
|
18
|
+
require 'rubygems'
|
19
|
+
require 'activeworlds_ffi'
|
20
|
+
|
21
|
+
include ActiveworldsFFI
|
22
|
+
|
23
|
+
def handle_avatar_add
|
24
|
+
s = "Hello #{aw_string(AW_AVATAR_NAME)}! I'm the broken record."
|
25
|
+
# we're using a console message instead of aw_say(s) since that might be annoying
|
26
|
+
aw_string_set(AW_CONSOLE_MESSAGE, s)
|
27
|
+
aw_console_message(aw_int(AW_AVATAR_SESSION))
|
28
|
+
puts(s)
|
29
|
+
end
|
30
|
+
|
31
|
+
if ARGV.nil? || ARGV.size < 3
|
32
|
+
puts("Usage: hello.rb citizen_id privilege_password world")
|
33
|
+
exit(1)
|
34
|
+
end
|
35
|
+
|
36
|
+
# initialize Active Worlds API
|
37
|
+
rc = aw_init(AW_BUILD)
|
38
|
+
if( rc != RC_SUCCESS )
|
39
|
+
printf("Unable to initialize API (reason %d)\n", rc)
|
40
|
+
exit( 1 )
|
41
|
+
end
|
42
|
+
|
43
|
+
# assign the proc to a constant so that it never gets garbage collected
|
44
|
+
AVATAR_ADD_HANDLER = Proc.new { handle_avatar_add }
|
45
|
+
|
46
|
+
# install handler for avatar_add event
|
47
|
+
aw_event_set(AW_EVENT_AVATAR_ADD, AVATAR_ADD_HANDLER)
|
48
|
+
|
49
|
+
# create bot instance
|
50
|
+
rc = aw_create("atlantis.activeworlds.com", 5870, nil);
|
51
|
+
if rc != RC_SUCCESS
|
52
|
+
printf "Unable to create bot instance (reason %d)\n", rc
|
53
|
+
exit 1
|
54
|
+
end
|
55
|
+
|
56
|
+
# log bot into the universe
|
57
|
+
aw_int_set AW_LOGIN_OWNER, ARGV[0].to_i
|
58
|
+
aw_string_set AW_LOGIN_PRIVILEGE_PASSWORD, ARGV[1]
|
59
|
+
aw_string_set AW_LOGIN_APPLICATION, "SDK Sample Application #1"
|
60
|
+
aw_string_set AW_LOGIN_NAME, "GreeterBot"
|
61
|
+
rc = aw_login
|
62
|
+
if rc != RC_SUCCESS
|
63
|
+
printf("Unable to login (reason %d)\n", rc)
|
64
|
+
exit(1)
|
65
|
+
end
|
66
|
+
|
67
|
+
# log bot into the world named on the command line
|
68
|
+
rc = aw_enter (ARGV[2]);
|
69
|
+
if (rc != RC_SUCCESS)
|
70
|
+
printf("Unable to enter world (reason %d)\n", rc)
|
71
|
+
exit(1)
|
72
|
+
end
|
73
|
+
|
74
|
+
# announce our position in the world
|
75
|
+
aw_int_set(AW_MY_X, 1000) #/* 1W */
|
76
|
+
aw_int_set(AW_MY_Z, 1000) #/* 1N */
|
77
|
+
aw_int_set(AW_MY_YAW, 2250) #/* face towards GZ */
|
78
|
+
rc = aw_state_change
|
79
|
+
if rc != RC_SUCCESS
|
80
|
+
printf "Unable to change state (reason %d)\n", rc
|
81
|
+
exit 1
|
82
|
+
end
|
83
|
+
|
84
|
+
# /* main event loop */
|
85
|
+
while aw_wait(-1) == RC_SUCCESS
|
86
|
+
end
|
87
|
+
|
88
|
+
# /* close everything down */
|
89
|
+
aw_destroy
|
90
|
+
aw_term
|
91
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{activeworlds_ffi}
|
5
|
+
s.version = "4.2.77.3"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Adam Ingram-Goble"]
|
9
|
+
s.date = %q{2009-08-08}
|
10
|
+
s.description = %q{Ruby FFI based bindings for the ActiveWorlds.com SDK.}
|
11
|
+
s.email = %q{adamaig@gmail.com}
|
12
|
+
s.extra_rdoc_files = ["README.txt", "LICENSE"]
|
13
|
+
s.files = Dir['lib/**/*.rb'] + Dir['examples/**/*'] + ["History.txt", "README.txt", "LICENSE", "PostInstall.txt", "activeworlds_ffi.gemspec"]
|
14
|
+
s.has_rdoc = true
|
15
|
+
s.homepage = %q{http://github.com/adamaig/activeworlds-ffi}
|
16
|
+
s.rdoc_options = ["--charset=UTF-8", "--title='ActiveWorlds FFI -- ActiveWorlds SDK applications in Ruby'"]
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
s.rubyforge_project = %q{activeworlds_ffi}
|
19
|
+
s.rubygems_version = %q{1.3.5}
|
20
|
+
s.summary = %q{Ruby FFI based bindings for the ActiveWorlds.com SDK, and some support files for making applications simple.}
|
21
|
+
s.post_install_message = `cat PostInstall.txt`
|
22
|
+
s.add_dependency('ffi', "= 0.3.5")
|
23
|
+
end
|
@@ -0,0 +1,1185 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'yaml'
|
3
|
+
require 'bot_logger'
|
4
|
+
require 'activeworlds_ffi'
|
5
|
+
|
6
|
+
class BaseBot
|
7
|
+
extend ActiveworldsFFI
|
8
|
+
include ActiveworldsFFI
|
9
|
+
|
10
|
+
attr_accessor :params
|
11
|
+
def self.bots
|
12
|
+
@@bots
|
13
|
+
end
|
14
|
+
def self.config_worlds
|
15
|
+
@@config[:world_groups]
|
16
|
+
end
|
17
|
+
def self.wait(msec)
|
18
|
+
aw_wait msec
|
19
|
+
end
|
20
|
+
|
21
|
+
# Expects a yaml file that defines the values for
|
22
|
+
#
|
23
|
+
def self.configure(config_options,logger=nil)
|
24
|
+
@@config = config_options
|
25
|
+
@@configured = true
|
26
|
+
@@log = logger || BotLogger.new({:appname=>'base_bot'})
|
27
|
+
aw_init AW_BUILD
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.class_setup
|
31
|
+
@@init_run = true
|
32
|
+
@@bots ||= {:instances =>[], :events =>{}, :callbacks =>{}}
|
33
|
+
set_disconnect_handlers
|
34
|
+
set_create_handlers
|
35
|
+
end
|
36
|
+
|
37
|
+
def login(name, owner_id, privilege_pass, application_name)
|
38
|
+
aw_string_set(AW_LOGIN_NAME, name)
|
39
|
+
aw_int_set(AW_LOGIN_OWNER, owner_id)
|
40
|
+
aw_string_set(AW_LOGIN_PRIVILEGE_PASSWORD, privilege_pass)
|
41
|
+
aw_string_set(AW_LOGIN_APPLICATION, application_name) if ! application_name.empty?
|
42
|
+
aw_login
|
43
|
+
end
|
44
|
+
|
45
|
+
def enter(world_name)
|
46
|
+
@params[:world_name] = world_name
|
47
|
+
aw_enter(world_name)
|
48
|
+
end
|
49
|
+
|
50
|
+
def delete
|
51
|
+
warn "DELETING INSTANCE FOR #{@params[:world_name]}"
|
52
|
+
set_self_as_instance
|
53
|
+
aw_destroy
|
54
|
+
@@bots[:instances].delete self
|
55
|
+
@bot_ptr = nil
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.set_disconnect_handlers
|
59
|
+
set_event_handler :AW_EVENT_WORLD_DISCONNECT, Proc.new {
|
60
|
+
bot = current_instance
|
61
|
+
unless bot.nil?
|
62
|
+
a = bot.attributes_for(:AW_EVENT_WORLD_DISCONNECT)
|
63
|
+
bot.warn "AW_EVENT_WORLD_DISCONNECT | #{rc_msg(a[:AW_DISCONNECT_REASON])}"
|
64
|
+
bot.params[:connection] = :RC_CONNECTION_LOST
|
65
|
+
end
|
66
|
+
}
|
67
|
+
set_event_handler :AW_EVENT_UNIVERSE_DISCONNECT, Proc.new {
|
68
|
+
bot = current_instance
|
69
|
+
unless bot.nil?
|
70
|
+
a = bot.attributes_for(:AW_EVENT_UNIVERSE_DISCONNECT)
|
71
|
+
bot.warn "AW_EVENT_UNIVERSE_DISCONNECT | #{rc_msg(a[:AW_DISCONNECT_REASON])}"
|
72
|
+
bot.params[:connection] = :RC_CONNECTION_LOST
|
73
|
+
end
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.set_create_handlers
|
78
|
+
set_callback_handler :AW_CALLBACK_CREATE, Proc.new {|rc|
|
79
|
+
bot = current_instance
|
80
|
+
unless bot.nil?
|
81
|
+
a = bot.attributes_for(:AW_CALLBACK_CREATE)
|
82
|
+
bot.info "AW_CALLBACK_CREATE | #{rc_sym rc} | #{bot.params[:world_name]}"
|
83
|
+
rc = rc_sym(rc)
|
84
|
+
case rc
|
85
|
+
when :RC_SUCCESS
|
86
|
+
aw_bool_set(AW_ENTER_GLOBAL, @@config[:global_bot])
|
87
|
+
bot.login(@@config[:login_name], @@config[:bot_owner_id], @@config[:password], @@config[:application_name])
|
88
|
+
else
|
89
|
+
bot.warn "CREATE BOT FAILURE | Failed to create the #{@@config[:application_name]} bot: #{rc} : #{rc_msg rc}"
|
90
|
+
end
|
91
|
+
end
|
92
|
+
}
|
93
|
+
set_callback_handler :AW_CALLBACK_LOGIN, Proc.new {|rc|
|
94
|
+
bot = current_instance
|
95
|
+
unless bot.nil?
|
96
|
+
a = bot.attributes_for(:AW_CALLBACK_LOGIN)
|
97
|
+
rc = rc_sym(rc)
|
98
|
+
case rc
|
99
|
+
when :RC_SUCCESS
|
100
|
+
bot.info "AW_CALLBACK_LOGIN | #{rc}"
|
101
|
+
bot.enter(bot.params[:world_name])
|
102
|
+
else
|
103
|
+
bot.warn "AW_CALLBACK_LOGIN | #{rc} | #{rc_msg(rc)}"
|
104
|
+
bot.delete
|
105
|
+
end
|
106
|
+
end
|
107
|
+
}
|
108
|
+
set_callback_handler :AW_CALLBACK_ENTER, Proc.new {|rc|
|
109
|
+
bot = current_instance
|
110
|
+
unless bot.nil?
|
111
|
+
a = bot.attributes_for(:AW_CALLBACK_ENTER)
|
112
|
+
rc = rc_sym(rc)
|
113
|
+
bot.params[:connection] = rc
|
114
|
+
bot.info "AW_CALLBACK_ENTER | #{rc} | #{a[:AW_WORLD_NAME]}"
|
115
|
+
case rc
|
116
|
+
when :RC_NO_SUCH_WORLD
|
117
|
+
bot.delete
|
118
|
+
end
|
119
|
+
end
|
120
|
+
}
|
121
|
+
end
|
122
|
+
|
123
|
+
def debug(str); @@log.debug "#{@params[:world_name]} | #{str}" ; end
|
124
|
+
def info(str); @@log.info "#{@params[:world_name]} | #{str}" ; end
|
125
|
+
def warn(str); @@log.warn "#{@params[:world_name]} | #{str}" ; end
|
126
|
+
def error(str); @@log.error "#{@params[:world_name]} | #{str}" ; end
|
127
|
+
def fatal(str); @@log.fatal "#{@params[:world_name]} | #{str}" ; end
|
128
|
+
def logger(); @@log ; end
|
129
|
+
def self.logger; @@log ; end
|
130
|
+
|
131
|
+
def initialize(world_name)
|
132
|
+
unless @@configured
|
133
|
+
raise RuntimeError.new( "You must #{self.class}.config(config_filename) before creating any instances!!!")
|
134
|
+
end
|
135
|
+
@@init_run ||= false
|
136
|
+
unless @@init_run
|
137
|
+
self.class.class_setup
|
138
|
+
end
|
139
|
+
@bot_ptr = FFI::MemoryPointer.new(:pointer)
|
140
|
+
@params = {:world_name => world_name, :bot_ptr => @bot_ptr, :events => {}, :callbacks => {}}
|
141
|
+
@@bots[:instances].push self
|
142
|
+
aw_create( @@config[:host], @@config[:port], @bot_ptr)
|
143
|
+
info "initialized new bot for #{world_name}"
|
144
|
+
end
|
145
|
+
|
146
|
+
def self.for_world(world_name)
|
147
|
+
bot = new(world_name)
|
148
|
+
bot
|
149
|
+
end
|
150
|
+
|
151
|
+
def self.start_worlds_by_batch(world_stack)
|
152
|
+
while !world_stack.empty?
|
153
|
+
startup_batch = world_stack.slice!(0,15)
|
154
|
+
startup_batch.each do |world|
|
155
|
+
for_world(world)
|
156
|
+
end
|
157
|
+
wait(200)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
def self.current_instance
|
162
|
+
mem_ptr = aw_instance
|
163
|
+
@@bots[:instances].detect do |bot|
|
164
|
+
bot.params[:bot_ptr].read_pointer.address == mem_ptr.address
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
def current_instance
|
169
|
+
self.class.current_instance
|
170
|
+
end
|
171
|
+
|
172
|
+
def bot_c_pointer
|
173
|
+
params[:bot_ptr].read_pointer
|
174
|
+
end
|
175
|
+
|
176
|
+
def set_instance(target_bot)
|
177
|
+
aw_instance_set target_bot.bot_c_pointer
|
178
|
+
end
|
179
|
+
|
180
|
+
def set_self_as_instance
|
181
|
+
aw_instance_set bot_c_pointer
|
182
|
+
end
|
183
|
+
|
184
|
+
def self.set_callback_handler(callback, handler)
|
185
|
+
@@bots[:callbacks][callback] = handler
|
186
|
+
aw_callback_set AW_CALLBACK_ENUM[callback], @@bots[:callbacks][callback]
|
187
|
+
end
|
188
|
+
|
189
|
+
def set_callback_handler(callback, handler)
|
190
|
+
set_self_as_instance
|
191
|
+
@@bots[:callbacks][callback] = handler
|
192
|
+
aw_instance_callback_set AW_CALLBACK_ENUM[callback], @@bots[:callbacks][callback]
|
193
|
+
end
|
194
|
+
|
195
|
+
def self.set_event_handler(event, handler)
|
196
|
+
@@bots[:events][event] = handler
|
197
|
+
aw_event_set AW_EVENT_ATTRIBUTE_ENUM[event], @@bots[:events][event]
|
198
|
+
end
|
199
|
+
|
200
|
+
#
|
201
|
+
# This sets a bot instance handler as opposed to the general callback
|
202
|
+
# that can be set with the class method
|
203
|
+
#
|
204
|
+
# def log_avatar_add
|
205
|
+
# set_event_handler :AW_EVENT_AVATAR_ADD, Proc.new {
|
206
|
+
# bot = self.class.current_instance
|
207
|
+
# if bot.nil?
|
208
|
+
# bot.warn "couldn't find current bot"
|
209
|
+
# else
|
210
|
+
# a = bot.attributes_for(:AW_EVENT_AVATAR_ADD)
|
211
|
+
# bot.info "ENTER | #{a[:AW_AVATAR_NAME]} | #{a[:AW_AVATAR_SESSION]}" +
|
212
|
+
# " | #{a[:AW_AVATAR_X]} | #{a[:AW_AVATAR_Y]} | #{a[:AW_AVATAR_Z]}" +
|
213
|
+
# " | #{a[:AW_AVATAR_YAW]}"
|
214
|
+
# end
|
215
|
+
# }
|
216
|
+
# end
|
217
|
+
def set_event_handler(event, handler)
|
218
|
+
set_self_as_instance
|
219
|
+
@params[:events][event] = handler
|
220
|
+
aw_instance_event_set AW_EVENT_ATTRIBUTE_ENUM[event], @params[:events][event]
|
221
|
+
end
|
222
|
+
|
223
|
+
def attributes_for(callback_or_event)
|
224
|
+
aw_params = {}
|
225
|
+
unless @@attrs_available_to[callback_or_event].nil?
|
226
|
+
@@attrs_available_to[callback_or_event].each do |aw_attr|
|
227
|
+
aw_params[aw_attr] = aw_attribute_value(aw_attr)
|
228
|
+
end
|
229
|
+
end
|
230
|
+
aw_params
|
231
|
+
end
|
232
|
+
|
233
|
+
def aw_attribute_value(attribute)
|
234
|
+
attribute_type = AwSDK_ATTRIBUTE_TYPE_MAP[attribute]
|
235
|
+
attribute_const = AW_ATTRIBUTE_ENUM[attribute]
|
236
|
+
case attribute_type
|
237
|
+
when :bool
|
238
|
+
aw_bool(attribute_const)
|
239
|
+
when :float
|
240
|
+
aw_float(attribute_const)
|
241
|
+
when :int
|
242
|
+
aw_int(attribute_const)
|
243
|
+
when :string
|
244
|
+
aw_string(attribute_const)
|
245
|
+
when :data
|
246
|
+
len = FFI::Buffer.new(:int)
|
247
|
+
data = aw_data(attribute_const, len)
|
248
|
+
if 0 < len.get_uint(0)
|
249
|
+
data.get_bytes(0,len.get_uint(0))
|
250
|
+
else
|
251
|
+
""
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
# nil arguments mean that the corresponding attribute isn't set/changed
|
257
|
+
def state_change(options)
|
258
|
+
aw_int_set(AW_MY_X, x) unless options[:x].nil?
|
259
|
+
aw_int_set(AW_MY_Y, y) unless options[:y].nil?
|
260
|
+
aw_int_set(AW_MY_Z, z) unless options[:z].nil?
|
261
|
+
aw_int_set(AW_MY_YAW, yaw) unless options[:yaw].nil?
|
262
|
+
aw_int_set(AW_MY_TYPE, type) unless options[:type].nil?
|
263
|
+
aw_int_set(AW_MY_GESTURE, gesture) unless options[:gesture].nil?
|
264
|
+
aw_int_set(AW_MY_PITCH, pitch) unless options[:pitch].nil?
|
265
|
+
aw_int_set(AW_MY_STATE, state) unless options[:state].nil?
|
266
|
+
aw_state_change
|
267
|
+
end
|
268
|
+
|
269
|
+
# Wraps aw_console_message. Options are :red, :blue, :green, :bold, :italics
|
270
|
+
def console_message(session_id, message, options={})
|
271
|
+
aw_int_set(AW_CONSOLE_RED, options[:red] || 0)
|
272
|
+
aw_int_set(AW_CONSOLE_BLUE, options[:blue] || 0)
|
273
|
+
aw_int_set(AW_CONSOLE_GREEN, options[:green] || 0)
|
274
|
+
aw_bool_set(AW_CONSOLE_BOLD, options[:bold] || false)
|
275
|
+
aw_bool_set(AW_CONSOLE_ITALICS, options[:italics] || false)
|
276
|
+
aw_string_set(AW_CONSOLE_MESSAGE, message)
|
277
|
+
aw_console_message(session_id)
|
278
|
+
end
|
279
|
+
|
280
|
+
# Wraps aw_teleport. Options are :world, :x, :y, :z, :yaw, :warp
|
281
|
+
def teleport(session_id, options={})
|
282
|
+
aw_string_set(AW_TELEPORT_WORLD, options[:world] || "")
|
283
|
+
aw_int_set(AW_TELEPORT_X, options[:x] || 0)
|
284
|
+
aw_int_set(AW_TELEPORT_Y, options[:y] || 0)
|
285
|
+
aw_int_set(AW_TELEPORT_Z, options[:z] || 0)
|
286
|
+
aw_int_set(AW_TELEPORT_YAW, options[:yaw] || 0)
|
287
|
+
aw_bool_set(AW_TELEPORT_WARP, options[:warp] || false)
|
288
|
+
aw_teleport(session_id)
|
289
|
+
end
|
290
|
+
|
291
|
+
def world_object_change(object_update)
|
292
|
+
aw_int_set(AW_OBJECT_ID, object_update[:AW_OBJECT_ID])
|
293
|
+
aw_int_set(AW_OBJECT_TYPE, object_update[:AW_OBJECT_TYPE] || AW_OBJECT_TYPE_V3)
|
294
|
+
aw_string_set(AW_OBJECT_DESCRIPTION, object_update[:AW_OBJECT_DESCRIPTION])
|
295
|
+
aw_string_set(AW_OBJECT_ACTION, object_update[:AW_OBJECT_ACTION])
|
296
|
+
aw_string_set(AW_OBJECT_MODEL, object_update[:AW_OBJECT_MODEL])
|
297
|
+
aw_int_set(AW_OBJECT_OLD_NUMBER, 0)
|
298
|
+
aw_int_set(AW_OBJECT_OLD_X, 0)
|
299
|
+
aw_int_set(AW_OBJECT_OLD_Z, 0)
|
300
|
+
aw_int_set(AW_OBJECT_X, object_update[:AW_OBJECT_X])
|
301
|
+
aw_int_set(AW_OBJECT_Y, object_update[:AW_OBJECT_Y])
|
302
|
+
aw_int_set(AW_OBJECT_Z, object_update[:AW_OBJECT_Z])
|
303
|
+
aw_int_set(AW_OBJECT_YAW, object_update[:AW_OBJECT_YAW])
|
304
|
+
aw_int_set(AW_OBJECT_TILT, object_update[:AW_OBJECT_TILT])
|
305
|
+
aw_int_set(AW_OBJECT_ROLL, object_update[:AW_OBJECT_ROLL])
|
306
|
+
aw_int_set(AW_OBJECT_OWNER, object_update[:AW_OBJECT_OWNER])
|
307
|
+
aw_object_change
|
308
|
+
end
|
309
|
+
|
310
|
+
def url_send(session, url, target_window=nil)
|
311
|
+
aw_url_send(session, url, target_window)
|
312
|
+
end
|
313
|
+
|
314
|
+
def add_world_ejection(citizen_id, session, expiration=0, comment="Account disabled")
|
315
|
+
aw_int_set( AW_EJECTION_TYPE, AW_EJECT_BY_CITIZEN )
|
316
|
+
aw_int_set(AW_EJECTION_ADDRESS, citizen_id)
|
317
|
+
aw_int_set(AW_EJECTION_EXPIRATION_TIME, expiration.to_i)
|
318
|
+
aw_string_set(AW_EJECTION_COMMENT, comment)
|
319
|
+
rc = rc_sym(aw_world_ejection_add)
|
320
|
+
if :RC_SUCCESS == rc
|
321
|
+
world_eject session
|
322
|
+
end
|
323
|
+
rc
|
324
|
+
end
|
325
|
+
|
326
|
+
# eject session for 1 second to force out of world
|
327
|
+
def world_eject(session,time=1)
|
328
|
+
aw_int_set AW_EJECT_SESSION, session
|
329
|
+
aw_int_set AW_EJECT_DURATION, time
|
330
|
+
aw_world_eject
|
331
|
+
end
|
332
|
+
|
333
|
+
def hud_create(options={})
|
334
|
+
# debug("CREATING HUD ELEMENT WITH | #{options.sort.inspect}")
|
335
|
+
aw_int_set(AW_HUD_ELEMENT_TYPE, options[:AW_HUD_ELEMENT_TYPE])
|
336
|
+
aw_string_set(AW_HUD_ELEMENT_TEXT, options[:AW_HUD_ELEMENT_TEXT])
|
337
|
+
aw_float_set(AW_HUD_ELEMENT_OPACITY, options[:AW_HUD_ELEMENT_OPACITY])
|
338
|
+
aw_int_set(AW_HUD_ELEMENT_ID, options[:AW_HUD_ELEMENT_ID])
|
339
|
+
aw_int_set(AW_HUD_ELEMENT_SESSION, options[:AW_HUD_ELEMENT_SESSION])
|
340
|
+
aw_int_set(AW_HUD_ELEMENT_ORIGIN, options[:AW_HUD_ELEMENT_ORIGIN])
|
341
|
+
aw_int_set(AW_HUD_ELEMENT_X, options[:AW_HUD_ELEMENT_X])
|
342
|
+
aw_int_set(AW_HUD_ELEMENT_Y, options[:AW_HUD_ELEMENT_Y])
|
343
|
+
aw_int_set(AW_HUD_ELEMENT_Z, options[:AW_HUD_ELEMENT_Z])
|
344
|
+
aw_int_set(AW_HUD_ELEMENT_FLAGS, options[:AW_HUD_ELEMENT_FLAGS])
|
345
|
+
aw_int_set(AW_HUD_ELEMENT_COLOR, options[:AW_HUD_ELEMENT_COLOR])
|
346
|
+
aw_int_set(AW_HUD_ELEMENT_SIZE_X, options[:AW_HUD_ELEMENT_SIZE_X])
|
347
|
+
aw_int_set(AW_HUD_ELEMENT_SIZE_Y, options[:AW_HUD_ELEMENT_SIZE_Y])
|
348
|
+
aw_int_set(AW_HUD_ELEMENT_TEXTURE_OFFSET_X, options[:AW_HUD_ELEMENT_TEXTURE_OFFSET_X])
|
349
|
+
aw_int_set(AW_HUD_ELEMENT_TEXTURE_OFFSET_Y, options[:AW_HUD_ELEMENT_TEXTURE_OFFSET_Y])
|
350
|
+
rc_sym(aw_hud_create)
|
351
|
+
end
|
352
|
+
|
353
|
+
# This class allows is for the generation of RubyActiveworld specific errors
|
354
|
+
class AwSDKError < RuntimeError; end
|
355
|
+
|
356
|
+
module AwSDKSupport
|
357
|
+
# call-seq:
|
358
|
+
# rc_sym ruby_aw_init => :RC_SUCCESS
|
359
|
+
#
|
360
|
+
# This returns the symbol corresponding to the return code name
|
361
|
+
def rc_sym(rc_int)
|
362
|
+
RETURN_CODE_MAP[rc_int][:error_symbol]
|
363
|
+
end
|
364
|
+
|
365
|
+
# call-seq:
|
366
|
+
# rc_msg ruby_aw_init => "Success: Return value from an asynchronous call..."
|
367
|
+
# rc_msg some_failing_call => "This call failed due to ..."
|
368
|
+
#
|
369
|
+
# This looks up return code's corresponding explanation.
|
370
|
+
def rc_msg(rc_int_or_sym)
|
371
|
+
(rc_int_or_sym.is_a?(Symbol) ? RETURN_CODE_SYMBOL_MAP : RETURN_CODE_MAP)[rc_int_or_sym][:error_explanation]
|
372
|
+
end
|
373
|
+
|
374
|
+
def raise_on_error(rc_int)
|
375
|
+
if :RC_SUCCESS != rc_sym(rc_int)
|
376
|
+
throw AwSDKError.new( "#{rc_int} : #{rc_msg(rc_int)}")
|
377
|
+
end
|
378
|
+
end
|
379
|
+
|
380
|
+
def rc_int(rc_sym)
|
381
|
+
RETURN_CODE_SYMBOL_MAP[rc_sym][:rc]
|
382
|
+
end
|
383
|
+
|
384
|
+
AwSDK_ATTRIBUTE_TYPE_MAP = {
|
385
|
+
:AW_AVATAR_LOCK => :bool,
|
386
|
+
:AW_CELL_COMBINE => :bool,
|
387
|
+
:AW_CITIZEN_BETA => :bool,
|
388
|
+
:AW_CITIZEN_CAV_ENABLED => :bool,
|
389
|
+
:AW_CITIZEN_ENABLED => :bool,
|
390
|
+
:AW_CITIZEN_PAV_ENABLED => :bool,
|
391
|
+
:AW_CITIZEN_TRIAL => :bool,
|
392
|
+
:AW_CONSOLE_BOLD => :bool,
|
393
|
+
:AW_CONSOLE_ITALICS => :bool,
|
394
|
+
:AW_ENTER_GLOBAL => :bool,
|
395
|
+
:AW_LICENSE_ALLOW_TOURISTS => :bool,
|
396
|
+
:AW_LICENSE_HIDDEN => :bool,
|
397
|
+
:AW_LICENSE_PLUGINS => :bool,
|
398
|
+
:AW_LICENSE_VOIP => :bool,
|
399
|
+
:AW_QUERY_COMPLETE => :bool,
|
400
|
+
:AW_SERVER_ENABLED => :bool,
|
401
|
+
:AW_SERVER_MORE => :bool,
|
402
|
+
:AW_TELEPORT_WARP => :bool,
|
403
|
+
:AW_TERRAIN_COMPLETE => :bool,
|
404
|
+
:AW_URL_TARGET_3D => :bool,
|
405
|
+
:AW_USERLIST_MORE => :bool,
|
406
|
+
:AW_WORLDLIST_MORE => :bool,
|
407
|
+
:AW_CAV_DEFINITION => :data,
|
408
|
+
:AW_OBJECT_DATA => :data,
|
409
|
+
:AW_TERRAIN_NODE_HEIGHTS => :data,
|
410
|
+
:AW_TERRAIN_NODE_TEXTURES => :data,
|
411
|
+
:AW_HUD_ELEMENT_OPACITY => :float,
|
412
|
+
:AW_ATTRIB_SENDER_SESSION => :int,
|
413
|
+
:AW_AVATAR_ADDRESS => :int,
|
414
|
+
:AW_AVATAR_ANGLE => :int,
|
415
|
+
:AW_AVATAR_CITIZEN => :int,
|
416
|
+
:AW_AVATAR_DISTANCE => :int,
|
417
|
+
:AW_AVATAR_FLAGS => :int,
|
418
|
+
:AW_AVATAR_GESTURE => :int,
|
419
|
+
:AW_AVATAR_PITCH => :int,
|
420
|
+
:AW_AVATAR_PITCH_DELTA => :int,
|
421
|
+
:AW_AVATAR_PRIVILEGE => :int,
|
422
|
+
:AW_AVATAR_SESSION => :int,
|
423
|
+
:AW_AVATAR_STATE => :int,
|
424
|
+
:AW_AVATAR_TYPE => :int,
|
425
|
+
:AW_AVATAR_VERSION => :int,
|
426
|
+
:AW_AVATAR_WORLD_INSTANCE => :int,
|
427
|
+
:AW_AVATAR_X => :int,
|
428
|
+
:AW_AVATAR_Y => :int,
|
429
|
+
:AW_AVATAR_Y_DELTA => :int,
|
430
|
+
:AW_AVATAR_YAW => :int,
|
431
|
+
:AW_AVATAR_YAW_DELTA => :int,
|
432
|
+
:AW_AVATAR_Z => :int,
|
433
|
+
:AW_BOTGRAM_FROM => :int,
|
434
|
+
:AW_BOTGRAM_TO => :int,
|
435
|
+
:AW_BOTGRAM_TYPE => :int,
|
436
|
+
:AW_BOTMENU_FROM_SESSION => :int,
|
437
|
+
:AW_BOTMENU_TO_SESSION => :int,
|
438
|
+
:AW_CAMERA_LOCATION_SESSION => :int,
|
439
|
+
:AW_CAMERA_LOCATION_TYPE => :int,
|
440
|
+
:AW_CAMERA_TARGET_SESSION => :int,
|
441
|
+
:AW_CAMERA_TARGET_TYPE => :int,
|
442
|
+
:AW_CAV_CITIZEN => :int,
|
443
|
+
:AW_CAV_SESSION => :int,
|
444
|
+
:AW_CELL_ITERATOR => :int,
|
445
|
+
:AW_CELL_SEQUENCE => :int,
|
446
|
+
:AW_CELL_SIZE => :int,
|
447
|
+
:AW_CELL_X => :int,
|
448
|
+
:AW_CELL_Z => :int,
|
449
|
+
:AW_CHAT_SESSION => :int,
|
450
|
+
:AW_CHAT_TYPE => :int,
|
451
|
+
:AW_CITIZEN_BOT_LIMIT => :int,
|
452
|
+
:AW_CITIZEN_EXPIRATION_TIME => :int,
|
453
|
+
:AW_CITIZEN_IMMIGRATION_TIME => :int,
|
454
|
+
:AW_CITIZEN_LAST_ADDRESS => :int,
|
455
|
+
:AW_CITIZEN_LAST_LOGIN => :int,
|
456
|
+
:AW_CITIZEN_NUMBER => :int,
|
457
|
+
:AW_CITIZEN_PRIVACY => :int,
|
458
|
+
:AW_CITIZEN_TIME_LEFT => :int,
|
459
|
+
:AW_CITIZEN_TOTAL_TIME => :int,
|
460
|
+
:AW_CLICKED_SESSION => :int,
|
461
|
+
:AW_CONSOLE_BLUE => :int,
|
462
|
+
:AW_CONSOLE_GREEN => :int,
|
463
|
+
:AW_CONSOLE_RED => :int,
|
464
|
+
:AW_DISCONNECT_REASON => :int,
|
465
|
+
:AW_EJECT_DURATION => :int,
|
466
|
+
:AW_EJECT_SESSION => :int,
|
467
|
+
:AW_EJECTION_ADDRESS => :int,
|
468
|
+
:AW_EJECTION_CREATION_TIME => :int,
|
469
|
+
:AW_EJECTION_EXPIRATION_TIME => :int,
|
470
|
+
:AW_EJECTION_TYPE => :int,
|
471
|
+
:AW_ENTITY_FLAGS => :int,
|
472
|
+
:AW_ENTITY_ID => :int,
|
473
|
+
:AW_ENTITY_MODEL_NUM => :int,
|
474
|
+
:AW_ENTITY_OWNER_CITIZEN => :int,
|
475
|
+
:AW_ENTITY_OWNER_SESSION => :int,
|
476
|
+
:AW_ENTITY_PITCH => :int,
|
477
|
+
:AW_ENTITY_ROLL => :int,
|
478
|
+
:AW_ENTITY_STATE => :int,
|
479
|
+
:AW_ENTITY_TYPE => :int,
|
480
|
+
:AW_ENTITY_X => :int,
|
481
|
+
:AW_ENTITY_Y => :int,
|
482
|
+
:AW_ENTITY_YAW => :int,
|
483
|
+
:AW_ENTITY_Z => :int,
|
484
|
+
:AW_HUD_ELEMENT_CLICK_X => :int,
|
485
|
+
:AW_HUD_ELEMENT_CLICK_Y => :int,
|
486
|
+
:AW_HUD_ELEMENT_CLICK_Z => :int,
|
487
|
+
:AW_HUD_ELEMENT_COLOR => :int,
|
488
|
+
:AW_HUD_ELEMENT_FLAGS => :int,
|
489
|
+
:AW_HUD_ELEMENT_ID => :int,
|
490
|
+
:AW_HUD_ELEMENT_ORIGIN => :int,
|
491
|
+
:AW_HUD_ELEMENT_SESSION => :int,
|
492
|
+
:AW_HUD_ELEMENT_SIZE_X => :int,
|
493
|
+
:AW_HUD_ELEMENT_SIZE_Y => :int,
|
494
|
+
:AW_HUD_ELEMENT_SIZE_Z => :int,
|
495
|
+
:AW_HUD_ELEMENT_TEXTURE_OFFSET_X => :int,
|
496
|
+
:AW_HUD_ELEMENT_TEXTURE_OFFSET_Y => :int,
|
497
|
+
:AW_HUD_ELEMENT_TYPE => :int,
|
498
|
+
:AW_HUD_ELEMENT_X => :int,
|
499
|
+
:AW_HUD_ELEMENT_Y => :int,
|
500
|
+
:AW_HUD_ELEMENT_Z => :int,
|
501
|
+
:AW_LICENSE_CREATION_TIME => :int,
|
502
|
+
:AW_LICENSE_EXPIRATION_TIME => :int,
|
503
|
+
:AW_LICENSE_LAST_ADDRESS => :int,
|
504
|
+
:AW_LICENSE_LAST_START => :int,
|
505
|
+
:AW_LICENSE_RANGE => :int,
|
506
|
+
:AW_LICENSE_USERS => :int,
|
507
|
+
:AW_LOGIN_OWNER => :int,
|
508
|
+
:AW_MY_GESTURE => :int,
|
509
|
+
:AW_MY_PITCH => :int,
|
510
|
+
:AW_MY_STATE => :int,
|
511
|
+
:AW_MY_TYPE => :int,
|
512
|
+
:AW_MY_X => :int,
|
513
|
+
:AW_MY_Y => :int,
|
514
|
+
:AW_MY_YAW => :int,
|
515
|
+
:AW_MY_Z => :int,
|
516
|
+
:AW_OBJECT_BUILD_TIMESTAMP => :int,
|
517
|
+
:AW_OBJECT_CALLBACK_REFERENCE => :int,
|
518
|
+
:AW_OBJECT_DATA => :data,
|
519
|
+
:AW_OBJECT_ID => :int,
|
520
|
+
:AW_OBJECT_NUMBER => :int,
|
521
|
+
:AW_OBJECT_OLD_NUMBER => :int,
|
522
|
+
:AW_OBJECT_OLD_X => :int,
|
523
|
+
:AW_OBJECT_OLD_Z => :int,
|
524
|
+
:AW_OBJECT_OWNER => :int,
|
525
|
+
:AW_OBJECT_ROLL => :int,
|
526
|
+
:AW_OBJECT_SESSION => :int,
|
527
|
+
:AW_OBJECT_SYNC => :int,
|
528
|
+
:AW_OBJECT_TILT => :int,
|
529
|
+
:AW_OBJECT_TYPE => :int,
|
530
|
+
:AW_OBJECT_X => :int,
|
531
|
+
:AW_OBJECT_Y => :int,
|
532
|
+
:AW_OBJECT_YAW => :int,
|
533
|
+
:AW_OBJECT_Z => :int,
|
534
|
+
:AW_SERVER_BUILD => :int,
|
535
|
+
:AW_SERVER_EXPIRATION => :int,
|
536
|
+
:AW_SERVER_ID => :int,
|
537
|
+
:AW_SERVER_INSTANCE => :int,
|
538
|
+
:AW_SERVER_MAX_USERS => :int,
|
539
|
+
:AW_SERVER_OBJECTS => :int,
|
540
|
+
:AW_SERVER_SIZE => :int,
|
541
|
+
:AW_SERVER_START_RC => :int,
|
542
|
+
:AW_SERVER_STATE => :int,
|
543
|
+
:AW_SERVER_TERRAIN_NODES => :int,
|
544
|
+
:AW_SERVER_USERS => :int,
|
545
|
+
:AW_TELEPORT_X => :int,
|
546
|
+
:AW_TELEPORT_Y => :int,
|
547
|
+
:AW_TELEPORT_YAW => :int,
|
548
|
+
:AW_TELEPORT_Z => :int,
|
549
|
+
:AW_TERRAIN_NODE_HEIGHT_COUNT => :int,
|
550
|
+
:AW_TERRAIN_NODE_SIZE => :int,
|
551
|
+
:AW_TERRAIN_NODE_TEXTURE_COUNT => :int,
|
552
|
+
:AW_TERRAIN_NODE_X => :int,
|
553
|
+
:AW_TERRAIN_NODE_Z => :int,
|
554
|
+
:AW_TERRAIN_PAGE_X => :int,
|
555
|
+
:AW_TERRAIN_PAGE_Z => :int,
|
556
|
+
:AW_TERRAIN_SEQUENCE => :int,
|
557
|
+
:AW_TERRAIN_VERSION_NEEDED => :int,
|
558
|
+
:AW_TERRAIN_X => :int,
|
559
|
+
:AW_TERRAIN_Z => :int,
|
560
|
+
:AW_TOOLBAR_ID => :int,
|
561
|
+
:AW_TOOLBAR_SESSION => :int,
|
562
|
+
:AW_USERLIST_ADDRESS => :int,
|
563
|
+
:AW_USERLIST_CITIZEN => :int,
|
564
|
+
:AW_USERLIST_ID => :int,
|
565
|
+
:AW_USERLIST_PRIVILEGE => :int,
|
566
|
+
:AW_USERLIST_STATE => :int,
|
567
|
+
:AW_WORLDLIST_RATING => :int,
|
568
|
+
:AW_WORLDLIST_STATUS => :int,
|
569
|
+
:AW_WORLDLIST_USERS => :int,
|
570
|
+
:AW_AVATAR_NAME => :string,
|
571
|
+
:AW_BOTGRAM_FROM_NAME => :string,
|
572
|
+
:AW_BOTMENU_FROM_NAME => :string,
|
573
|
+
:AW_CAMERA_LOCATION_OBJECT => :string,
|
574
|
+
:AW_CAMERA_TARGET_OBJECT => :string,
|
575
|
+
:AW_CHAT_MESSAGE => :string,
|
576
|
+
:AW_CITIZEN_COMMENT => :string,
|
577
|
+
:AW_CITIZEN_EMAIL => :string,
|
578
|
+
:AW_CITIZEN_NAME => :string,
|
579
|
+
:AW_CITIZEN_PASSWORD => :string,
|
580
|
+
:AW_CITIZEN_PRIVILEGE_PASSWORD => :string,
|
581
|
+
:AW_CITIZEN_URL => :string,
|
582
|
+
:AW_CLICKED_NAME => :string,
|
583
|
+
:AW_CONSOLE_MESSAGE => :string,
|
584
|
+
:AW_EJECTION_COMMENT => :string,
|
585
|
+
:AW_HUD_ELEMENT_TEXT => :string,
|
586
|
+
:AW_LICENSE_COMMENT => :string,
|
587
|
+
:AW_LICENSE_EMAIL => :string,
|
588
|
+
:AW_LICENSE_NAME => :string,
|
589
|
+
:AW_LICENSE_PASSWORD => :string,
|
590
|
+
:AW_LOGIN_APPLICATION => :string,
|
591
|
+
:AW_LOGIN_NAME => :string,
|
592
|
+
:AW_LOGIN_PASSWORD => :string,
|
593
|
+
:AW_LOGIN_PRIVILEGE_NAME => :string,
|
594
|
+
:AW_LOGIN_PRIVILEGE_PASSWORD => :string,
|
595
|
+
:AW_OBJECT_ACTION => :string,
|
596
|
+
:AW_OBJECT_DESCRIPTION => :string,
|
597
|
+
:AW_OBJECT_MODEL => :string,
|
598
|
+
:AW_PLUGIN_STRING => :string,
|
599
|
+
:AW_SERVER_CARETAKERS => :string,
|
600
|
+
:AW_SERVER_NAME => :string,
|
601
|
+
:AW_SERVER_PASSWORD => :string,
|
602
|
+
:AW_SERVER_REGISTRY => :string,
|
603
|
+
:AW_SOUND_NAME => :string,
|
604
|
+
:AW_TELEPORT_WORLD => :string,
|
605
|
+
:AW_URL_POST => :string,
|
606
|
+
:AW_URL_TARGET => :string,
|
607
|
+
:AW_USERLIST_EMAIL => :string,
|
608
|
+
:AW_USERLIST_NAME => :string,
|
609
|
+
:AW_USERLIST_WORLD => :string,
|
610
|
+
:AW_WORLDLIST_NAME => :string,
|
611
|
+
:AW_BOTGRAM_TEXT => :string,
|
612
|
+
:AW_BOTMENU_ANSWER => :string,
|
613
|
+
:AW_BOTMENU_QUESTION => :string,
|
614
|
+
:AW_URL_NAME => :string,
|
615
|
+
:AW_UNIVERSE_ALLOW_BOTS_CAV => :bool,
|
616
|
+
:AW_UNIVERSE_ALLOW_TOURISTS => :bool,
|
617
|
+
:AW_UNIVERSE_ALLOW_TOURISTS_CAV => :bool,
|
618
|
+
:AW_UNIVERSE_CITIZEN_CHANGES_ALLOWED => :bool,
|
619
|
+
:AW_UNIVERSE_REGISTRATION_REQUIRED => :bool,
|
620
|
+
:AW_UNIVERSE_USER_LIST_ENABLED => :bool,
|
621
|
+
:AW_UNIVERSE_OBJECT_PASSWORD => :data,
|
622
|
+
:AW_UNIVERSE_BROWSER_BETA => :int,
|
623
|
+
:AW_UNIVERSE_BROWSER_MINIMUM => :int,
|
624
|
+
:AW_UNIVERSE_BROWSER_RELEASE => :int,
|
625
|
+
:AW_UNIVERSE_BROWSER_RELEASE_22 => :int ,
|
626
|
+
:AW_UNIVERSE_BUILD_NUMBER => :int,
|
627
|
+
:AW_UNIVERSE_OBJECT_REFRESH => :int,
|
628
|
+
:AW_UNIVERSE_REGISTER_METHOD => :int,
|
629
|
+
:AW_UNIVERSE_TIME => :int,
|
630
|
+
:AW_UNIVERSE_WORLD_BETA => :int,
|
631
|
+
:AW_UNIVERSE_WORLD_MINIMUM => :int,
|
632
|
+
:AW_UNIVERSE_WORLD_RELEASE => :int,
|
633
|
+
:AW_UNIVERSE_ANNUAL_CHARGE => :string,
|
634
|
+
:AW_UNIVERSE_CAV_PATH => :string,
|
635
|
+
:AW_UNIVERSE_CAV_PATH2 => :string,
|
636
|
+
:AW_UNIVERSE_MONTHLY_CHARGE => :string,
|
637
|
+
:AW_UNIVERSE_NAME => :string,
|
638
|
+
:AW_UNIVERSE_NOTEPAD_URL => :string,
|
639
|
+
:AW_UNIVERSE_SEARCH_URL => :string,
|
640
|
+
:AW_UNIVERSE_WELCOME_MESSAGE => :string,
|
641
|
+
:AW_UNIVERSE_WORLD_START => :string,
|
642
|
+
:AW_WORLD_ALLOW_3_AXIS_ROTATION => :bool,
|
643
|
+
:AW_WORLD_ALLOW_AVATAR_COLLISION => :bool,
|
644
|
+
:AW_WORLD_ALLOW_CITIZEN_WHISPER => :bool,
|
645
|
+
:AW_WORLD_ALLOW_FLYING => :bool,
|
646
|
+
:AW_WORLD_ALLOW_OBJECT_SELECT => :bool,
|
647
|
+
:AW_WORLD_ALLOW_PASSTHRU => :bool,
|
648
|
+
:AW_WORLD_ALLOW_TELEPORT => :bool,
|
649
|
+
:AW_WORLD_ALLOW_TOURIST_BUILD => :bool,
|
650
|
+
:AW_WORLD_ALLOW_TOURIST_WHISPER => :bool,
|
651
|
+
:AW_WORLD_ALWAYS_SHOW_NAMES => :bool,
|
652
|
+
:AW_WORLD_AMBIENT_LIGHT_BLUE => :int,
|
653
|
+
:AW_WORLD_AMBIENT_LIGHT_GREEN => :int,
|
654
|
+
:AW_WORLD_AMBIENT_LIGHT_RED => :int,
|
655
|
+
:AW_WORLD_AVATAR_REFRESH_RATE => :int,
|
656
|
+
:AW_WORLD_BACKDROP => :string,
|
657
|
+
:AW_WORLD_BOTMENU_URL => :string,
|
658
|
+
:AW_WORLD_BOTS_RIGHT => :string,
|
659
|
+
:AW_WORLD_BUILD_CAPABILITY => :bool,
|
660
|
+
:AW_WORLD_BUILD_NUMBER => :int,
|
661
|
+
:AW_WORLD_BUILD_RIGHT => :string,
|
662
|
+
:AW_WORLD_BUOYANCY => :float,
|
663
|
+
:AW_WORLD_CAMERA_ZOOM => :float,
|
664
|
+
:AW_WORLD_CARETAKER_CAPABILITY => :bool,
|
665
|
+
:AW_WORLD_CAV_OBJECT_PASSWORD => :string,
|
666
|
+
:AW_WORLD_CAV_OBJECT_PATH => :string,
|
667
|
+
:AW_WORLD_CAV_OBJECT_REFRESH => :int,
|
668
|
+
:AW_WORLD_CELL_LIMIT => :int,
|
669
|
+
:AW_WORLD_CHAT_DISABLE_URL_CLICKS => :bool,
|
670
|
+
:AW_WORLD_CLOUDS_LAYER1_MASK => :string,
|
671
|
+
:AW_WORLD_CLOUDS_LAYER1_OPACITY => :int,
|
672
|
+
:AW_WORLD_CLOUDS_LAYER1_SPEED_X => :float,
|
673
|
+
:AW_WORLD_CLOUDS_LAYER1_SPEED_Z => :float,
|
674
|
+
:AW_WORLD_CLOUDS_LAYER1_TEXTURE => :string,
|
675
|
+
:AW_WORLD_CLOUDS_LAYER1_TILE => :float,
|
676
|
+
:AW_WORLD_CLOUDS_LAYER2_MASK => :string,
|
677
|
+
:AW_WORLD_CLOUDS_LAYER2_OPACITY => :int,
|
678
|
+
:AW_WORLD_CLOUDS_LAYER2_SPEED_X => :float,
|
679
|
+
:AW_WORLD_CLOUDS_LAYER2_SPEED_Z => :float,
|
680
|
+
:AW_WORLD_CLOUDS_LAYER2_TEXTURE => :string,
|
681
|
+
:AW_WORLD_CLOUDS_LAYER2_TILE => :float,
|
682
|
+
:AW_WORLD_CLOUDS_LAYER3_MASK => :string,
|
683
|
+
:AW_WORLD_CLOUDS_LAYER3_OPACITY => :int,
|
684
|
+
:AW_WORLD_CLOUDS_LAYER3_SPEED_X => :float,
|
685
|
+
:AW_WORLD_CLOUDS_LAYER3_SPEED_Z => :float,
|
686
|
+
:AW_WORLD_CLOUDS_LAYER3_TEXTURE => :string,
|
687
|
+
:AW_WORLD_CLOUDS_LAYER3_TILE => :float,
|
688
|
+
:AW_WORLD_CREATION_TIMESTAMP => :int,
|
689
|
+
:AW_WORLD_DISABLE_AVATAR_LIST => :bool,
|
690
|
+
:AW_WORLD_DISABLE_CHAT => :bool,
|
691
|
+
:AW_WORLD_DISABLE_CREATE_URL => :bool,
|
692
|
+
:AW_WORLD_DISABLE_MULTIPLE_MEDIA => :bool,
|
693
|
+
:AW_WORLD_DISABLE_SHADOWS => :bool,
|
694
|
+
:AW_WORLD_EJECT_CAPABILITY => :bool,
|
695
|
+
:AW_WORLD_EJECT_RIGHT => :string,
|
696
|
+
:AW_WORLD_EMINENT_DOMAIN_CAPABILITY => :bool,
|
697
|
+
:AW_WORLD_EMINENT_DOMAIN_RIGHT => :string,
|
698
|
+
:AW_WORLD_ENABLE_BUMP_EVENT => :bool,
|
699
|
+
:AW_WORLD_ENABLE_CAMERA_COLLISION => :bool,
|
700
|
+
:AW_WORLD_ENABLE_CAV => :int,
|
701
|
+
:AW_WORLD_ENABLE_PAV => :bool,
|
702
|
+
:AW_WORLD_ENABLE_REFERER => :bool,
|
703
|
+
:AW_WORLD_ENABLE_SYNC_EVENTS => :bool,
|
704
|
+
:AW_WORLD_ENABLE_TERRAIN => :bool,
|
705
|
+
:AW_WORLD_ENTER_RIGHT => :string,
|
706
|
+
:AW_WORLD_ENTRY_POINT => :string,
|
707
|
+
:AW_WORLD_EXPIRATION => :int,
|
708
|
+
:AW_WORLD_FOG_BLUE => :int,
|
709
|
+
:AW_WORLD_FOG_ENABLE => :bool,
|
710
|
+
:AW_WORLD_FOG_GREEN => :int,
|
711
|
+
:AW_WORLD_FOG_MAXIMUM => :int,
|
712
|
+
:AW_WORLD_FOG_MINIMUM => :int,
|
713
|
+
:AW_WORLD_FOG_RED => :int,
|
714
|
+
:AW_WORLD_FOG_TINTED => :bool,
|
715
|
+
:AW_WORLD_FRICTION => :float,
|
716
|
+
:AW_WORLD_GRAVITY => :float,
|
717
|
+
:AW_WORLD_GROUND => :string,
|
718
|
+
:AW_WORLD_HOME_PAGE => :string,
|
719
|
+
:AW_WORLD_KEYWORDS => :string,
|
720
|
+
:AW_WORLD_LIGHT_BLUE => :int,
|
721
|
+
:AW_WORLD_LIGHT_DRAW_BRIGHT => :bool,
|
722
|
+
:AW_WORLD_LIGHT_DRAW_FRONT => :bool,
|
723
|
+
:AW_WORLD_LIGHT_DRAW_SIZE => :int,
|
724
|
+
:AW_WORLD_LIGHT_GREEN => :int,
|
725
|
+
:AW_WORLD_LIGHT_MASK => :string,
|
726
|
+
:AW_WORLD_LIGHT_RED => :int,
|
727
|
+
:AW_WORLD_LIGHT_SOURCE_COLOR => :int,
|
728
|
+
:AW_WORLD_LIGHT_SOURCE_USE_COLOR => :bool,
|
729
|
+
:AW_WORLD_LIGHT_TEXTURE => :string,
|
730
|
+
:AW_WORLD_LIGHT_X => :float,
|
731
|
+
:AW_WORLD_LIGHT_Y => :float,
|
732
|
+
:AW_WORLD_LIGHT_Z => :float,
|
733
|
+
:AW_WORLD_MAX_LIGHT_RADIUS => :int,
|
734
|
+
:AW_WORLD_MAX_USERS => :int,
|
735
|
+
:AW_WORLD_MINIMUM_VISIBILITY => :int,
|
736
|
+
:AW_WORLD_MOVER_EMPTY_RESET_TIMEOUT => :int,
|
737
|
+
:AW_WORLD_MOVER_USED_RESET_TIMEOUT => :int,
|
738
|
+
:AW_WORLD_NAME => :string,
|
739
|
+
:AW_WORLD_OBJECT_COUNT => :int,
|
740
|
+
:AW_WORLD_OBJECT_PASSWORD => :data,
|
741
|
+
:AW_WORLD_OBJECT_PATH => :string,
|
742
|
+
:AW_WORLD_OBJECT_REFRESH => :int,
|
743
|
+
:AW_WORLD_PUBLIC_SPEAKER_CAPABILITY => :bool,
|
744
|
+
:AW_WORLD_PUBLIC_SPEAKER_RIGHT => :string,
|
745
|
+
:AW_WORLD_RATING => :int,
|
746
|
+
:AW_WORLD_REPEATING_GROUND => :bool,
|
747
|
+
:AW_WORLD_RESTRICTED_RADIUS => :int,
|
748
|
+
:AW_WORLD_SIZE => :int,
|
749
|
+
:AW_WORLD_SKY_BOTTOM_BLUE => :int,
|
750
|
+
:AW_WORLD_SKY_BOTTOM_GREEN => :int,
|
751
|
+
:AW_WORLD_SKY_BOTTOM_RED => :int,
|
752
|
+
:AW_WORLD_SKY_EAST_BLUE => :int,
|
753
|
+
:AW_WORLD_SKY_EAST_GREEN => :int,
|
754
|
+
:AW_WORLD_SKY_EAST_RED => :int,
|
755
|
+
:AW_WORLD_SKY_NORTH_BLUE => :int,
|
756
|
+
:AW_WORLD_SKY_NORTH_GREEN => :int,
|
757
|
+
:AW_WORLD_SKY_NORTH_RED => :int,
|
758
|
+
:AW_WORLD_SKY_SOUTH_BLUE => :int,
|
759
|
+
:AW_WORLD_SKY_SOUTH_GREEN => :int,
|
760
|
+
:AW_WORLD_SKY_SOUTH_RED => :int,
|
761
|
+
:AW_WORLD_SKY_TOP_BLUE => :int,
|
762
|
+
:AW_WORLD_SKY_TOP_GREEN => :int,
|
763
|
+
:AW_WORLD_SKY_TOP_RED => :int,
|
764
|
+
:AW_WORLD_SKY_WEST_BLUE => :int,
|
765
|
+
:AW_WORLD_SKY_WEST_GREEN => :int,
|
766
|
+
:AW_WORLD_SKY_WEST_RED => :int,
|
767
|
+
:AW_WORLD_SKYBOX => :string,
|
768
|
+
:AW_WORLD_SLOPESLIDE_ENABLED => :bool,
|
769
|
+
:AW_WORLD_SLOPESLIDE_MAX_ANGLE => :float,
|
770
|
+
:AW_WORLD_SLOPESLIDE_MIN_ANGLE => :float,
|
771
|
+
:AW_WORLD_SOUND_AMBIENT => :string,
|
772
|
+
:AW_WORLD_SOUND_FOOTSTEP => :string,
|
773
|
+
:AW_WORLD_SOUND_WATER_ENTER => :string,
|
774
|
+
:AW_WORLD_SOUND_WATER_EXIT => :string,
|
775
|
+
:AW_WORLD_SPEAK_CAPABILITY => :bool,
|
776
|
+
:AW_WORLD_SPEAK_RIGHT => :string,
|
777
|
+
:AW_WORLD_SPECIAL_COMMANDS => :string,
|
778
|
+
:AW_WORLD_SPECIAL_COMMANDS_RIGHT => :string,
|
779
|
+
:AW_WORLD_SPECIAL_OBJECTS_RIGHT => :string,
|
780
|
+
:AW_WORLD_TERRAIN_AMBIENT => :float,
|
781
|
+
:AW_WORLD_TERRAIN_DIFFUSE => :float,
|
782
|
+
:AW_WORLD_TERRAIN_OFFSET => :float,
|
783
|
+
:AW_WORLD_TERRAIN_RIGHT => :string,
|
784
|
+
:AW_WORLD_TERRAIN_TIMESTAMP => :int,
|
785
|
+
:AW_WORLD_TITLE => :string,
|
786
|
+
:AW_WORLD_V4_OBJECTS_RIGHT => :string,
|
787
|
+
:AW_WORLD_WAIT_LIMIT => :int,
|
788
|
+
:AW_WORLD_WATER_BLUE => :int,
|
789
|
+
:AW_WORLD_WATER_BOTTOM_MASK => :string,
|
790
|
+
:AW_WORLD_WATER_BOTTOM_TEXTURE => :string,
|
791
|
+
:AW_WORLD_WATER_ENABLED => :bool,
|
792
|
+
:AW_WORLD_WATER_FRICTION => :float,
|
793
|
+
:AW_WORLD_WATER_GREEN => :int,
|
794
|
+
:AW_WORLD_WATER_LEVEL => :float,
|
795
|
+
:AW_WORLD_WATER_MASK => :string,
|
796
|
+
:AW_WORLD_WATER_OPACITY => :int,
|
797
|
+
:AW_WORLD_WATER_RED => :int,
|
798
|
+
:AW_WORLD_WATER_SPEED => :float,
|
799
|
+
:AW_WORLD_WATER_SURFACE_MOVE => :float,
|
800
|
+
:AW_WORLD_WATER_TEXTURE => :string,
|
801
|
+
:AW_WORLD_WATER_UNDER_TERRAIN => :bool,
|
802
|
+
:AW_WORLD_WATER_WAVE_MOVE => :float,
|
803
|
+
:AW_WORLD_WATER_VISIBILITY => :int,
|
804
|
+
:AW_WORLD_WELCOME_MESSAGE => :string,
|
805
|
+
:AW_WORLD_VOIP_CONFERENCE_GLOBAL => :bool,
|
806
|
+
:AW_WORLD_VOIP_MODERATE_GLOBAL => :bool,
|
807
|
+
:AW_WORLD_VOIP_RIGHT => :string
|
808
|
+
}
|
809
|
+
|
810
|
+
RETURN_CODE_MAP = {
|
811
|
+
0 => {:error_symbol => :RC_SUCCESS, :error_explanation => "Success: Return value from an asynchronous call: Request has been sent to the server.\nReturn value from a blocking call: Operation has completed successfully.\nWhen passed to a callback: Operation has completed successfully."},
|
812
|
+
1 => {:error_symbol => :RC_CITIZENSHIP_EXPIRED, :error_explanation => "Citizenship has expired: Citizenship of the owner has expired."},
|
813
|
+
2 => {:error_symbol => :RC_LAND_LIMIT_EXCEEDED, :error_explanation => "Land limit exceeded: Land limit of the universe would be exceeded if the world is started."},
|
814
|
+
3 => {:error_symbol => :RC_NO_SUCH_CITIZEN, :error_explanation => "No such citizen: No citizenship with a matching citizen number was found."},
|
815
|
+
5 => {:error_symbol => :RC_LICENSE_PASSWORD_CONTAINS_SPACE, :error_explanation => "License password contains space: Password cannot contain a space."},
|
816
|
+
6 => {:error_symbol => :RC_LICENSE_PASSWORD_TOO_LONG, :error_explanation => "License password too long: Password cannot be longer than 8 characters."},
|
817
|
+
7 => {:error_symbol => :RC_LICENSE_PASSWORD_TOO_SHORT, :error_explanation => "License password too short: Password must be at least 2 characters."},
|
818
|
+
8 => {:error_symbol => :RC_LICENSE_RANGE_TOO_LARGE, :error_explanation => "License range too large: Range must be smaller than 3275 hectometers. That is, at most 32750 coordinates N/S/W/E or 655000 meters across."},
|
819
|
+
9 => {:error_symbol => :RC_LICENSE_RANGE_TOO_SMALL, :error_explanation => "License range too small: Range must be larger than 0 hectometers. That is, at least 10 coordinates N/S/W/E or 200 meters across."},
|
820
|
+
10 => {:error_symbol => :RC_LICENSE_USERS_TOO_LARGE, :error_explanation => "License users too large: User limit cannot exceed 1024."},
|
821
|
+
11 => {:error_symbol => :RC_LICENSE_USERS_TOO_SMALL, :error_explanation => "License users too small: User limit must be larger than 0."},
|
822
|
+
13 => {:error_symbol => :RC_INVALID_PASSWORD, :error_explanation => "Invalid password: Unable to login due to invalid password."},
|
823
|
+
15 => {:error_symbol => :RC_LICENSE_WORLD_TOO_SHORT, :error_explanation => "License world too short: Name must be at least 2 characters."},
|
824
|
+
16 => {:error_symbol => :RC_LICENSE_WORLD_TOO_LONG, :error_explanation => "License world too long: Name cannot be longer than 8 characters."},
|
825
|
+
20 => {:error_symbol => :RC_INVALID_WORLD, :error_explanation => "Invalid world: Unable to start the world due to invalid name or password."},
|
826
|
+
21 => {:error_symbol => :RC_SERVER_OUTDATED, :error_explanation => "Server outdated: Server build either contains a serious flaw or is outdated and must be upgraded."},
|
827
|
+
22 => {:error_symbol => :RC_WORLD_ALREADY_STARTED, :error_explanation => "World already started: World has already been started at a different location."},
|
828
|
+
27 => {:error_symbol => :RC_NO_SUCH_WORLD, :error_explanation => "No such world: No world with a matching name has been started on the server."},
|
829
|
+
32 => {:error_symbol => :RC_UNAUTHORIZED, :error_explanation => "Unauthorized: Not authorized to perform the operation."},
|
830
|
+
33 => {:error_symbol => :RC_WORLD_ALREADY_EXISTS, :error_explanation => "World already exists: TODO: Might not be in use."},
|
831
|
+
34 => {:error_symbol => :RC_NO_SUCH_LICENSE, :error_explanation => "No such license: No license with a matching world name was found."},
|
832
|
+
57 => {:error_symbol => :RC_TOO_MANY_WORLDS, :error_explanation => "Too many worlds: Limit of started worlds in the universe would be exceeded if the world is started."},
|
833
|
+
58 => {:error_symbol => :RC_MUST_UPGRADE, :error_explanation => "Must upgrade: SDK build either contains a serious flaw or is outdated and must be upgraded."},
|
834
|
+
59 => {:error_symbol => :RC_BOT_LIMIT_EXCEEDED, :error_explanation => "Bot limit exceeded: Bot limit of the owner citizenship would be exceeded if the bot is logged in."},
|
835
|
+
61 => {:error_symbol => :RC_WORLD_EXPIRED, :error_explanation => "World expired: Unable to start world due to its license having expired."},
|
836
|
+
62 => {:error_symbol => :RC_CITIZEN_DOES_NOT_EXPIRE, :error_explanation => "Citizen does not expire: TODO: What is this used for?"},
|
837
|
+
64 => {:error_symbol => :RC_LICENSE_STARTS_WITH_NUMBER, :error_explanation => "License starts with number: Name cannot start with a number."},
|
838
|
+
66 => {:error_symbol => :RC_NO_SUCH_EJECTION, :error_explanation => "No such ejection: No ejection with a matching identifier was found."},
|
839
|
+
67 => {:error_symbol => :RC_NO_SUCH_SESSION, :error_explanation => "No such session: No user with a matching session number has entered the world."},
|
840
|
+
72 => {:error_symbol => :RC_WORLD_RUNNING, :error_explanation => "World running: World has already been started."},
|
841
|
+
73 => {:error_symbol => :RC_WORLD_NOT_SET, :error_explanation => "World not set: World to perform the operation on has not been set."},
|
842
|
+
74 => {:error_symbol => :RC_NO_SUCH_CELL, :error_explanation => "No such cell: No more cells left to enumerate."},
|
843
|
+
75 => {:error_symbol => :RC_NO_REGISTRY, :error_explanation => "No registry: Unable to start world due to missing or invalid registry."},
|
844
|
+
76 => {:error_symbol => :RC_CANT_OPEN_REGISTRY, :error_explanation => "Can't open registry"},
|
845
|
+
77 => {:error_symbol => :RC_CITIZEN_DISABLED, :error_explanation => "Citizen disabled: Citizenship of the owner has been disabled."},
|
846
|
+
78 => {:error_symbol => :RC_WORLD_DISABLED, :error_explanation => "World disabled: Unable to start world due to it having been disabled."},
|
847
|
+
85 => {:error_symbol => :RC_TELEGRAM_BLOCKED, :error_explanation => "Telegram blocked"},
|
848
|
+
88 => {:error_symbol => :RC_UNABLE_TO_UPDATE_TERRAIN, :error_explanation => "Unable to update terrain"},
|
849
|
+
100 => {:error_symbol => :RC_EMAIL_CONTAINS_INVALID_CHAR, :error_explanation => "Email contains invalid char: Email address contains one or more invalid characters."},
|
850
|
+
101 => {:error_symbol => :RC_EMAIL_ENDS_WITH_BLANK, :error_explanation => "Email ends with blank: Email address cannot end with a blank."},
|
851
|
+
101 => {:error_symbol => :RC_NO_SUCH_OBJECT, :error_explanation => "No such object: Unable to find the object to delete."},
|
852
|
+
102 => {:error_symbol => :RC_EMAIL_MISSING_DOT, :error_explanation => "Email missing dot: Email address must contain at least one '.'."},
|
853
|
+
102 => {:error_symbol => :RC_NOT_DELETE_OWNER, :error_explanation => "Not delete owner"},
|
854
|
+
103 => {:error_symbol => :RC_EMAIL_MISSING_AT, :error_explanation => "Email missing at: Email address must contain a '@'."},
|
855
|
+
104 => {:error_symbol => :RC_EMAIL_STARTS_WITH_BLANK, :error_explanation => "Email starts with blank: Email address cannot start with a blank."},
|
856
|
+
105 => {:error_symbol => :RC_EMAIL_TOO_LONG, :error_explanation => "Email too long: Email address cannot be longer than 50 characters."},
|
857
|
+
106 => {:error_symbol => :RC_EMAIL_TOO_SHORT, :error_explanation => "Email too short: Email address must be at least 8 characters or longer."},
|
858
|
+
107 => {:error_symbol => :RC_NAME_ALREADY_USED, :error_explanation => "Name already used: Citizenship with a matching name already exists."},
|
859
|
+
108 => {:error_symbol => :RC_NAME_CONTAINS_NONALPHANUMERIC_CHAR, :error_explanation => "Name contains nonalphanumeric character: Name contains invalid character(s)."},
|
860
|
+
109 => {:error_symbol => :RC_NAME_CONTAINS_INVALID_BLANK, :error_explanation => "Name contains invalid blank: Name contains invalid blank(s)."},
|
861
|
+
111 => {:error_symbol => :RC_NAME_ENDS_WITH_BLANK, :error_explanation => "Name ends with blank: Name cannot end with a blank."},
|
862
|
+
112 => {:error_symbol => :RC_NAME_TOO_LONG, :error_explanation => "Name too long: Name cannot be longer than 16 characters."},
|
863
|
+
113 => {:error_symbol => :RC_NAME_TOO_SHORT, :error_explanation => "Name too short: Name must be at least 2 characters."},
|
864
|
+
115 => {:error_symbol => :RC_PASSWORD_TOO_LONG, :error_explanation => "Password too long: Password cannot be longer than 12 characters."},
|
865
|
+
116 => {:error_symbol => :RC_PASSWORD_TOO_SHORT, :error_explanation => "Password too short: Password must be at least 4 characters."},
|
866
|
+
124 => {:error_symbol => :RC_UNABLE_TO_DELETE_CITIZEN, :error_explanation => "Unable to delete citizen: Unable to delete citizen due to a database problem."},
|
867
|
+
126 => {:error_symbol => :RC_NUMBER_ALREADY_USED, :error_explanation => "Number already used: Citizenship with a matching citizen number already exists."},
|
868
|
+
127 => {:error_symbol => :RC_NUMBER_OUT_OF_RANGE, :error_explanation => "Number out of range: Citizen number is larger than the auto-incremented field in the database."},
|
869
|
+
128 => {:error_symbol => :RC_PRIVILEGE_PASSWORD_IS_TOO_SHORT, :error_explanation => "Privilege password is too short: Privilege password must be either empty or at least 4 characters."},
|
870
|
+
129 => {:error_symbol => :RC_PRIVILEGE_PASSWORD_IS_TOO_LONG, :error_explanation => "Privilege password is too long: Password cannot be longer than 12 characters."},
|
871
|
+
203 => {:error_symbol => :RC_NOT_CHANGE_OWNER, :error_explanation => "Not change owner: Not permitted to change the owner of an object. It requires eminent domain or caretaker capability."},
|
872
|
+
204 => {:error_symbol => :RC_CANT_FIND_OLD_ELEMENT, :error_explanation => "Can't find old element: Unable to find the object to change."},
|
873
|
+
212 => {:error_symbol => :RC_IMPOSTER, :error_explanation => "Imposter: Unable to enter world due to masquerading as someone else."},
|
874
|
+
300 => {:error_symbol => :RC_ENCROACHES, :error_explanation => "Encroaches: Not allowed to encroach into another's property."},
|
875
|
+
301 => {:error_symbol => :RC_OBJECT_TYPE_INVALID, :error_explanation => "Object type invalid"},
|
876
|
+
303 => {:error_symbol => :RC_TOO_MANY_BYTES, :error_explanation => "Too many bytes: Cell limit would be exceeded."},
|
877
|
+
306 => {:error_symbol => :RC_UNREGISTERED_OBJECT, :error_explanation => "Unregistered object: Model name does not exist in the registry."},
|
878
|
+
308 => {:error_symbol => :RC_ELEMENT_ALREADY_EXISTS, :error_explanation => "Element already exists"},
|
879
|
+
309 => {:error_symbol => :RC_RESTRICTED_COMMAND, :error_explanation => "Restricted command"},
|
880
|
+
311 => {:error_symbol => :RC_OUT_OF_BOUNDS, :error_explanation => "Out of bounds"},
|
881
|
+
313 => {:error_symbol => :RC_RESTRICTED_OBJECT, :error_explanation => "Restricted object: Not allowed to build with 'z' objects in this world."},
|
882
|
+
314 => {:error_symbol => :RC_RESTRICTED_AREA, :error_explanation => "Restricted area: Not allowed to build within the restricted area of this world."},
|
883
|
+
401 => {:error_symbol => :RC_NOT_YET, :error_explanation => "Not yet: Would exceed the maximum number of operations per second."},
|
884
|
+
402 => {:error_symbol => :RC_TIMEOUT, :error_explanation => "Timeout: Synchronous operation timed out."},
|
885
|
+
404 => {:error_symbol => :RC_UNABLE_TO_CONTACT_UNIVERSE, :error_explanation => "Unable to contact universe: Unable to establish a connection to the universe server."},
|
886
|
+
439 => {:error_symbol => :RC_NO_CONNECTION, :error_explanation => "No connection: Connection to the server is down."},
|
887
|
+
444 => {:error_symbol => :RC_NOT_INITIALIZED, :error_explanation => "Not initialized: SDK API has not been initialized (by calling aw_init)."},
|
888
|
+
445 => {:error_symbol => :RC_NO_INSTANCE, :error_explanation => "No instance"},
|
889
|
+
448 => {:error_symbol => :RC_INVALID_ATTRIBUTE, :error_explanation => "Invalid attribute"},
|
890
|
+
449 => {:error_symbol => :RC_TYPE_MISMATCH, :error_explanation => "Type mismatch"},
|
891
|
+
450 => {:error_symbol => :RC_STRING_TOO_LONG, :error_explanation => "String too long"},
|
892
|
+
451 => {:error_symbol => :RC_READ_ONLY, :error_explanation => "Read only: Unable to set attribute due to it being read-only."},
|
893
|
+
453 => {:error_symbol => :RC_INVALID_INSTANCE, :error_explanation => "Invalid instance"},
|
894
|
+
454 => {:error_symbol => :RC_VERSION_MISMATCH, :error_explanation => "Version mismatch: Aw.h and Aw.dll (or libaw_sdk.so for Linux) are from different builds of the SDK."},
|
895
|
+
464 => {:error_symbol => :RC_QUERY_IN_PROGRESS, :error_explanation => "Query in progress: A property query is already in progress."},
|
896
|
+
466 => {:error_symbol => :RC_EJECTED, :error_explanation => "Ejected: Disconnected from world due to ejection."},
|
897
|
+
467 => {:error_symbol => :RC_NOT_WELCOME, :error_explanation => "Not welcome: Citizenship of the owner does not have bot rights in the world."},
|
898
|
+
471 => {:error_symbol => :RC_CONNECTION_LOST, :error_explanation => "Connection lost"},
|
899
|
+
474 => {:error_symbol => :RC_NOT_AVAILABLE, :error_explanation => "Not available"},
|
900
|
+
500 => {:error_symbol => :RC_CANT_RESOLVE_UNIVERSE_HOST, :error_explanation => "Can't resolve universe host"},
|
901
|
+
505 => {:error_symbol => :RC_INVALID_ARGUMENT, :error_explanation => "Invalid argument"},
|
902
|
+
514 => {:error_symbol => :RC_UNABLE_TO_UPDATE_CAV, :error_explanation => "Unable to update custom avatar"},
|
903
|
+
515 => {:error_symbol => :RC_UNABLE_TO_DELETE_CAV, :error_explanation => "Unable to delete custom avatar"},
|
904
|
+
516 => {:error_symbol => :RC_NO_SUCH_CAV, :error_explanation => "No such custom avatar"},
|
905
|
+
521 => {:error_symbol => :RC_WORLD_INSTANCE_ALREADY_EXISTS, :error_explanation => "World instance already exists"},
|
906
|
+
522 => {:error_symbol => :RC_WORLD_INSTANCE_INVALID, :error_explanation => "World instance invalid"},
|
907
|
+
523 => {:error_symbol => :RC_PLUGIN_NOT_AVAILABLE, :error_explanation => "Plugin not available"},
|
908
|
+
600 => {:error_symbol => :RC_DATABASE_ERROR, :error_explanation => "Database error"},
|
909
|
+
4995 => {:error_symbol => :RC_Z_BUF_ERROR, :error_explanation => "Buffer error (zlib) Not enough room in the output buffer."},
|
910
|
+
4996 => {:error_symbol => :RC_Z_MEM_ERROR, :error_explanation => "Memory error (zlib): Memory could not be allocated for processing."},
|
911
|
+
4997 => {:error_symbol => :RC_Z_DATA_ERROR, :error_explanation => "Data error (zlib): Input data was corrupted."}
|
912
|
+
}
|
913
|
+
|
914
|
+
RETURN_CODE_SYMBOL_MAP = begin
|
915
|
+
h = {}
|
916
|
+
RETURN_CODE_MAP.each_pair do |rc_int,hsh|
|
917
|
+
h.merge!({hsh[:error_symbol] => {:rc => rc_int, :error_explanation => hsh[:error_explanation]}})
|
918
|
+
end
|
919
|
+
h
|
920
|
+
end
|
921
|
+
|
922
|
+
def self.set_attributes_for(callback_or_event, *attributes)
|
923
|
+
@@attrs_available_to ||= {}
|
924
|
+
@@attrs_available_to[callback_or_event] = attributes
|
925
|
+
end
|
926
|
+
|
927
|
+
class << self
|
928
|
+
alias :callback_attributes_for :set_attributes_for
|
929
|
+
alias :event_attributes_for :set_attributes_for
|
930
|
+
end
|
931
|
+
|
932
|
+
callback_attributes_for :AW_CALLBACK_ADDRESS, :AW_AVATAR_SESSION, :AW_AVATAR_ADDRESS
|
933
|
+
callback_attributes_for :AW_CALLBACK_AVATAR_LOCATION, :AW_AVATAR_SESSION,
|
934
|
+
:AW_AVATAR_NAME, :AW_AVATAR_X, :AW_AVATAR_Y, :AW_AVATAR_Z, :AW_AVATAR_YAW, :AW_AVATAR_PITCH,
|
935
|
+
:AW_AVATAR_TYPE, :AW_AVATAR_GESTURE, :AW_AVATAR_STATE, :AW_AVATAR_VERSION,
|
936
|
+
:AW_AVATAR_CITIZEN, :AW_AVATAR_PRIVILEGE, :AW_AVATAR_LOCK, :AW_PLUGIN_STRING
|
937
|
+
callback_attributes_for :AW_CALLBACK_ADMIN_WORLD_RESULT,
|
938
|
+
:AW_SERVER_ID, :AW_SERVER_INSTANCE, :AW_SERVER_NAME
|
939
|
+
|
940
|
+
callback_attributes_for :AW_CALLBACK_ADMIN_WORLD_LIST, :AW_SERVER_ID
|
941
|
+
callback_attributes_for :AW_CALLBACK_ADMIN, :AW_SERVER_BUILD, :AW_WORLD_BUILD_NUMBER
|
942
|
+
|
943
|
+
callback_attributes_for :AW_CALLBACK_CELL_RESULT, :AW_CELL_ITERATOR
|
944
|
+
callback_attributes_for :AW_CALLBACK_CITIZEN_RESULT, :AW_CITIZEN_NUMBER
|
945
|
+
callback_attributes_for :AW_CALLBACK_CITIZEN_ATTRIBUTES,
|
946
|
+
:AW_CITIZEN_NUMBER, :AW_CITIZEN_NAME, :AW_CITIZEN_PASSWORD,
|
947
|
+
:AW_CITIZEN_EMAIL, :AW_CITIZEN_ENABLED, :AW_CITIZEN_BETA,
|
948
|
+
:AW_CITIZEN_TRIAL,
|
949
|
+
:AW_CITIZEN_CAV_ENABLED, :AW_CITIZEN_PAV_ENABLED,
|
950
|
+
:AW_CITIZEN_BOT_LIMIT, :AW_CITIZEN_COMMENT, :AW_CITIZEN_EXPIRATION_TIME,
|
951
|
+
:AW_CITIZEN_IMMIGRATION_TIME, :AW_CITIZEN_LAST_LOGIN,
|
952
|
+
:AW_CITIZEN_PRIVILEGE_PASSWORD, :AW_CITIZEN_PRIVACY,
|
953
|
+
:AW_CITIZEN_TOTAL_TIME, :AW_CITIZEN_URL
|
954
|
+
|
955
|
+
callback_attributes_for :AW_CALLBACK_ENTER, :AW_WORLD_NAME
|
956
|
+
|
957
|
+
callback_attributes_for :AW_CALLBACK_HUD_RESULT, :AW_HUD_ELEMENT_SESSION, :AW_HUD_ELEMENT_ID
|
958
|
+
|
959
|
+
callback_attributes_for :AW_CALLBACK_LICENSE_ATTRIBUTES,
|
960
|
+
:AW_LICENSE_PASSWORD, :AW_LICENSE_USERS, :AW_LICENSE_RANGE,
|
961
|
+
:AW_LICENSE_EMAIL, :AW_LICENSE_COMMENT, :AW_LICENSE_CREATION_TIME,
|
962
|
+
:AW_LICENSE_EXPIRATION_TIME, :AW_LICENSE_LAST_START,
|
963
|
+
:AW_LICENSE_LAST_ADDRESS, :AW_LICENSE_HIDDEN, :AW_LICENSE_ALLOW_TOURISTS,
|
964
|
+
:AW_LICENSE_VOIP, :AW_LICENSE_PLUGINS
|
965
|
+
|
966
|
+
callback_attributes_for :AW_CALLBACK_LOGIN, :AW_CITIZEN_BETA,
|
967
|
+
:AW_CITIZEN_CAV_ENABLED,
|
968
|
+
:AW_CITIZEN_NAME, :AW_CITIZEN_NUMBER,
|
969
|
+
:AW_CITIZEN_PAV_ENABLED,
|
970
|
+
:AW_CITIZEN_TIME_LEFT, :AW_LOGIN_PRIVILEGE_NAME
|
971
|
+
|
972
|
+
callback_attributes_for :AW_CALLBACK_OBJECT_RESULT, :AW_OBJECT_NUMBER,
|
973
|
+
:AW_OBJECT_ID, :AW_OBJECT_CALLBACK_REFERENCE, :AW_CELL_X, :AW_CELL_Z
|
974
|
+
callback_attributes_for :AW_CALLBACK_OBJECT_QUERY,
|
975
|
+
:AW_OBJECT_TYPE, :AW_OBJECT_ID, :AW_OBJECT_NUMBER, :AW_OBJECT_OWNER,
|
976
|
+
:AW_OBJECT_BUILD_TIMESTAMP, :AW_OBJECT_X, :AW_OBJECT_Y, :AW_OBJECT_Z,
|
977
|
+
:AW_OBJECT_YAW, :AW_OBJECT_TILT, :AW_OBJECT_ROLL, :AW_OBJECT_MODEL,
|
978
|
+
:AW_OBJECT_DESCRIPTION, :AW_OBJECT_ACTION, :AW_OBJECT_DATA
|
979
|
+
|
980
|
+
callback_attributes_for :AW_CALLBACK_QUERY, :AW_QUERY_COMPLETE
|
981
|
+
callback_attributes_for :AW_CALLBACK_TERRAIN_NEXT_RESULT, :AW_TERRAIN_COMPLETE
|
982
|
+
callback_attributes_for :AW_CALLBACK_TERRAIN_SET_RESULT, :AW_TERRAIN_X, :AW_TERRAIN_Z
|
983
|
+
|
984
|
+
callback_attributes_for :AW_CALLBACK_USER_LIST, :AW_USERLIST_MORE
|
985
|
+
callback_attributes_for :AW_CALLBACK_UNIVERSE_EJECTION, :AW_EJECTION_ADDRESS,
|
986
|
+
:AW_EJECTION_CREATION_TIME, :AW_EJECTION_EXPIRATION_TIME, :AW_EJECTION_COMMENT
|
987
|
+
|
988
|
+
callback_attributes_for :AW_CALLBACK_WORLD_LIST, :AW_WORLDLIST_MORE
|
989
|
+
callback_attributes_for :AW_CALLBACK_WORLD_EJECTION, :AW_EJECTION_TYPE,
|
990
|
+
:AW_EJECTION_ADDRESS, :AW_EJECTION_CREATION_TIME, :AW_EJECTION_EXPIRATION_TIME,
|
991
|
+
:AW_EJECTION_COMMENT
|
992
|
+
callback_attributes_for :AW_CALLBACK_WORLD_INSTANCE, :AW_AVATAR_CITIZEN, :AW_AVATAR_WORLD_INSTANCE
|
993
|
+
|
994
|
+
event_attributes_for :AW_EVENT_AVATAR_ADD, :AW_AVATAR_SESSION, :AW_AVATAR_NAME,
|
995
|
+
:AW_AVATAR_X, :AW_AVATAR_Y, :AW_AVATAR_Z, :AW_AVATAR_YAW, :AW_AVATAR_TYPE,
|
996
|
+
:AW_AVATAR_GESTURE, :AW_AVATAR_VERSION, :AW_AVATAR_CITIZEN, :AW_AVATAR_PRIVILEGE,
|
997
|
+
:AW_AVATAR_PITCH, :AW_AVATAR_STATE, :AW_PLUGIN_STRING
|
998
|
+
event_attributes_for :AW_EVENT_AVATAR_CHANGE, :AW_AVATAR_SESSION, :AW_AVATAR_NAME,
|
999
|
+
:AW_AVATAR_X, :AW_AVATAR_Y, :AW_AVATAR_Z, :AW_AVATAR_YAW, :AW_AVATAR_TYPE,
|
1000
|
+
:AW_AVATAR_GESTURE, :AW_AVATAR_PITCH, :AW_AVATAR_STATE, :AW_AVATAR_FLAGS,
|
1001
|
+
:AW_AVATAR_LOCK, :AW_PLUGIN_STRING
|
1002
|
+
event_attributes_for :AW_EVENT_AVATAR_CLICK, :AW_AVATAR_NAME,
|
1003
|
+
:AW_AVATAR_SESSION, :AW_CLICKED_NAME, :AW_CLICKED_SESSION
|
1004
|
+
event_attributes_for :AW_EVENT_AVATAR_DELETE, :AW_AVATAR_SESSION, :AW_AVATAR_NAME
|
1005
|
+
event_attributes_for :AW_EVENT_AVATAR_RELOAD, :AW_AVATAR_CITIZEN, :AW_AVATAR_SESSION
|
1006
|
+
|
1007
|
+
event_attributes_for :AW_EVENT_BOTMENU, :AW_BOTMENU_FROM_NAME,
|
1008
|
+
:AW_BOTMENU_FROM_SESSION, :AW_BOTMENU_QUESTION, :AW_BOTMENU_ANSWER
|
1009
|
+
event_attributes_for :AW_EVENT_BOTGRAM, :AW_BOTGRAM_FROM_NAME,
|
1010
|
+
:AW_BOTGRAM_FROM, :AW_BOTGRAM_TEXT
|
1011
|
+
|
1012
|
+
event_attributes_for :AW_EVENT_CHAT, :AW_AVATAR_NAME, :AW_CHAT_SESSION,
|
1013
|
+
:AW_CHAT_TYPE, :AW_CHAT_MESSAGE
|
1014
|
+
event_attributes_for :AW_EVENT_CELL_BEGIN, :AW_CELL_X, :AW_CELL_Z,
|
1015
|
+
:AW_CELL_SEQUENCE, :AW_CELL_SIZE
|
1016
|
+
event_attributes_for :AW_EVENT_CELL_END, []
|
1017
|
+
event_attributes_for :AW_EVENT_CELL_OBJECT, :AW_OBJECT_TYPE,
|
1018
|
+
:AW_OBJECT_ID, :AW_OBJECT_NUMBER, :AW_OBJECT_OWNER,
|
1019
|
+
:AW_OBJECT_BUILD_TIMESTAMP, :AW_OBJECT_X, :AW_OBJECT_Y, :AW_OBJECT_Z,
|
1020
|
+
:AW_OBJECT_YAW, :AW_OBJECT_TILT, :AW_OBJECT_ROLL, :AW_OBJECT_MODEL,
|
1021
|
+
:AW_OBJECT_DESCRIPTION, :AW_OBJECT_ACTION, :AW_OBJECT_DATA
|
1022
|
+
event_attributes_for :AW_EVENT_CONSOLE_MESSAGE, :AW_CONSOLE_RED,
|
1023
|
+
:AW_CONSOLE_GREEN, :AW_CONSOLE_BLUE, :AW_CONSOLE_MESSAGE, :AW_CONSOLE_BOLD,
|
1024
|
+
:AW_CONSOLE_ITALICS
|
1025
|
+
|
1026
|
+
event_attributes_for :AW_EVENT_ENTITY_ADD, :AW_ENTITY_TYPE, :AW_ENTITY_ID,
|
1027
|
+
:AW_ENTITY_STATE, :AW_ENTITY_FLAGS, :AW_ENTITY_NUMBER,
|
1028
|
+
:AW_ENTITY_OWNER_SESSION, :AW_ENTITY_X, :AW_ENTITY_Y, :AW_ENTITY_Z,
|
1029
|
+
:AW_ENTITY_YAW, :AW_ENTITY_TILT, :AW_ENTITY_ROLL, :AW_ENTITY_MODE_NUM,
|
1030
|
+
:AW_ENTITY_OWNER_CITIZEN,
|
1031
|
+
:AW_OBJECT_SESSION, :AW_CELL_SEQUENCE,
|
1032
|
+
:AW_CELL_X, :AW_CELL_Z, :AW_OBJECT_TYPE, :AW_OBJECT_ID, :AW_OBJECT_NUMBER,
|
1033
|
+
:AW_OBJECT_OWNER, :AW_OBJECT_BUILD_TIMESTAMP, :AW_OBJECT_X, :AW_OBJECT_Y,
|
1034
|
+
:AW_OBJECT_Z, :AW_OBJECT_YAW, :AW_OBJECT_TILT, :AW_OBJECT_ROLL, :AW_OBJECT_MODEL,
|
1035
|
+
:AW_OBJECT_DESCRIPTION, :AW_OBJECT_ACTION, :AW_OBJECT_DATA
|
1036
|
+
event_attributes_for :AW_EVENT_ENTITY_CHANGE, :AW_ENTITY_TYPE, :AW_ENTITY_ID,
|
1037
|
+
:AW_ENTITY_STATE, :AW_ENTITY_FLAGS,
|
1038
|
+
:AW_ENTITY_OWNER_SESSION, :AW_ENTITY_X, :AW_ENTITY_Y, :AW_ENTITY_Z,
|
1039
|
+
:AW_ENTITY_YAW, :AW_ENTITY_TILT, :AW_ENTITY_ROLL, :AW_ENTITY_MODE_NUM
|
1040
|
+
event_attributes_for :AW_EVENT_ENTITY_DELETE, :AW_ENTITY_TYPE, :AW_ENTITY_ID
|
1041
|
+
event_attributes_for :AW_EVENT_ENTITY_LINKS, :AW_ENTITY_TYPE, :AW_ENTITY_ID,
|
1042
|
+
:AW_OBJECT_SESSION, :AW_CELL_SEQUENCE,
|
1043
|
+
:AW_CELL_X, :AW_CELL_Z, :AW_OBJECT_TYPE, :AW_OBJECT_ID, :AW_OBJECT_NUMBER,
|
1044
|
+
:AW_OBJECT_OWNER, :AW_OBJECT_BUILD_TIMESTAMP, :AW_OBJECT_X, :AW_OBJECT_Y,
|
1045
|
+
:AW_OBJECT_Z, :AW_OBJECT_YAW, :AW_OBJECT_TILT, :AW_OBJECT_ROLL, :AW_OBJECT_MODEL,
|
1046
|
+
:AW_OBJECT_DESCRIPTION, :AW_OBJECT_ACTION, :AW_OBJECT_DATA
|
1047
|
+
|
1048
|
+
event_attributes_for :AW_EVENT_ENTITY_RIDER_ADD, :AW_ENTITY_TYPE, :AW_ENTITY_ID,
|
1049
|
+
:AW_AVATAR_SESSION, :AW_AVATAR_DISTANCE, :AW_AVATAR_Y_DELTA, :AW_AVATAR_ANGLE,
|
1050
|
+
:AW_AVATAR_YAW_DELTA, :AW_AVATAR_PITCH_DELTA
|
1051
|
+
event_attributes_for :AW_EVENT_ENTITY_RIDER_CHANGE, :AW_ENTITY_TYPE, :AW_ENTITY_ID,
|
1052
|
+
:AW_AVATAR_SESSION, :AW_AVATAR_DISTANCE, :AW_AVATAR_Y_DELTA, :AW_AVATAR_ANGLE,
|
1053
|
+
:AW_AVATAR_YAW_DELTA, :AW_AVATAR_PITCH_DELTA
|
1054
|
+
event_attributes_for :AW_EVENT_ENTITY_RIDER_DELETE, :AW_ENTITY_TYPE, :AW_OBJECT_ID, :AW_AVATAR_SESSION
|
1055
|
+
|
1056
|
+
event_attributes_for :AW_EVENT_HUD_CLICK, :AW_HUD_ELEMENT_SESSION,
|
1057
|
+
:AW_HUD_ELEMENT_ID, :AW_HUD_ELEMENT_CLICK_X, :AW_HUD_ELEMENT_CLICK_Y
|
1058
|
+
|
1059
|
+
event_attributes_for :AW_EVENT_NOISE, :AW_SOUND_NAME
|
1060
|
+
|
1061
|
+
event_attributes_for :AW_EVENT_OBJECT_ADD, :AW_OBJECT_SESSION, :AW_CELL_SEQUENCE,
|
1062
|
+
:AW_CELL_X, :AW_CELL_Z, :AW_OBJECT_TYPE, :AW_OBJECT_ID, :AW_OBJECT_NUMBER,
|
1063
|
+
:AW_OBJECT_OWNER, :AW_OBJECT_BUILD_TIMESTAMP, :AW_OBJECT_X, :AW_OBJECT_Y,
|
1064
|
+
:AW_OBJECT_Z, :AW_OBJECT_YAW, :AW_OBJECT_TILT, :AW_OBJECT_ROLL, :AW_OBJECT_MODEL,
|
1065
|
+
:AW_OBJECT_DESCRIPTION, :AW_OBJECT_ACTION, :AW_OBJECT_DATA
|
1066
|
+
event_attributes_for :AW_EVENT_OBJECT_BUMP, :AW_AVATAR_SESSION, :AW_AVATAR_NAME,
|
1067
|
+
:AW_OBJECT_SYNC, :AW_OBJECT_TYPE, :AW_OBJECT_ID,
|
1068
|
+
:AW_OBJECT_X, :AW_OBJECT_Y, :AW_OBJECT_Z,
|
1069
|
+
:AW_OBJECT_YAW, :AW_OBJECT_TILT, :AW_OBJECT_ROLL, :AW_OBJECT_MODEL,
|
1070
|
+
:AW_OBJECT_OWNER, :AW_OBJECT_BUILD_TIMESTAMP,
|
1071
|
+
:AW_OBJECT_DESCRIPTION, :AW_OBJECT_ACTION, :AW_OBJECT_DATA
|
1072
|
+
|
1073
|
+
event_attributes_for :AW_EVENT_OBJECT_CLICK, :AW_AVATAR_SESSION, :AW_AVATAR_NAME,
|
1074
|
+
:AW_OBJECT_SYNC, :AW_CELL_X, :AW_CELL_Z,
|
1075
|
+
:AW_OBJECT_TYPE, :AW_OBJECT_ID, :AW_OBJECT_NUMBER,
|
1076
|
+
:AW_OBJECT_OWNER, :AW_OBJECT_BUILD_TIMESTAMP, :AW_OBJECT_X, :AW_OBJECT_Y,
|
1077
|
+
:AW_OBJECT_Z, :AW_OBJECT_YAW, :AW_OBJECT_TILT, :AW_OBJECT_ROLL, :AW_OBJECT_MODEL,
|
1078
|
+
:AW_OBJECT_DESCRIPTION, :AW_OBJECT_ACTION, :AW_OBJECT_DATA
|
1079
|
+
|
1080
|
+
event_attributes_for :AW_EVENT_OBJECT_DELETE, :AW_OBJECT_SESSION, :AW_CELL_SEQUENCE,
|
1081
|
+
:AW_CELL_X, :AW_CELL_Z, :AW_OBJECT_ID, :AW_OBJECT_NUMBER
|
1082
|
+
event_attributes_for :AW_EVENT_OBJECT_SELECT, :AW_AVATAR_SESSION, :AW_AVATAR_NAME,
|
1083
|
+
:AW_OBJECT_SYNC, :AW_CELL_X, :AW_CELL_Z, :AW_OBJECT_ID, :AW_OBJECT_NUMBER
|
1084
|
+
|
1085
|
+
event_attributes_for :AW_EVENT_TELEPORT, :AW_TELEPORT_WORLD,
|
1086
|
+
:AW_TELEPORT_X, :AW_TELEPORT_Y, :AW_TELEPORT_Z, :AW_TELEPORT_YAW, :AW_TELEPORT_WARP
|
1087
|
+
|
1088
|
+
event_attributes_for :AW_EVENT_TERRAIN_BEGIN, :AW_TERRAIN_PAGE_X, :AW_TERRAIN_PAGE_Z
|
1089
|
+
event_attributes_for :AW_EVENT_TERRAIN_CHANGE, :AW_TERRAIN_PAGE_X, :AW_TERRAIN_PAGE_Z
|
1090
|
+
event_attributes_for :AW_EVENT_TERRAIN_DATA, :AW_TERRAIN_NODE_X,
|
1091
|
+
:AW_TERRAIN_NODE_Z, :AW_TERRAIN_NODE_SIZE, :AW_TERRAIN_NODE_TEXTURES, :AW_TERRAIN_NODE_HEIGHTS
|
1092
|
+
event_attributes_for :AW_EVENT_TERRAIN_END, :AW_TERRAIN_COMPLETE, :AW_TERRAIN_SEQUENCE
|
1093
|
+
event_attributes_for :AW_EVENT_TOOLBAR_CLICK, :AW_TOOLBAR_SESSION, :AW_TOOLBAR_ID
|
1094
|
+
|
1095
|
+
event_attributes_for :AW_EVENT_URL, :AW_AVATAR_SESSION, :AW_AVATAR_NAME,
|
1096
|
+
:AW_URL_NAME, :AW_URL_POST, :AW_URL_TARGET, :AW_URL_TARGET_3D
|
1097
|
+
event_attributes_for :AW_EVENT_URL_CLICK, :AW_AVATAR_SESSION, :AW_AVATAR_NAME,
|
1098
|
+
:AW_URL_NAME
|
1099
|
+
event_attributes_for :AW_EVENT_USER_INFO, :AW_USERLIST_ID,
|
1100
|
+
:AW_USERLIST_NAME, :AW_USERLIST_WORLD, :AW_USERLIST_CITIZEN, :AW_USERLIST_STATE
|
1101
|
+
|
1102
|
+
event_attributes_for :AW_EVENT_UNIVERSE_ATTRIBUTES, :AW_UNIVERSE_ALLOW_TOURISTS,
|
1103
|
+
:AW_UNIVERSE_ANNUAL_CHARGE, :AW_UNIVERSE_BROWSER_BETA, :AW_UNIVERSE_BROWSER_MINIMUM,
|
1104
|
+
:AW_UNIVERSE_BROWSER_RELEASE, :AW_UNIVERSE_BUILD_NUMBER, :AW_UNIVERSE_CITIZEN_CHANGES_ALLOWED,
|
1105
|
+
:AW_UNIVERSE_MONTHLY_CHARGE, :AW_UNIVERSE_REGISTER_METHOD, :AW_UNIVERSE_REGISTRATION_REQUIRED,
|
1106
|
+
:AW_UNIVERSE_SEARCH_URL, :AW_UNIVERSE_TIME, :AW_UNIVERSE_WELCOME_MESSAGE,
|
1107
|
+
:AW_UNIVERSE_WORLD_BETA, :AW_UNIVERSE_WORLD_MINIMUM, :AW_UNIVERSE_WORLD_RELEASE,
|
1108
|
+
:AW_UNIVERSE_WORLD_START, :AW_UNIVERSE_USER_LIST_ENABLED, :AW_UNIVERSE_NOTEPAD_URL,
|
1109
|
+
:AW_UNIVERSE_CAV_PATH, :AW_UNIVERSE_CAV_PATH2
|
1110
|
+
|
1111
|
+
event_attributes_for :AW_EVENT_UNIVERSE_DISCONNECT, :AW_DISCONNECT_REASON
|
1112
|
+
|
1113
|
+
event_attributes_for :AW_EVENT_WORLD_ATTRIBUTES, :AW_ATTRIB_SENDER_SESSION,
|
1114
|
+
:AW_WORLD_NAME, :AW_WORLD_TITLE, :AW_WORLD_BACKDROP, :AW_WORLD_GROUND,
|
1115
|
+
:AW_WORLD_OBJECT_PATH, :AW_WORLD_OBJECT_REFRESH, :AW_WORLD_BUILD_RIGHT,
|
1116
|
+
:AW_WORLD_EMINENT_DOMAIN_RIGHT, :AW_WORLD_ENTER_RIGHT,
|
1117
|
+
:AW_WORLD_SPECIAL_OBJECTS_RIGHT, :AW_WORLD_FOG_RED, :AW_WORLD_FOG_GREEN,
|
1118
|
+
:AW_WORLD_FOG_BLUE, :AW_WORLD_CARETAKER_CAPABILITY,
|
1119
|
+
:AW_WORLD_RESTRICTED_RADIUS, :AW_WORLD_PUBLIC_SPEAKER_CAPABILITY,
|
1120
|
+
:AW_WORLD_PUBLIC_SPEAKER_RIGHT, :AW_WORLD_CREATION_TIMESTAMP,
|
1121
|
+
:AW_WORLD_HOME_PAGE, :AW_WORLD_BUILD_NUMBER, :AW_WORLD_OBJECT_PASSWORD,
|
1122
|
+
:AW_WORLD_DISABLE_CREATE_URL, :AW_WORLD_RATING, :AW_WORLD_WELCOME_MESSAGE,
|
1123
|
+
:AW_WORLD_EJECT_RIGHT, :AW_WORLD_EJECT_CAPABILITY, :AW_WORLD_CELL_LIMIT,
|
1124
|
+
:AW_WORLD_BUILD_CAPABILITY, :AW_WORLD_ALLOW_PASSTHRU, :AW_WORLD_ALLOW_FLYING,
|
1125
|
+
:AW_WORLD_ALLOW_TELEPORT, :AW_WORLD_ALLOW_OBJECT_SELECT, :AW_WORLD_BOTS_RIGHT,
|
1126
|
+
:AW_WORLD_SPEAK_CAPABILITY, :AW_WORLD_SPEAK_RIGHT,
|
1127
|
+
:AW_WORLD_ALLOW_TOURIST_WHISPER, :AW_WORLD_LIGHT_X, :AW_WORLD_LIGHT_Y,
|
1128
|
+
:AW_WORLD_LIGHT_Z, :AW_WORLD_LIGHT_RED, :AW_WORLD_LIGHT_GREEN,
|
1129
|
+
:AW_WORLD_LIGHT_BLUE, :AW_WORLD_AMBIENT_LIGHT_RED,
|
1130
|
+
:AW_WORLD_AMBIENT_LIGHT_GREEN, :AW_WORLD_AMBIENT_LIGHT_BLUE,
|
1131
|
+
:AW_WORLD_ALLOW_AVATAR_COLLISION, :AW_WORLD_FOG_ENABLE, :AW_WORLD_FOG_MINIMUM,
|
1132
|
+
:AW_WORLD_FOG_MAXIMUM, :AW_WORLD_FOG_TINTED, :AW_WORLD_MAX_USERS,
|
1133
|
+
:AW_WORLD_SIZE, :AW_WORLD_OBJECT_COUNT, :AW_WORLD_EXPIRATION,
|
1134
|
+
:AW_WORLD_SPECIAL_COMMANDS_RIGHT, :AW_WORLD_MAX_LIGHT_RADIUS,
|
1135
|
+
:AW_WORLD_SKYBOX, :AW_WORLD_MINIMUM_VISIBILITY, :AW_WORLD_REPEATING_GROUND,
|
1136
|
+
:AW_WORLD_KEYWORDS, :AW_WORLD_ENABLE_TERRAIN, :AW_WORLD_ALLOW_3_AXIS_ROTATION,
|
1137
|
+
:AW_WORLD_TERRAIN_TIMESTAMP, :AW_WORLD_ENTRY_POINT, :AW_WORLD_SKY_NORTH_RED,
|
1138
|
+
:AW_WORLD_SKY_NORTH_GREEN, :AW_WORLD_SKY_NORTH_BLUE, :AW_WORLD_SKY_SOUTH_RED,
|
1139
|
+
:AW_WORLD_SKY_SOUTH_GREEN, :AW_WORLD_SKY_SOUTH_BLUE, :AW_WORLD_SKY_EAST_RED,
|
1140
|
+
:AW_WORLD_SKY_EAST_GREEN, :AW_WORLD_SKY_EAST_BLUE, :AW_WORLD_SKY_WEST_RED,
|
1141
|
+
:AW_WORLD_SKY_WEST_GREEN, :AW_WORLD_SKY_WEST_BLUE, :AW_WORLD_SKY_TOP_RED,
|
1142
|
+
:AW_WORLD_SKY_TOP_GREEN, :AW_WORLD_SKY_TOP_BLUE, :AW_WORLD_SKY_BOTTOM_RED,
|
1143
|
+
:AW_WORLD_SKY_BOTTOM_GREEN, :AW_WORLD_SKY_BOTTOM_BLUE,
|
1144
|
+
:AW_WORLD_CLOUDS_LAYER1_TEXTURE, :AW_WORLD_CLOUDS_LAYER1_MASK,
|
1145
|
+
:AW_WORLD_CLOUDS_LAYER1_TILE, :AW_WORLD_CLOUDS_LAYER1_SPEED_X,
|
1146
|
+
:AW_WORLD_CLOUDS_LAYER1_SPEED_Z, :AW_WORLD_CLOUDS_LAYER1_OPACITY,
|
1147
|
+
:AW_WORLD_CLOUDS_LAYER2_TEXTURE, :AW_WORLD_CLOUDS_LAYER2_MASK,
|
1148
|
+
:AW_WORLD_CLOUDS_LAYER2_TILE, :AW_WORLD_CLOUDS_LAYER2_SPEED_X,
|
1149
|
+
:AW_WORLD_CLOUDS_LAYER2_SPEED_Z, :AW_WORLD_CLOUDS_LAYER2_OPACITY,
|
1150
|
+
:AW_WORLD_CLOUDS_LAYER3_TEXTURE, :AW_WORLD_CLOUDS_LAYER3_MASK,
|
1151
|
+
:AW_WORLD_CLOUDS_LAYER3_TILE, :AW_WORLD_CLOUDS_LAYER3_SPEED_X,
|
1152
|
+
:AW_WORLD_CLOUDS_LAYER3_SPEED_Z, :AW_WORLD_CLOUDS_LAYER3_OPACITY,
|
1153
|
+
:AW_WORLD_DISABLE_CHAT, :AW_WORLD_ALLOW_CITIZEN_WHISPER,
|
1154
|
+
:AW_WORLD_ALWAYS_SHOW_NAMES, :AW_WORLD_DISABLE_AVATAR_LIST,
|
1155
|
+
:AW_WORLD_AVATAR_REFRESH_RATE, :AW_WORLD_WATER_TEXTURE, :AW_WORLD_WATER_MASK,
|
1156
|
+
:AW_WORLD_WATER_BOTTOM_TEXTURE, :AW_WORLD_WATER_BOTTOM_MASK,
|
1157
|
+
:AW_WORLD_WATER_OPACITY, :AW_WORLD_WATER_RED, :AW_WORLD_WATER_GREEN,
|
1158
|
+
:AW_WORLD_WATER_BLUE, :AW_WORLD_WATER_LEVEL, :AW_WORLD_WATER_SURFACE_MOVE,
|
1159
|
+
:AW_WORLD_WATER_WAVE_MOVE, :AW_WORLD_WATER_SPEED, :AW_WORLD_WATER_ENABLED,
|
1160
|
+
:AW_WORLD_EMINENT_DOMAIN_CAPABILITY, :AW_WORLD_LIGHT_TEXTURE,
|
1161
|
+
:AW_WORLD_LIGHT_MASK, :AW_WORLD_LIGHT_DRAW_SIZE, :AW_WORLD_LIGHT_DRAW_FRONT,
|
1162
|
+
:AW_WORLD_LIGHT_DRAW_BRIGHT, :AW_WORLD_LIGHT_SOURCE_USE_COLOR,
|
1163
|
+
:AW_WORLD_LIGHT_SOURCE_COLOR, :AW_WORLD_TERRAIN_AMBIENT,
|
1164
|
+
:AW_WORLD_TERRAIN_DIFFUSE, :AW_WORLD_WATER_VISIBILITY,
|
1165
|
+
:AW_WORLD_SOUND_FOOTSTEP, :AW_WORLD_SOUND_WATER_ENTER,
|
1166
|
+
:AW_WORLD_SOUND_WATER_EXIT, :AW_WORLD_SOUND_AMBIENT, :AW_WORLD_GRAVITY,
|
1167
|
+
:AW_WORLD_BUOYANCY, :AW_WORLD_FRICTION, :AW_WORLD_WATER_FRICTION,
|
1168
|
+
:AW_WORLD_SLOPESLIDE_ENABLED, :AW_WORLD_SLOPESLIDE_MIN_ANGLE,
|
1169
|
+
:AW_WORLD_SLOPESLIDE_MAX_ANGLE, :AW_WORLD_ALLOW_TOURIST_BUILD,
|
1170
|
+
:AW_WORLD_ENABLE_REFERER, :AW_WORLD_WATER_UNDER_TERRAIN,
|
1171
|
+
:AW_WORLD_TERRAIN_OFFSET, :AW_WORLD_VOIP_RIGHT,
|
1172
|
+
:AW_WORLD_DISABLE_MULTIPLE_MEDIA, :AW_WORLD_BOTMENU_URL,
|
1173
|
+
:AW_WORLD_ENABLE_BUMP_EVENT, :AW_WORLD_ENABLE_SYNC_EVENTS,
|
1174
|
+
:AW_WORLD_ENABLE_CAV, :AW_WORLD_ENABLE_PAV, :AW_WORLD_CHAT_DISABLE_URL_CLICKS,
|
1175
|
+
:AW_WORLD_MOVER_EMPTY_RESET_TIMEOUT, :AW_WORLD_MOVER_USED_RESET_TIMEOUT
|
1176
|
+
|
1177
|
+
event_attributes_for :AW_EVENT_WORLD_DISCONNECT, :AW_DISCONNECT_REASON
|
1178
|
+
event_attributes_for :AW_EVENT_WORLD_INFO, :AW_WORLDLIST_NAME,
|
1179
|
+
:AW_WORLDLIST_USERS, :AW_WORLDLIST_STATUS, :AW_WORLDLIST_RATING
|
1180
|
+
end
|
1181
|
+
|
1182
|
+
include AwSDKSupport
|
1183
|
+
extend AwSDKSupport
|
1184
|
+
|
1185
|
+
end
|