Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 565 lines (521 sloc) 19.423 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564
//o--------------------------------------------------------------------------o
//| File - UOXJSMethods.cpp
//| Date -
//| Developers - DarkStorm
//| Organization - UOX3 DevTeam
//| Status - Currently under development
//o--------------------------------------------------------------------------o
//| Description - Version History
//| 1.0 Dark-Storm 20th December, 2001 Initial implementation
//| Methods for the javascript objects
//|
//| List of supported Classes:
//| - Gumps
//| - Char
//| - Item
//| - Socket
//o--------------------------------------------------------------------------o
//| Modifications -
//o--------------------------------------------------------------------------o
#ifndef __UOXJSMethods__
#define __UOXJSMethods__

namespace UOX
{

typedef JSBool (JSMethodFunc)( JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval );

// Object Constructors
JSMethodFunc Gump;
JSMethodFunc GumpData;
JSMethodFunc UOXCFile;
JSMethodFunc Packet;

// Packet Methods
JSMethodFunc CPacket_Free;
JSMethodFunc CPacket_WriteByte;
JSMethodFunc CPacket_WriteShort;
JSMethodFunc CPacket_WriteLong;
JSMethodFunc CPacket_WriteString;
JSMethodFunc CPacket_ReserveSize;

// Gump Methods
JSMethodFunc CGump_Free;
JSMethodFunc CGump_AddBackground;
JSMethodFunc CGump_AddButton;
JSMethodFunc CGump_AddPageButton;
JSMethodFunc CGump_AddCheckbox;
JSMethodFunc CGump_AddCheckerTrans;
JSMethodFunc CGump_AddCroppedText;
JSMethodFunc CGump_AddGroup;
JSMethodFunc CGump_AddGump;
JSMethodFunc CGump_AddHTMLGump;
JSMethodFunc CGump_AddPage;
JSMethodFunc CGump_AddPicture;
JSMethodFunc CGump_AddRadio;
JSMethodFunc CGump_AddText;
JSMethodFunc CGump_AddTextEntry;
JSMethodFunc CGump_AddTiledGump;
JSMethodFunc CGump_AddXMFHTMLGump;
JSMethodFunc CGump_AddXMFHTMLGumpColor;
JSMethodFunc CGump_NoClose;
JSMethodFunc CGump_NoDispose;
JSMethodFunc CGump_NoMove;
JSMethodFunc CGump_NoResize;
JSMethodFunc CGump_Send;

// GumpData Methods
JSMethodFunc CGumpData_Free;
JSMethodFunc CGumpData_getID;
JSMethodFunc CGumpData_getEdit;
JSMethodFunc CGumpData_getButton;

// Character Methods
JSMethodFunc CChar_DoAction;
JSMethodFunc CChar_EmoteMessage;
JSMethodFunc CChar_OpenBank;
JSMethodFunc CChar_DirectionTo;
JSMethodFunc CChar_TurnToward;
JSMethodFunc CChar_ResourceCount;
JSMethodFunc CChar_CheckSkill;
JSMethodFunc CChar_FindItemLayer;
JSMethodFunc CChar_SpeechInput;
JSMethodFunc CChar_CastSpell;
JSMethodFunc CChar_MagicEffect;
JSMethodFunc CChar_Wander;
JSMethodFunc CChar_Follow;
JSMethodFunc CChar_Dismount;
JSMethodFunc CChar_SetPoisoned;
JSMethodFunc CChar_ExplodeItem;
JSMethodFunc CChar_SetInvisible;
JSMethodFunc CChar_YellMessage;
JSMethodFunc CChar_WhisperMessage;
JSMethodFunc CChar_AddSpell;
JSMethodFunc CChar_SpellFail;
JSMethodFunc CChar_ExecuteCommand;
JSMethodFunc CChar_WalkTo;
JSMethodFunc CChar_RunTo;
JSMethodFunc CChar_OpenLayer;
JSMethodFunc CChar_BoltEffect;
JSMethodFunc CChar_Gate;
JSMethodFunc CChar_Recall;
JSMethodFunc CChar_Mark;
JSMethodFunc CChar_SetSkillByName;
JSMethodFunc CChar_Kill;
JSMethodFunc CChar_Resurrect;
JSMethodFunc CChar_Jail;
JSMethodFunc CChar_Release;
JSMethodFunc CChar_SpellMoveEffect;
JSMethodFunc CChar_SpellStaticEffect;
JSMethodFunc CChar_BreakConcentration;
JSMethodFunc CChar_FindItemType;
JSMethodFunc CChar_InitWanderArea;
JSMethodFunc CChar_ReactOnDamage;
JSMethodFunc CChar_Damage;
JSMethodFunc CChar_Heal;
JSMethodFunc CChar_Defense;

// Item Methods
JSMethodFunc CItem_OpenPlank;
JSMethodFunc CItem_IsMulti;
JSMethodFunc CItem_IsInMulti;
JSMethodFunc CItem_IsOnBanList;
JSMethodFunc CItem_IsOnOwnerList;
JSMethodFunc CItem_AddToBanList;
JSMethodFunc CItem_AddToOwnerList;
JSMethodFunc CItem_RemoveFromBanList;
JSMethodFunc CItem_RemoveFromOwnerList;
JSMethodFunc CItem_SetCont;
JSMethodFunc CItem_Refresh;
JSMethodFunc CItem_ApplyRank;
JSMethodFunc CItem_Glow;
JSMethodFunc CItem_UnGlow;
JSMethodFunc CItem_PlaceInPack;
JSMethodFunc CItem_Dupe;
JSMethodFunc CItem_LockDown;
JSMethodFunc CItem_Carve;


// BaseObject Methods
JSMethodFunc CBase_TextMessage;
JSMethodFunc CBase_Delete;
JSMethodFunc CBase_Teleport;
JSMethodFunc CBase_StaticEffect;
JSMethodFunc CBase_GetTag;
JSMethodFunc CBase_SetTag;
JSMethodFunc CBase_GetNumTags;
JSMethodFunc CBase_InRange;
JSMethodFunc CBase_StartTimer;
JSMethodFunc CBase_KillTimers;
JSMethodFunc CBase_ApplySection;
JSMethodFunc CBase_FirstItem;
JSMethodFunc CBase_NextItem;
JSMethodFunc CBase_FinishedItems;
JSMethodFunc CBase_DistanceTo;
JSMethodFunc CBase_GetSerial;
JSMethodFunc CBase_Resist;

JSMethodFunc CBase_CanSee;
JSMethodFunc CBase_UseResource;

// Socket Methods
JSMethodFunc CSocket_Disconnect;
JSMethodFunc CSocket_OpenURL;
JSMethodFunc CSocket_GetByte;
JSMethodFunc CSocket_GetWord;
JSMethodFunc CSocket_GetDWord;
JSMethodFunc CSocket_GetSByte;
JSMethodFunc CSocket_GetSWord;
JSMethodFunc CSocket_GetSDWord;
JSMethodFunc CSocket_GetString;
JSMethodFunc CSocket_SetByte;
JSMethodFunc CSocket_SetWord;
JSMethodFunc CSocket_SetDWord;
JSMethodFunc CSocket_SetString;
JSMethodFunc CSocket_ReadBytes;
JSMethodFunc CSocket_OpenGump;
JSMethodFunc CSocket_WhoList;
JSMethodFunc CSocket_Midi;
JSMethodFunc CSocket_SendAddMenu;
JSMethodFunc CSocket_Send;
JSMethodFunc CSocket_DisplayDamage;

// Guild Methods
JSMethodFunc CGuild_AcceptRecruit;

// Misc
JSMethodFunc CMisc_SoundEffect;
JSMethodFunc CMisc_SellTo;
JSMethodFunc CMisc_BuyFrom;
JSMethodFunc CMisc_HasSpell;
JSMethodFunc CMisc_RemoveSpell;
JSMethodFunc CMisc_CustomTarget;
JSMethodFunc CMisc_PopUpTarget;
JSMethodFunc CMisc_GetTimer;
JSMethodFunc CMisc_SetTimer;
JSMethodFunc CMisc_MakeMenu;
JSMethodFunc CMisc_SysMessage;

// Race methods
JSMethodFunc CRace_CanWearArmour;
JSMethodFunc CRace_IsValidHairColour;
JSMethodFunc CRace_IsValidSkinColour;
JSMethodFunc CRace_IsValidBeardColour;

// File methods

JSMethodFunc CFile_Open;
JSMethodFunc CFile_Close;
JSMethodFunc CFile_Free;
JSMethodFunc CFile_Write;
JSMethodFunc CFile_ReadUntil;
JSMethodFunc CFile_Read;
JSMethodFunc CFile_EOF;
JSMethodFunc CFile_Length;
JSMethodFunc CFile_Pos;

// Account methods
JSMethodFunc CAccount_AddAccount;
JSMethodFunc CAccount_DelAccount;

JSMethodFunc CConsole_Print;
JSMethodFunc CConsole_Log;
JSMethodFunc CConsole_Error;
JSMethodFunc CConsole_Warning;
JSMethodFunc CConsole_PrintSectionBegin;
JSMethodFunc CConsole_TurnYellow;
JSMethodFunc CConsole_TurnRed;
JSMethodFunc CConsole_TurnGreen;
JSMethodFunc CConsole_TurnBlue;
JSMethodFunc CConsole_TurnNormal;
JSMethodFunc CConsole_TurnBrightWhite;
JSMethodFunc CConsole_PrintDone;
JSMethodFunc CConsole_PrintFailed;
JSMethodFunc CConsole_PrintPassed;
JSMethodFunc CConsole_ClearScreen;
JSMethodFunc CConsole_PrintBasedOnVal;
JSMethodFunc CConsole_MoveTo;
JSMethodFunc CConsole_PrintSpecial;
JSMethodFunc CConsole_BeginShutdown;
JSMethodFunc CConsole_Reload;

JSMethodFunc CParty_GetMember;
JSMethodFunc CParty_Add;
JSMethodFunc CParty_Remove;

JSMethodFunc CSocket_FirstTriggerWord;
JSMethodFunc CSocket_NextTriggerWord;
JSMethodFunc CSocket_FinishedTriggerWords;

#if P_ODBC == 1

JSMethodFunc CODBC_BeginTransaction;
JSMethodFunc CODBC_FinaliseTransaction;
JSMethodFunc CODBC_ExecuteQuery;
JSMethodFunc CODBC_QueryRelease;
JSMethodFunc CODBC_FetchRow;
JSMethodFunc CODBC_GetColumn;
JSMethodFunc CODBC_LastOK;

#endif

static JSFunctionSpec CGump_Methods[] =
{
{ "Free", CGump_Free, 0, 0, 0 },
{ "AddBackground", CGump_AddBackground, 5, 0, 0 },
{ "AddButton", CGump_AddButton, 6, 0, 0 },
{ "AddPageButton", CGump_AddPageButton, 4, 0, 0 },
{ "AddCheckbox", CGump_AddCheckbox, 5, 0, 0 },
{ "AddCheckerTrans", CGump_AddCheckerTrans, 4, 0, 0 },
{ "AddCroppedText", CGump_AddCroppedText, 6, 0, 0 },
{ "AddGroup", CGump_AddGroup, 1, 0, 0 },
{ "AddGump", CGump_AddGump, 3, 0, 0 },
{ "AddHTMLGump", CGump_AddHTMLGump, 7, 0, 0 },
{ "AddPage", CGump_AddPage, 1, 0, 0 },
{ "AddPicture", CGump_AddPicture, 3, 0, 0 },
{ "AddRadio", CGump_AddRadio, 5, 0, 0 },
{ "AddText", CGump_AddText, 4, 0, 0 },
{ "AddTextEntry", CGump_AddTextEntry, 8, 0, 0 },
{ "AddTiledGump", CGump_AddTiledGump, 5, 0, 0 },
{ "AddXMFHTMLGump", CGump_AddXMFHTMLGump, 7, 0, 0 },
{ "AddXMFHTMLGumpColor", CGump_AddXMFHTMLGumpColor, 8, 0, 0 },
{ "NoClose", CGump_NoClose, 0, 0, 0 },
{ "NoDispose", CGump_NoDispose, 0, 0, 0 },
{ "NoMove", CGump_NoMove, 0, 0, 0 },
{ "NoResize", CGump_NoResize, 0, 0, 0 },
{ "Send", CGump_Send, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CChar_Methods[] =
{
{ "TextMessage", CBase_TextMessage, 1, 0, 0 },
{ "YellMessage", CChar_YellMessage, 1, 0, 0 },
{ "WhisperMessage", CChar_WhisperMessage, 1, 0, 0 },
{ "EmoteMessage", CChar_EmoteMessage, 1, 0, 0 },
{ "Delete", CBase_Delete, 0, 0, 0 },
{ "DoAction", CChar_DoAction, 1, 0, 0 },
{ "StaticEffect", CBase_StaticEffect, 3, 0, 0 },
{ "Teleport", CBase_Teleport, 3, 0, 0 },
{ "SetLocation", CBase_Teleport, 3, 0, 0 },
{ "SoundEffect", CMisc_SoundEffect, 2, 0, 0 },
{ "SellTo", CMisc_SellTo, 1, 0, 0 },
{ "BuyFrom", CMisc_BuyFrom, 1, 0, 0 },
{ "HasSpell", CMisc_HasSpell, 1, 0, 0 },
{ "RemoveSpell", CMisc_RemoveSpell, 1, 0, 0 },
{ "GetTag", CBase_GetTag, 1, 0, 0 },
{ "SetTag", CBase_SetTag, 2, 0, 0 },
{ "GetNumTags", CBase_GetNumTags, 0, 0, 0 },
{ "OpenBank", CChar_OpenBank, 1, 0, 0 },
{ "DirectionTo", CChar_DirectionTo, 1, 0, 0 },
{ "TurnToward", CChar_TurnToward, 1, 0, 0 },
{ "ResourceCount", CChar_ResourceCount, 2, 0, 0 },
{ "UseResource", CBase_UseResource, 3, 0, 0 },
{ "CustomTarget", CMisc_CustomTarget, 1, 0, 0 },
{ "PopUpTarget", CMisc_PopUpTarget, 1, 0, 0 },
{ "InRange", CBase_InRange, 2, 0, 0 },
{ "FindItemLayer", CChar_FindItemLayer, 1, 0, 0 },
{ "StartTimer", CBase_StartTimer, 2, 0, 0 },
{ "CheckSkill", CChar_CheckSkill, 3, 0, 0 },
{ "SpeechInput", CChar_SpeechInput, 1, 0, 0 },
{ "CastSpell", CChar_CastSpell, 2, 0, 0 },
{ "SysMessage", CMisc_SysMessage, 1, 0, 0 },
{ "MagicEffect", CChar_MagicEffect, 2, 0, 0 },
{ "GetSerial", CBase_GetSerial, 1, 0, 0 },
{ "MakeMenu", CMisc_MakeMenu, 2, 0, 0 },
{ "Wander", CChar_Wander, 3, 0, 0 },
{ "Follow", CChar_Follow, 1, 0, 0 },
{ "Dismount", CChar_Dismount, 0, 0, 0 },
{ "SetPoisoned", CChar_SetPoisoned, 2, 0, 0 },
{ "ExplodeItem", CChar_ExplodeItem, 1, 0, 0 },
{ "SetInvisible", CChar_SetInvisible, 2, 0, 0 },
{ "ApplySection", CBase_ApplySection, 1, 0, 0 },
{ "AddSpell", CChar_AddSpell, 1, 0, 0 },
{ "SpellFail", CChar_SpellFail, 0, 0, 0 },
{ "FirstItem", CBase_FirstItem, 0, 0, 0 },
{ "NextItem", CBase_NextItem, 0, 0, 0 },
{ "FinishedItems", CBase_FinishedItems, 0, 0, 0 },
{ "ExecuteCommand", CChar_ExecuteCommand, 0, 0, 0 },
{ "WalkTo", CChar_WalkTo, 1, 0, 0 },
{ "RunTo", CChar_RunTo, 1, 0, 0 },
{ "DistanceTo", CBase_DistanceTo, 1, 0, 0 },
{ "OpenLayer", CChar_OpenLayer, 2, 0, 0 },
{ "BoltEffect", CChar_BoltEffect, 0, 0, 0 },
{ "Gate", CChar_Gate, 1, 0, 0 },
{ "Recall", CChar_Recall, 1, 0, 0 },
{ "Mark", CChar_Mark, 1, 0, 0 },
{ "SetSkillByName", CChar_SetSkillByName, 2, 0, 0 },
{ "Kill", CChar_Kill, 0, 0, 0 },
{ "Resurrect", CChar_Resurrect, 0, 0, 0 },
{ "Jail", CChar_Jail, 0, 0, 0 },
{ "Release", CChar_Release, 0, 0, 0 },
{ "GetTimer", CMisc_GetTimer, 1, 0, 0 },
{ "SetTimer", CMisc_SetTimer, 2, 0, 0 },
{ "SpellMoveEffect", CChar_SpellMoveEffect, 2, 0, 0 },
{ "SpellStaticEffect", CChar_SpellStaticEffect,1, 0, 0 },
{ "BreakConcentration", CChar_BreakConcentration,0, 0, 0 },
{ "FindItemType", CChar_FindItemType, 1, 0, 0 },
{ "InitWanderArea", CChar_InitWanderArea, 0, 0, 0 },
{ "CanSee", CBase_CanSee, 1, 0, 0 },
{ "ReactOnDamage", CChar_ReactOnDamage, 1, 0, 0 },
{ "Damage", CChar_Damage, 1, 0, 0 },
{ "Heal", CChar_Heal, 1, 0, 0 },
{ "Resist", CBase_Resist, 1, 0, 0 },
{ "Defense", CChar_Defense, 3, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CItem_Methods[] =
{
{ "KillTimers", CBase_KillTimers, 0, 0, 0 },
{ "Delete", CBase_Delete, 0, 0, 0 },
{ "TextMessage", CBase_TextMessage, 1, 0, 0 },
{ "Teleport", CBase_Teleport, 3, 0, 0 },
{ "StaticEffect", CBase_StaticEffect, 4, 0, 0 },
{ "SetLocation", CBase_Teleport, 3, 0, 0 },
{ "SoundEffect", CMisc_SoundEffect, 2, 0, 0 },
{ "HasSpell", CMisc_HasSpell, 1, 0, 0 },
{ "RemoveSpell", CMisc_RemoveSpell, 1, 0, 0 },
{ "GetTag", CBase_GetTag, 1, 0, 0 },
{ "SetTag", CBase_SetTag, 1, 0, 0 },
{ "GetNumTags", CBase_GetNumTags, 0, 0, 0 },
{ "InRange", CBase_InRange, 2, 0, 0 },
{ "StartTimer", CBase_StartTimer, 2, 0, 0 },
{ "OpenPlank", CItem_OpenPlank, 0, 0, 0 },
{ "IsMulti", CItem_IsMulti, 0, 0, 0 },
{ "IsInMulti", CItem_IsInMulti, 1, 0, 0 },
{ "IsOnBanList", CItem_IsOnBanList, 1, 0, 0 },
{ "IsOnOwnerList", CItem_IsOnOwnerList, 1, 0, 0 },
{ "AddToBanList", CItem_AddToBanList, 1, 0, 0 },
{ "AddToOwnerList", CItem_AddToOwnerList, 1, 0, 0 },
{ "RemoveFromBanList", CItem_RemoveFromBanList, 1, 0, 0 },
{ "RemoveFromOwnerList",CItem_RemoveFromOwnerList, 1, 0, 0 },
{ "GetSerial", CBase_GetSerial, 1, 0, 0 },
{ "SetCont", CItem_SetCont, 1, 0, 0 },
{ "ApplySection", CBase_ApplySection, 1, 0, 0 },
{ "Refresh", CItem_Refresh, 0, 0, 0 },
{ "ApplyRank", CItem_ApplyRank, 2, 0, 0 },
{ "FirstItem", CBase_FirstItem, 0, 0, 0 },
{ "NextItem", CBase_NextItem, 0, 0, 0 },
{ "FinishedItems", CBase_FinishedItems, 0, 0, 0 },
{ "DistanceTo", CBase_DistanceTo, 1, 0, 0 },
{ "Glow", CItem_Glow, 1, 0, 0 },
{ "UnGlow", CItem_UnGlow, 1, 0, 0 },
{ "PlaceInPack", CItem_PlaceInPack, 0, 0, 0 },
{ "Dupe", CItem_Dupe, 1, 0, 0 },
{ "LockDown", CItem_LockDown, 0, 0, 0 },
{ "Carve", CItem_Carve, 1, 0, 0 },
{ "Resist", CBase_Resist, 1, 0, 0 },
{ "UseResource", CBase_UseResource, 3, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CRegion_Methods[] =
{
{ NULL, NULL, 0, 0, 0 },
};

static JSFunctionSpec CSocket_Methods[] =
{
{ "SysMessage", CMisc_SysMessage, 1, 0, 0 },
{ "Disconnect", CSocket_Disconnect, 0, 0, 0 },
{ "SoundEffect", CMisc_SoundEffect, 2, 0, 0 },
{ "CustomTarget", CMisc_CustomTarget, 1, 0, 0 },
{ "PopUpTarget", CMisc_PopUpTarget, 1, 0, 0 },
{ "GetByte", CSocket_GetByte, 1, 0, 0 },
{ "GetWord", CSocket_GetWord, 1, 0, 0 },
{ "GetDWord", CSocket_GetDWord, 1, 0, 0 },
{ "GetSByte", CSocket_GetSByte, 1, 0, 0 },
{ "GetSWord", CSocket_GetSWord, 1, 0, 0 },
{ "GetSDWord", CSocket_GetSDWord, 1, 0, 0 },
{ "GetString", CSocket_GetString, 1, 0, 0 },
{ "SetByte", CSocket_SetByte, 2, 0, 0 },
{ "SetWord", CSocket_SetWord, 2, 0, 0 },
{ "SetDWord", CSocket_SetDWord, 2, 0, 0 },
{ "SetString", CSocket_SetString, 2, 0, 0 },
{ "ReadBytes", CSocket_ReadBytes, 1, 0, 0 },
{ "OpenGump", CSocket_OpenGump, 1, 0, 0 },
{ "OpenURL", CSocket_OpenURL, 1, 0, 0 },
{ "BuyFrom", CMisc_BuyFrom, 1, 0, 0 },
{ "SellTo", CMisc_SellTo, 1, 0, 0 },
{ "WhoList", CSocket_WhoList, 0, 0, 0 },
{ "Midi", CSocket_Midi, 1, 0, 0 },
{ "GetTimer", CMisc_GetTimer, 1, 0, 0 },
{ "SetTimer", CMisc_SetTimer, 2, 0, 0 },
{ "SendAddMenu", CSocket_SendAddMenu,1, 0, 0 },
{ "MakeMenu", CMisc_MakeMenu, 2, 0, 0 },
{ "Send", CSocket_Send, 1, 0, 0 },
{ "CanSee", CBase_CanSee, 1, 0, 0 },
{ "DisplayDamage", CSocket_DisplayDamage, 2, 0, 0 },
{ "FirstTriggerWord", CSocket_FirstTriggerWord, 0, 0, 0 },
{ "NextTriggerWord", CSocket_NextTriggerWord, 0, 0, 0 },
{ "FinishedTriggerWords", CSocket_FinishedTriggerWords, 0, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CGuild_Methods[] =
{
{ "AcceptRecruit", CGuild_AcceptRecruit, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CRace_Methods[] =
{
{ "CanWearArmour", CRace_CanWearArmour, 1, 0, 0 },
{ "IsValidHairColour", CRace_IsValidHairColour, 1, 0, 0 },
{ "IsValidSkinColour", CRace_IsValidSkinColour, 1, 0, 0 },
{ "IsValidBeardColour", CRace_IsValidBeardColour, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CGumpData_Methods[] =
{
{ "Free", CGumpData_Free, 0, 0, 0 },
{ "getButton", CGumpData_getButton, 1, 0, 0 },
{ "getID", CGumpData_getID, 1, 0, 0 },
{ "getEdit", CGumpData_getEdit, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CFile_Methods[] =
{
{ "Free", CFile_Free, 0, 0, 0 },
{ "Open", CFile_Open, 2, 0, 0 },
{ "Close", CFile_Close, 0, 0, 0 },
{ "Write", CFile_Write, 1, 0, 0 },
{ "Read", CFile_Read, 1, 0, 0 },
{ "ReadUntil", CFile_ReadUntil, 1, 0, 0 },
{ "EOF", CFile_EOF, 0, 0, 0 },
{ "Length", CFile_Length, 0, 0, 0 },
{ "Pos", CFile_Pos, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CAccount_Methods[] =
{
{ "AddAccount", CAccount_AddAccount, 4, 0, 0 },
{ "DelAccount", CAccount_DelAccount, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CConsole_Methods[] =
{
{ "Print", CConsole_Print, 1, 0, 0 },
{ "Log", CConsole_Log, 1, 0, 0 },
{ "Error", CConsole_Error, 1, 0, 0 },
{ "Warning", CConsole_Warning, 1, 0, 0 },
{ "PrintSectionBegin", CConsole_PrintSectionBegin, 0, 0, 0 },
{ "TurnYellow", CConsole_TurnYellow, 0, 0, 0 },
{ "TurnRed", CConsole_TurnRed, 0, 0, 0 },
{ "TurnGreen", CConsole_TurnGreen, 0, 0, 0 },
{ "TurnBlue", CConsole_TurnBlue, 0, 0, 0 },
{ "TurnNormal", CConsole_TurnNormal, 0, 0, 0 },
{ "TurnBrightWhite", CConsole_TurnBrightWhite, 0, 0, 0 },
{ "PrintDone", CConsole_PrintDone, 0, 0, 0 },
{ "PrintFailed", CConsole_PrintFailed, 0, 0, 0 },
{ "PrintPassed", CConsole_PrintPassed, 0, 0, 0 },
{ "ClearScreen", CConsole_ClearScreen, 0, 0, 0 },
{ "PrintBasedOnVal", CConsole_PrintBasedOnVal, 1, 0, 0 },
{ "MoveTo", CConsole_MoveTo, 2, 0, 0 },
{ "PrintSpecial", CConsole_PrintSpecial, 2, 0, 0 },
{ "BeginShutdown", CConsole_BeginShutdown, 0, 0, 0 },
{ "Reload", CConsole_Reload, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CPacket_Methods[] =
{
{ "Free", CPacket_Free, 0, 0, 0 },
{ "WriteByte", CPacket_WriteByte, 2, 0, 0 },
{ "WriteShort", CPacket_WriteShort, 2, 0, 0 },
{ "WriteLong", CPacket_WriteLong, 2, 0, 0 },
{ "WriteString", CPacket_WriteString, 3, 0, 0 },
{ "ReserveSize", CPacket_ReserveSize, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

static JSFunctionSpec CParty_Methods[] =
{
{ "GetMember", CParty_GetMember, 1, 0, 0 },
{ "Add", CParty_Add, 1, 0, 0 },
{ "Remove", CParty_Remove, 1, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

#if P_ODBC == 1

static JSFunctionSpec CODBC_Methods[] =
{
{ "BeginTransaction", CODBC_BeginTransaction, 0, 0, 0 },
{ "FinaliseTransaction", CODBC_FinaliseTransaction, 1, 0, 0 },
{ "ExecuteQuery", CODBC_ExecuteQuery, 1, 0, 0 },
{ "QueryRelease", CODBC_QueryRelease, 0, 0, 0 },
{ "FetchRow", CODBC_FetchRow, 1, 0, 0 },
{ "GetColumn", CODBC_GetColumn, 2, 0, 0 },
{ "LastOK", CODBC_LastOK, 0, 0, 0 },
{ NULL, NULL, 0, 0, 0 }
};

#endif

}

#endif

Something went wrong with that request. Please try again.