WarCraft: Source

 

GetTeleSafe

Page history last edited by freddukes@... 1 yr ago

GetTeleSafe

 


 

 

This command does a check to see if it's safe to teleport to the x,y,z area. It will return 1 if it's safe, 0 if it's not...

 

The correct syntax is:

 

wcs.Command(<userid>).GetTeleSafe(<x>, <y>, <z>, <callback-function>, [Optional: additonal parameters])

 

  • Userid - Any userid it doesn't particularily matter
  • X,Y, Z - The co-ordinates to check if the area is safe to teleport to
  • Callback-Function - The function that will be run when the command has activated.
  • Optional: additonal parameters - Pass any other parameters you want to pass to the other method here.

 

 


 

 

Example:

 

def player_say(ev):

    if ev["text"] == "safe?":

        wcs.Command(ev['userid']).GetViewCoord(getView)

 

def getView(userid, x, y, z):

    wcs.Command(userid).GetTeleSafe(x, y, z, isSafe)

 

def isSafe(userid, safe):

    if safe:

        es.tell(userid, 'That location is safe')

    else:

        es.tell(userid, 'That location is NOT safe')

Comments (0)

You don't have permission to comment on this page.