Tniffoc
2008-09-04 08:06:26
URN (Using Reflection Now)!
I originally built this include as just an include but I would be fine if it was added to Reflection. It currently includes some anti-ban functions/procedures and one for FindFight using Reflection. Please Post!
Example of a function:
URNlvlstalk(skill: string); Will ask a random player on the main screen what their level in the skill "skill" is. It will also randomize the skill name so that "woodcutting" will sometimes become "wc" or "woodcut". It returns whether it successfully randomized the skill name.Install Instructions!
Use these instructions until this is integrated into Reflection.
1. Download the current version of the .zip archive. (Old versions are in .7z format.)
2. Unzip all it's contents to your "Includes" folder in SCAR.
3. To use in a script, add the following line after all other includes.
{.include urn.scar}
4. NOTE: You must have reflection installed and included in your script for this to work!5. Post your reviews in this thread!
Use this at your own risk!
The procedures/functions are as follows… See bottom of post for more detailed descriptions…
Anti-Ban
// * function randomizeSkill(skill: string): string; // * by Tniffoc
// * function URNasklvl(skill: string; name: string): boolean; // * by Tniffoc
// * function URNlvlstalk(skill: string): boolean; // * by Tniffoc
// * function URNasklvls(skill: string): boolean; // * by Tniffoc
// * procedure URNsaylvl(skill: Integer; mineIs: boolean); // * by Tniffoc
Anti-Random
// * function URNfindfight(b: boolean; i: Integer; rand: integer; s: string): boolean; // * by Tniffoc
Here are the more detailed descriptions of the functions/procedures:
{*******************************************************************************
function URNfindfight(b: boolean; i: Integer; s: string): boolean;
By: tniffoc
Description: Finds if a char is in a fight using reflection. If "b" is true it
will run away in "s" direction and wait for "i" + random(rand) seconds before
running back. If you set b to false, set all the other arguments whatever you
want.
*******************************************************************************}
{*******************************************************************************
function randomizeSkill(skill: string): string;
By: tniffoc
Description: Will create a more human string for a certain skill E.X.:
"woodcutting" to "wc" or "woodcut" etc.
*******************************************************************************}
{*******************************************************************************
function URNasklvl(skill: string; name: string): boolean;
By: tniffoc
Description: Will ask "name" what their lvl in "skill" is. Returns whether or
not it was able to randomize the skill name.
*******************************************************************************}
{*******************************************************************************
function URNlvlstalk(skill: string): boolean;
By: tniffoc
Description: Will ask a random player what their lvl in the skill of
"skill" is.
*******************************************************************************}
{*******************************************************************************
function URNasklvls(skill: string): boolean;
By: tniffoc
Description: Asks people arround what thier "skill" lvl is. Returns whether or
not it was able to randomize the skill name.
*******************************************************************************}
{*******************************************************************************
procedure URNsaylvl(skill: Integer; mineIs: boolean);
By: tniffoc
Description: Says the current lvl of the skill under skill id "skill". If "mineIs"
is true, the procedure will say mine is before the level.
*******************************************************************************}