From abb1a6e647fd217204bfd07c14c4554537407424 Mon Sep 17 00:00:00 2001 From: Allanis <allanis@saracraft.net> Date: Sat, 16 Mar 2013 22:19:52 +0000 Subject: [PATCH] [Add] Added new AI API calls to API docs. --- scripts/ai/API | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/scripts/ai/API b/scripts/ai/API index 59ec2ea..8dbc70e 100644 --- a/scripts/ai/API +++ b/scripts/ai/API @@ -173,15 +173,9 @@ timeup(number t) -- return boolean true if timer t is up. // ================ -// MISC! +// MESSAGING! // ================ -createvect(number x, number y) - -- Create a vector from cartesian coords. - -- x coord of the vector. - -- y coord of the vector. - -- return pointer to the Vec2 - comm(number id, string message) -- Make the pilot say something to the pilot of id. -- id - of the pilot to speak to. @@ -193,6 +187,29 @@ broadcast(string message) -- message - string to say to everyone in the system. -- return nil +// ================ +// LOOT +// ================ + +setcredits(number creds) + -- Set the pilot's credits. Only works during create. + -- creds - Pilot's credits. + -- return nil. + +setcargo(string cargo, number quantity) + -- Give the pilot quantity of cargo, only works during create. + -- cargo - name of cargo to give the pilot. + -- quantity - amount to give. + -- return nil. + +shipprice() + -- Get the price of the pilot's ship. + -- return the price of the ship. + +// ================ +// MISC +// ================ + rng(number low, number high) -- Return a random number between low and high. -- low - minimum to return.