Exemplo n.º 1
0
TRIGGER( use )(obj user)
{
  obj player = user;
  if(!hasObjVar(this, "bountyPlayer"))
  {
    systemMessage(user, "Select player to bounty:");
    targetObj(user, this);
    return(0x00);
  }
  string Q5IU = "PD BugKiller";
  if(hasObjVar(this, "bountyPlayerName"))
  {
    Q5IU = getObjVar(this, "bountyPlayerName");
  }
  systemMessage(user, "creating bounty for (" + objtoint(player) + ".");
  obj bountyInfo = createNoResObjectAt(0x01, getLocation(user));
  setObjVar(bountyInfo, "subject", player);
  attachScript(bountyInfo, "bountyinfo");
  list args = list( player, 0x029A, 0x00, Q5IU );
  message(bountyInfo, "addBounty", args);
  int Q4Q1 = teleport(bountyInfo, getRelayLoc(player));
  if(isValid(bountyInfo))
  {
    clearList(args);
    message(bountyInfo, "teleported", args);
  }
  args = list( getAdjFame(user) );
  systemMessage(user, "MurderReport: Messaging via probe to " + objtoint(user) + ".");
  Q56V(player, "murderReport", args);
  obj head = createNoResObjectIn(0x1DA0, getBackpack(user));
  setObjVar(head, "nameVar", Q5IU);
  setObjVar(head, "controller", player);
  return(0x00);
}
Exemplo n.º 2
0
TRIGGER( use )(obj user)
{
  if(isAtHome(this))
  {
    systemMessage(user, "That ore belongs to someone else.");
    return(0x00);
  }
  if(hasObjVar(this, "inUse"))
  {
    systemMessage(user, "Someone is using that ore.");
    return(0x00);
  }
  else
  {
    setObjVar(this, "inUse", 0x01);
    attachscript(this, "removeinuse");
    callback(this, 0x1E, 0x1B);
  }
  int Q4Q1;
  int Q4YO;
  Q4Q1 = getResource(Q4YO, this, "metal", 0x03, 0x02);
  if(Q4YO > 0x04)
  {
    systemMessage(user, "Select the forge on which to smelt the ore, or another pile of ore with which to combine it.");
  }
  else
  {
    systemMessage(user, "Select another pile of ore with which to combine this.");
  }
  targetObj(user, this);
  return(0x00);
}
Exemplo n.º 3
0
NS_IMETHODIMP
Module::Call(nsIXPConnectWrappedNative* wrapper,
             JSContext* cx,
             JSObject* obj,
             const JS::CallArgs& args,
             bool* _retval)
{
  mozJSComponentLoader* loader = mozJSComponentLoader::Get();
  JS::Rooted<JSObject*> targetObj(cx);
  nsresult rv = loader->FindTargetObject(cx, &targetObj);
  NS_ENSURE_SUCCESS(rv, rv);

  *_retval = InitAndSealCTypesClass(cx, targetObj);
  return NS_OK;
}
Exemplo n.º 4
0
NS_IMETHODIMP
OSFileConstantsService::Init(JSContext *aCx)
{
  nsresult rv = mozilla::InitOSFileConstants();
  if (NS_FAILED(rv)) {
    return rv;
  }

  mozJSComponentLoader* loader = mozJSComponentLoader::Get();
  JS::Rooted<JSObject*> targetObj(aCx);
  rv = loader->FindTargetObject(aCx, &targetObj);
  NS_ENSURE_SUCCESS(rv, rv);

  if (!mozilla::DefineOSFileConstants(aCx, targetObj)) {
    return NS_ERROR_FAILURE;
  }

  return NS_OK;
}
Exemplo n.º 5
0
TRIGGER( use )(obj user)
{
  if(isAtHome(this))
  {
    systemMessage(user, "You can't use that, it belongs to someone else.");
    return(0x00);
  }
  int Q62A = getObjType(this);
  loc Q61U = loc( getLocation(this) );
  switch(Q62A)
  {
  case 0x1BD1:
    systemMessage(user, "Select the shafts you wish to use this on.");
    break;
  case 0x1BD4:
    systemMessage(user, "Select the feathers you wish to use this on.");
    break;
  }
  targetObj(user, this);
  return(0x00);
}
Exemplo n.º 6
0
TRIGGER( use )(obj user)
{
  targetObj(user, this);
  return(0x00);
}
Exemplo n.º 7
0
TRIGGER( use )(obj user)
{
  systemMessage(user, "Select the clothing to dye.");
  targetObj(user, this);
  return(0x00);
}
Exemplo n.º 8
0
TRIGGER( use )(obj user)
{
  systemMessage(user, "What should I cook this on?");
  targetObj(user, this);
  return(0x01);
}