SphereServer BugTracker - SphereServer
View Issue Details
0001702SphereServernew feature requestpublic07-01-10 04:2724-03-13 21:14
xantier 
RanXerox 
normalfeatureN/A
resolvedfixed 
0.56c Nightly 
 
Not Available
None
None
0001702: Enterrange
I was looking at UoDemo's decompiled scripts (1998 OSI server codes&scripts). There is a function used for traps :
CODE
#on enterrange<0x02>(object target)
{
  if(!hasObjVar(this, "disarmed"))
  {
    doLocAnimation(getLocation(this), 0x10FE, 0x02, 0x10, 0x00, 0x00);
    loseHP(target, dice(0x0A, 0x03));
  }
  return(0x01);
}


Or Covetous Level 3 Speaking Statues :

CODE
#on enterrange<0x03>(object target)
{
  string Q5ZM = "Beware Ye Who Enter These Halls!";
  list Q56U = Q5ZM;
  if(!hasObjVar(this, "working"))
  {
    if(!hasObjVar(target, "CovetousListenToStatueSpeak"))
    {
      setObjVar(this, "working", 0x01);
      callback(this, 0x19, 0x24);
      bark(this, Q5ZM);
      messageToRange(getLocation(this), 0x05, "barknow", Q56U);
      setObjVar(target, "CovetousListenToStatueSpeak", 0x01);
    }
  }
  return(0x01);
}


Is it possible you to add a function or trigger like Enterrange that works when you enter x distance range of an item or npc? Same for leaverange..
No tags attached.
Issue History
07-01-10 04:27xantierNew Issue
07-01-10 04:27xantierNightly Version => Not Available
07-01-10 04:27xantierExperimental Flags => None
07-01-10 04:27xantierOption Flags => None
24-03-13 21:14RanXeroxNote Added: 0001526
24-03-13 21:14RanXeroxStatusnew => resolved
24-03-13 21:14RanXeroxResolutionopen => fixed
24-03-13 21:14RanXeroxAssigned To => RanXerox

Notes
(0001526)
RanXerox   
24-03-13 21:14   
You can create items of this sort in the sphere scripting language by making an object of type=t_multi... a multi object is its own region, and you can use the @Enter trigger to cause the statue to speak, or trap to trigger, when the character gets close to it.