Site hosted by Angelfire.com: Build your free website today!

All of the information below is applicable to level 3 admin on the base TRPG mod only. All spelling errors and miss-information

are due to the packet collisions/corruption of this file as you where downloading it. Reinstall your Browser and try again.

If that does not solve the problem, reinstall your Operating System while singing any Neil Diamond song.

(if you don't know who Neil Diamond is, ask your parents)

 

This file is best viewed with eyes.

 

The Commands and how to use them:

 

 

#addexp name n:                                            This is used to add experience to any player/bot currently in the game

 

#addexp John 1000

Adds 1000 exp to John.

 

#addexp GoblinRunt12 10000

Adds 10000 exp to a bot named GoblinRunt12

 

#setexp name n:                                             Sets a player's EXP to n.

                                                                        This is the alter ego to the above. It does not graduate and confer all the bene's of a level

                                                                        this puppy just sets you to whatever you put it at. That means no SP are gained by this

 

#setexp John 100

 

 

 

#addlck name n:                                             Just adds luck to any bot/player see #addexp for useage.

 

#addsp name n:                                               Adds Sp to the bot/player Pointless for a bot. see #addexp for useage.

 

#setsp name n:                                                Sets a player's SP credit pool to n. Like #setexp, this just sets it to the number you enter.

 

#setsp John 100

                                               

 

 

#addrankpoints name n:                                 This ony works if a person is in a house. You can add 1 million rp to a lvl 1 person, but if they are not in a house,

                                                                        it does bupkiss. Works the same as addexp, except it is useless on bots.

 

#addrankpoints John 100

 

#addbank name n:                                          Adds n coins to player's bank reserves. see #addexp for useage.

 

#addcoins name n:                                          Adds n coins to player's current carried coins. see #addexp for useage.

 

#sethp name n:                                               Sets a player's HP to n.

 

#setmana name n:                                          Sets a player's MANA to n.

                       

                                                                        The thing with #sethp and #setmana, is that the server will not allow you to go over the players max level.

                                                                        So if when completely healed John has 200 HP, #sethp John 10000 will only set his hp to 200. Also, you cannot go below 1.

                                                                        So #sethp John 0 sets John to 1 hp.

 

 

 

 

For the above items, the negative also applies IE:

 

#addexp John -1000

removes 1000 exp from John

#addlck John -10

removes 10 luck from John

 

Use caution however because going to far into the negative (or to far into the positive) can get weird

.

 

 

#addskill name skillId n:                                ah the ole addskill. This on is a little tricky at first.

                                                                        The skillid can be found 3 ways:

                                                                        1) just count the tab screen. The 1st page is skillid 1-6

                                                                        the second page is 7-12, ect...

                                                                         2) Goto the file skills.cs and look at the second grouping

                                                                        3) Look below:

                                                           

                                                                                                [1] = Slashing";

                                                                                                [2] = Piercing";

                                                                                                [3] = Bludgeoning";

                                                                                                [4] = Dodging";

                                                                                                [5] = Weight Capacity";

                                                                                                [6] = Bashing";

                                                                                                [7] = Stealing";

                                                                                                [8] = Hiding";

                                                                                                [9] = Backstabbing";

                                                                                                [10] = Offensive Casting";

                                                                                                [11] = Defensive Casting";

                                                                                                [12] = Spell Resistance";

                                                                                                [13] = Healing";

                                                                                                [14] = Archery";

                                                                                                [15] = Endurance";

                                                                                                [16] = (no longer used)";

                                                                                                [17] = Mining";

                                                                                                [18] = Speech";

                                                                                                [19] = Sense Heading";

                                                                                                [20] = Energy";

                                                                                                [21] = Haggling";

                                                                                                [22] = Neutral Casting";

 

#getskill name skillId:                                    Displays name's skill in skillId

                                   

                                                                        This is handy to find out why that level 1 guy is bashing for 5000 hp's.

                                                                        see the above list for skillID's

 

#anon targetname color:                                Does a global anonymous message with the color specified

                                                                        the colors:

0: white

1: red

2: beige

3: green

 

example:

#anon all 1 Hello world

 

the message that everyone sees is Hello world in red.

the message you and other admins see is

 

[ANON] yourname: Hello world

 

#anon John 1 Hello John

 

this message goes only to John.

 

The Block Shop:

 

 

#block blockName:                                        This is the start of the really wiggy stuff. You start a block to add a TRPG function of sorts

                                                                        all of the stuff that is typed after #block will be part of that block (assuming the block hasn't been closed)

                                                                        so if you make a script and exec it and suddenly you can't talk, you didn't close the block.

                                                                        to close it, type:

 

#endblock:                                                      Ends the current block.

           

                                                                        an example:

 

#block smile

#addexp John 1000

#addlck John 10

#addsp John 100

#endblock

 

                                                                        This creates the block smile and that brings us to...

 

#call blockName:                                            this calls any block that YOU have made. if there are 15 admins in the game, you cannot call their blocks

                                                                        to use this, just type

                                   

#call smile

 

                                                                        that will run all of the lines between the line #block smile and #endblock

                                                                        so John will be given 1000 EXP, 10 Luck, and 100 Skill Points.

                                                                        you can also pass a few variable into that, but we won't touch that just yet.

 

#delblock name:                                             Deletes a block (does not trigger any events)

                                   

#delblock smile

this deletes the block smile (that is all of the lines starting with #block smile to #endblock)

 

#clearblocks:                                                  Clears all your blocks. As all of your blocks take memory space from the server,

and some servers act like a 486, it is ALWAYS

                                                                        a good idea to run this before you go, or after you are done with your quest.

 

                   On blocks:

                                    You can not have more than 1 block with the same name,

if you give a block a name that already exists, that block overwrites the existing block.

                                                                        If you screw up your typing right in the middle of a 30 line block, then just end it and start over.

                                                                        Kind of sucks, but there is a better way which I will show you later.

                                                                        If you drop, you block is still there, but it is set to the default clientid. Since that ID cannot hold admin,

                                                                        your blocks no workie. But if you rejoin, your blocks will be happy to see you,

and come right back to you (once you enter admin again).

                                                                        That is why it is important to clear your blocks before you leave.

Too many blocks in memory can cause the Lag Train to come to the

                                                                        station. Now if the server crashes, all of your blocks get sent to block heaven,

and you must start anew next time you want to use them.

 

#listblocks {name}:                                         Lists all your blocks.

 

#scheduleblock blockname time repeats: This schedules any block you desire to be called in X seconds N number of times

                                   

                                                                        This is an EXTREMELY handy thing. You can set this at the end of a block and have

                                                                         it call in the clear Calvary, or even get devious and have it kill whomever

                                                                         happen to take a particular pack, or kill a monster that wasn't supposed to be killed.

                                                                        FUN FUN FUN!!!

 

#block blahblahblah

#scheduleblock lol 5 0

#endblock

 

                                               

the Onconsider:

 

 

                                                                        This little bugger is perhaps the most fun, but seems to take more memory. Don't know how true or false that is.

                                                                        Also, they are not assigned to an admin, rather they look to an object/bot. This means they stay active till that item/bot is deleted.

                                                                        So if you set a table to toss the player 1000 meters in the air,

it will continue to do so till that table (or that onconsider) is deleted.

 

the following assumes that the pack key is set to P

 

#onconsider tagname radius keep all/targetname: Sets an event to happen when someone gets within the set range and hits the P button

 

                                                                        The translation:

 

                                                                        the tagname this is the name of the dis file that you what to set  the onconsider too.

           

                                                                        the keep is either true or false. What this means is that if it is true, the onconsider will

                                                                        reamin in effect after it has been used. If it is false, it will run only once then clear its self.

 

                                                                        the all/targetname is special as it can set the onconsider to work for everyone or

                                                                        for just a specific person.

                                                           

                                                                        the < that is there is a redirector of sorts. it is kind of like an if statement in C

                                                                        it basically says that if oncondsider is called then do what follows the >.

 

#onconsider table 10 true all <#call smile

 

                                                                        this will set the dis file named table to call the block smile every time someone

                                                                        looks at in and hits P while they are closer than 10 meters.

 

 

                                     

#listonconsider [tagname]:

                                                                        Lists all the onConsider events for tagname (tagname is a specific dis file).

                                                                        If tagname is omitted, all the onConsiders are listed.

 

#clearonconsider tagname [index]:

                                                                        Clears an onConsider event for tagname.

                                                                        If index is missing or -1, all onConsider events are cleared for tagname.

 

#onhear name radius keep all/targetname "text"/var:

 

                                                                        An event will be called when "text" is said 'radius' meters from 'name'.

                                                                        Keep is either 'true' or 'false'. 'true' means that the onHear event won't be deleted after use.

                                                                        Use 'all' for the event to be triggered by any player, or use a name in order for the event to

                                                                        be triggered only by this name. Use 'var' instead of "text" if you want #onhear to hear any word

                                                                        or number.

                       

                                                                        example of "Hi"

#onhear Joseph 5 true all "Hi" >#fw Joseph Hi back at ya!

 

                                                                        you say Hi, he says Hi back at ya

 

                                   

Example of var usage:

 #onhear Joseph 5 true all var >#fw Joseph #say You just said ^var to me!

                                                                        the output of that is :

                                                                        if you say wiggywigggywhobwomb to Joseph, he will say

                       

                                                                        You just said wiggywigggywhobwomb to me!

 

                                                                        Keep in mind that the onhear only seems to activate with #say. #global, #tell, and #shout

                                                                        have no effect. Likewise it doesn't seem to be effected by capital letters an onhear

                                                                        set to "Hi" will respond to Hi and hi. Finally, using onhear in a script is different that using it in game.

In a script, it is     #onhear Joseph 5 true all \"Hi\" >#fw Joseph Hi back at ya!

 

 

#listonhear name:                                          Lists all the onHear events for that name

any bot can have multiple onhears set to it.

 

#clearonhear name [index]:               Clears an onHear event for name. If index is missing or -1, all onHear events

                                                                        are cleared for name.

 

#delbot name:                                                 Deletes a bot (does not trigger any events)

 

#delbot John

                                                                        John just fades away, doesn't drop a pack or make any deathcrys, just goes away...

 

 

#echo on/off/message:

                                                                        Off disables messages being sent, on returns it to normal. message sends you a message.

           

                                                                        this little bit of code is nice to put in your quest every now and then as a pointer.

                                                                        You can set it to say "#echo entering the loop" so that you know where in the quest people are.

                                                                        I find it kind of handy. You can decide for yourself.

 

 

#fw name message:

                                                                        Forwards a message to a certain player.

                                                                        When using #fw, remember that it works as if you where who every you are #fw to.

                                                                        you can use any combination (not including admin commands silly. Bot's can't be admins)

                                                                        of stuff to use #fw with. I find it VERY handy in setting the info for a bot.

                                                                        example:

#fw GoblinRunt1 #setinfo I AM THE MEANEST NEWBIE KILLER AROUND!!!

 

                                                                        Then type #getinfo for GoblinRunt1, and you will see the above.

                                   

#fw GoblinRunt1 #cast Remort

 

                                                                        if that Runt is level 101, he will remort.

 

#fw GoblinRunt1 #global none of you punks can take me!!!!

                                                                        This causes the runt to use both 80’s (punks) and 90’s (take) slang for that bit of cross-generational etiquette.

 

 

 

 

Bots and their controls:

 

                        First, there a VERY good coverage of this section in the Forum Documentation done by eSavior, having said that,

                        I am only going in depth on what he didn't cover.

 

#spawn botType displayName loadout [team] {x} {y} {z}: Spawns a bot.

 

#attacklos botname {x} {y} {z}:                     Makes a bot attack a certain position. This command works with pet-bots.

This is a good command if you want a bot to go from point A to point B.

                                                                        A for instance: Spawn a bot at Keldin Town named John. Then use this command

 

#attacklos botname -627 -423 60

 

as soon as you hit enter, John is going hiking to get to that point. If you do not enter the coordinates,

then John is going to run to wherever you happen to be looking…

 

#botnormal botname:                                     This cancels the #attacklos command

#botnormal John

John stops hiking

 

#createbotgroup onewordBotgroup: Creates a BotGroup.

#createbotgroup bots

This command creates a botgroup… Why have a bot group you ask? Well, the fundamentals of a bot group are this:

It works the same as the #follow command in that the bots follow the lead bot.

The good thing about a bot group is that the leadership is inherited.

The first bot in the group becomes the bot leader. This means that all of the bots in that group

will follow the first one. If the first bot dies, then leadership is passed

to the second bot in that group. And so on and so forth. So if you are working with a lot of bots, this is a nice thing to have.

 

#getbotgroupleader botgroup:                       Tells you who the other bots in the botgroup are following. The leader is the first bot in the group until he dies.

 

#botgroup botname botgroup:                        Adds a bot to botgroup

#botgroup John Bots

 

#discardbotgroup botgroup:                           Deletes a BotGroup.

#discardbotgroup Bots

bye bye bots…

 

#listbotgroups:                                                Guess what this does…

 

 

#follow botname targetName:                       Makes botname follow targetName.

 

#cancelfollow botname:                                  Makes botname stop following its target.

 

#freeze botname:                                            Freezes a bot.

 

#cancelfreeze botname:                                 Unfreezes a bot

 

#nodroppack name 1/0:                                  1 prevents a bot from dropping a pack upon death.  For the stingy admin.

                                    This works well on that dragon scale dropping ubers… So long as you like to listen to whining.

 

 

#deathmsg {name} death message:   Specifies a message played upon a player's death.

                                                           

#deathmsg John #say Yippie!!!!

 

                                                                        Once upon a time, you could add the redirector > at the end so that when  a bot died, that

redirector wopuld call. Not anymore. The work around that I use is to have the deathmsg be a

#say, and set an onhear to that bot, with the onhear having the redirector. IE:

 

                        #deathmsg John #say Yippie!!!!

#onhear John 5 false John"Yippie!!!!" >#echo John Died, sniff, sniff

The thing with this is, the onhear has to be EXACTLY like the deathmsg.

           

The biggy with the deathmsg is that you not try to create it BEFORE you create the bot that will be using it.

            Kind of like tying the shoe strings on a sandal.

 

 

#nobotsniff name 1/0:                                     Prevents a bot from detecting users from afar.  This pretty muchs makes a bot like a lemming.

 

#setinvis name 1/0:                                         Sets a player's invisible state. 1 is invisible, 0 is visible. (#hide uses the same type of invisibility)

Good to use for a return from a quest.

 

#refreshbotskills name:                                 Refreshes skills for a bot to match its level.  Say you spawn a bot at level 1, then add 200000 exp to it,

until you run this command, Mr. Server is going to assume that bot is still level 1.

 

#eyes name:                                                    Changes your perspective to that of the other player's but in 3rd person mode. If that is your thing, fine…

 

Miscellaneous, the largest category…

 

#sethouse name partial-housename/NULL: Sets a player's house The names are:

Venk

Antiva

Fenyar

Temmin

 

Null takes you out of any house. If you goof on the spelling, the person/bot will default to house Venk.

This command works for Bots and Players.

 

 

 

#loadout tagname loadoutstring:                   Creates a loadout. Example: #loadout myloadout1 CLASS Ranger EXP 5000 Sling 1 SmallRock 50.

 

#showloadout tagname:                                  Displays the contents of a loadout.

 

#listloadouts:                                                  Displays the contents of every loadout.

 

#delloadout tagname:                                     Deletes a loadout.

 

 

 

 

#takethisstuff name stuffstring:                    Takes stuff from a player as long as the player is carrying every item specified.

 

#givethisstuff name stuffstring:                     Gives a players stuff. Example: #givethisstuff Someguy COINS 20 Longsword 1 EXP 50 LCK 1

                                                                        you can equip items using this command (not weapons) ie:

 

#givethisstuff John leatherarmor0 1

the 0 after the item name equips that item.

 

 

#item name item n:                                         Sets name's itemcount for item to n.

#item John smallrock 1000

this makes John VERY unhappy.

 

That bring me to another point.. Try to avoid give anyone more than 400 of anything. It will set that item to the negative.

            As of yet, the only way I have seen to fix that is to drop and rejoin after you have dropped the stuff.

                       

 

#setteam name n:                                           Sets a player's team to n. Players normally reside on team 0.

                                                            Teams:

[0] = "Citizen"

[1] = "Enemy"

[2] = "Greenskins"

[3] = "Gnoll"                                                    

[4] = "Undead"

[5] = "Elf"

[6] = "Minotaur"

[7] = "Uber"

 

#kill name:                                                      Kills a player, similar to suicide.

 

#listpacks:                                                       Lists the tagnames for all spawned packs.

 

#delpack tagname:                                         Deletes a pack.

 

#spawnpack tagname {x} {y} {z} | packstring:  Spawns a pack.  The * * is everyone.

 

#spawnpack pack | * * EXP 1000

This spawns a pack with 1000 exp right where you are looking.

 

#spawnpack pack -334 -456 60 | * * CLASS Fighter

This spawns a pack at those coordinates (it also changes that persons class)

 

 

The redirector can be used with this for even more fun (the infamous Death packs!!!)

 

#spawnpack pack | * * >#kill Name

spawns a pack that will kill that person

 

#spawnpack pack | John EXP 100000

This spawns a pack that only John can pick up.

 

#spawnpack pack | * * >#call block ^victimName,

 

this spawns a block that calls a block, and send the name of the person that picked it up…

The ^victimName, section will be explained later

 

 

 

#playsound nsound {x} {y} {z}                       Plays a sound.  For a list of sounds look at nsound.cs.              

Be warned, the sounds that have loop in the function mean it. They will just keep on playing…

 

#setvelocity name x y z:                                 Sets name's velocity.  X is East, y is North, z is Up, using a negative number goes exactly opposite directions.

 

#setpvp name 1/0:                                          Left over from the Cold War. Does nothing for the Modern TRPG.

 

#dumbai botname 1/0:                                    1 turns a bot dumb. Similar to #freeze... #freeze might even replace this entirely... =/ … Not yet.. this one no workkie.

 

 

#if {expression} command:                Example: #if {%1 > 0}#echo %1 is greater than 0  Never got this one to work for me…

 

#jail name [time] [jailnumber]:                       Time is in seconds. By default time is 300 seconds and jailnumber is random unless specified.

 

 

                                                First, there a VERY good coverage of this section in the Forum Documentation done by Bender.

 

#spawndis filename tagname {x} {y} {z} {r1} {r2} {r3}: {3} Spawns an InteriorShape.

 

These are pretty self explanatory.

 

#listdis:  Lists the tagnames for all spawned InteriorShapes.

#deldis tagname: Deletes a spawned InteriorShape.

#beg name: Kicks a player out of the game giving them the following message: "Do not beg from an admin! The next time you might be banned, so quit your begging."

#fell name: Teleports a player safely to town. Useful in those silly pack race things, to make sure that the players only get one pack…

 

 

End of the Commands section…

 

 

The Variables and their Use:

 

A list of the variables can be found at the end of comchat.cs. These variables allow for that “personal” touch in that you can specifiy who to tell something, or you can add something to a particular persons inventory. ie:

#block pack

#givethisstuff %1 longsword 1

#endblock

 

#spawnpack pack | * *  >#call pack ^victimName,

 

When this is run, a pack will spawn. That pack will be empty, but when it is picked up, it will call the block pack, and pass to it the name of the person that picked up the pack.

There are 20 different variables that can be used on the victim side (the client is ALWAYS the victim). For every variable you use, increment the precent by one.

#block pack

#givethisstuff %1 longsword 1

#fw %1 #global ATTENTION THIEVES: I have %2 coins on me!

#endblock

 

#spawnpack pack | * *  >#call pack ^victimName, ^victimCoins,

 

There are 2 important thing to know here.

1: EVERY SINGLE VARIBLE MUST END WITH A COMMA. No comma, no workkie.

2: Most of the stuff you can do with variables will not work if an admin triggers them. In the above block, if John hits the pack and is a level 3 admin, that pack won’t do squat.

 

The Variables:

^victimName

            ^victimId";

            ^victimPos";

            ^victimRot";

            ^victimZoneId";

            ^victimZoneType";

            ^victimZoneDesc";

            ^victimClass";

            ^victimLevel";

            ^victimX";

            ^victimY";

            ^victimZ";

            ^victimR1";

            ^victimR2";

            ^victimR3";

            ^victimCoins";

            ^victimBank";

            ^victimVelX";

            ^victimVelY";

            ^victimVelZ";

 

            ^killerName";

            ^killerId";

            ^killerPos";

            ^killerRot";

            ^killerZoneId";

            ^illerZoneType";

            ^killerZoneDesc";

            ^killerClass";

            ^killerLevel";

            ^killerX";

            ^killerY";

            ^killerZ";

            ^killerR1";

            ^killerR2";

            ^killerR3";

            ^killerCoins";

            ^killerBank";

            ^killerVelX";

            ^killerVelY";

            ^killerVelZ";

 

           

 

 

Your first adventure is a “Quest Script”

 

Ever been on a server and seen someone spawn a quest in 10 seconds…

Let me tell you how that happened…

The only thing you need is Notepad.

 

First, goto your config folder (because all quest scripts have to be there)

Next, Create a text file. It is important that you make a text file not a Document.

Open that txt file in NotePad. DO NOT USE WordPad or Word.

Finally save that file as FirstQuest.cs

 

In FirstQuest.cs, we need to lay a foundation for our quest. Initially, lets develop a quest that puts a pack

on top of the fountain in Keldrin Town... I know that this is no “Hello World” quest, but it is more useful…

 

We will start the quest by just making the blocks and calling them.

 

So Open tribes, and switch to Window (OptionsàVideoàWindowedàApply

 

This will open tribes in a smallish window that makes working with other files a little easier.

Adjust the windows so that you can see both the game and the open cs file.

 

Things in a script file work a little different than in game. So we have to prepare the line to honor both C++ and Tribes.

To do that we use the say().

 

The way that works is

 

say(0, "#command");

 

Don’t ask what it all means, because you don’t need to know that… Let’s begin:

First, go to the fountain in Keldrin.

 

Enter you level 3 (or above) admin password to get started.

 

What you want to do is get the coordinates for the top of the fountain. So hop on up there, look at it and hit the pack button.

On mine the coordinates are -2406.98 -271.305 69.5941 Once you have got the coordinates, get the heck off of the fountain. (If you decided not to use the fountain like I told you, then you suck anyway).

I can hear all the groans about those numbers now… (Do I need all of them?!!??!) Answer: Maybe. Just use the Numbers with out the decimal places and see if that works. ( sometimes yes, sometimes no.)

 

So we have the coordinates, it is block time!!!

 

Remember to start with say(0, “# and end with “);

 

say(0, “#block pack”);

say(0, “#fell %1”);

say(0, “#endblock”);

 

 

That is it. Your first scripted block… need a hanky to wipe away the tear? I do…

 

Ok so now what… we have the block, but that is it. Lets use that block. Notice that it has a %1 in it so that means that we have to pass a variable into it to get it to work.

 

So we do this:

 

say(0, “#spawnpack pack -2406.98 -271.305 69.5941 | * * EXP 100 >#call pack ^victimName,”);

 

This concludes our scripting. Now it is time to save that bad boy, fire it up and see it in action!!!

 

So we are back in the game now right? No, the go there.

Open the console by hitting the ~ key (the one in the corner above tab, on most keyboards)

Type in the following (assuming you named the file “firstquest.cs):

 

exec(firstquest);

that will start you up. Since we opted not to use a function on this one, as soon as you  run the file, the script has been run, and the pack is waiting.

 

So goto the fountain and get your pack. As soon as you pick it up, you should be felled… The same will go for anyone else that is not an admin at your level or higher.

Pretty simple huh, oh fine, now your saying how do we get it to run as a function?

 

So Here is the same thing as a function.

 

function pack()

{

say(0, “#block pack”);

say(0, “#fell %1”);

say(0, “#endblock”);

 

say(0, “#spawnpack pack -2406.98 -271.305 69.5941 | * * EXP 100 >#call pack ^victimName,”);

}

 

That is it.. To run it, after you have typed exec(firstquest);

You type :

 

pack();

 

then the darn thing runs again. WOW…

 

do not forget to clear your block when you are done!

 

#delblock pack (incase you forgot)

 

 

You want more you say? Well ok… Let’s mix and mingle things a bit. Let’s combine the “for loop” in c and the #say in tribes to get funky with things…

 

1)      Create a txt file and call it funwithpacks.cs (when you make a new cs file, stop and restart tribes to get it to recognize it.

2)      Open tribes in a window and open the cs file in notepad.

3)      Go get a cp of coffee because this has the potential to get VERY ugly.

 

What we are going to do is create a series of packs that spawn at different coordinates. HOW are we ever going to do that!?!?!? Relax my child, you are in good hands.

 

Bear this in mind. The following code is a demonstration of what CAN be done in a quest. Not what you should be able to do straight out of this reading.

However, feel free to cut and paste as you heart desires.

 

First, we need to establish a few globals (a global is a variable that can be used by any function). Let’s keep it small and use the area outside of keldrin for this…

 

So lets just make the 3 global be equal to the starting coordinates. I am using -2358 -289 70

Since the area around keldrin is kind of hilly, go to the set the z coor (The last number) to 70. That will ensure that all of the packs are above ground, and not on their way to the abyss.

 

Our code is thus:

 

 

$packx = -2358;

$packy = -289;

$packz = 70;

 

                                                                                                            //Then we move to the actual function

           

function funwithpacks()                                                             // use this to add a comment to your function

                                                                                                            // Tribes and C ignore anything that is after a double slash…

{

say(0, "#block 1");                                                                                // the position of things in c is very important. Put things in the order you want them done.

say(0, "#fell %1");                                                                                 // for instance, if we put this section after the loop, there would be no return for the packs

say(0, "#endblock");                                                                             // because the block wouldn't be established yet.

say(0, "#block 2");

say(0, "#setexp %1 0");

say(0, "#endblock");    

 

                                                                                                            // inside the function , lets add a few mar variables to make different packs

%x = 3;

%y = 3;                                                                                                //these variables cause the packs to go move.

%newx = 0;

%newy = 0;

%packcounter = 1;                                                                               //this is the starting name of the packs

 

            %newx = (%x + $packx);                                                         //this section graduates the x and y coordinates.

            %newy = ($packy - %y);        

 

for(%counter=0;%counter<11;%counter++)                                         //this is where all of the messiness can come in. if you goof a loop, it can either run forever,

{                                                                                                          //or not run at all. The x<11 means that it will run till x is = to 11 be careful because x and X are not the same

                        %cnt = 3;                                                                     //sets the result of the random number to between 0 and 3

                        %who = (getRandom() * %cnt);                                   // this is a call to another function that sets a random number.

                        echo(%who);                                                                // this puts the resulting number in the console for you to see.

 

 

 

            if (%who < 1)

            {

                        say(0, "#spawnpack "@%packcounter@" "@%newx@" "@%newy@" "@$packz@" | * * EXP 1000 >#call 1 ^victimName,");

            }                     

            else if ((%who > 1)&&(%who < 2))

            {

                        say(0, "#spawnpack "@%packcounter@" "@%newx@" "@%newy@" "@$packz@" | * * SP 10  >#call 1 ^victimName,");

            }

            else if ((%who > 2) && (%who < 2.9))

            {

                        say(0, "#spawnpack "@%packcounter@" "@%newx@" "@%newy@" "@$packz@" | * * EXP -1000 >#call 1 ^victimName,");

           

            }         

            else if ((%who > 2.9) && (%who < 3))

            {

                        say(0, "#spawnpack "@%packcounter@" "@%newx@" "@%newy@" "@$packz@" | * *  >#call 2 ^victimName,");

           

            }                                                                      // the section above just makes a use out of all of the numbers between 0 and 3.

                                                                                    // if you look at what happens, each pack section is different.

%newx = (%newx + %x);                                             // but which one that is chosen is completely random.

                                                                                    // also, the pack name gives no hint as to what is in it, so the person that

                                                                                    // runs this is the only one that has a chance to figure out what is what.

                                                                                    // you can do that by looking in the console.

           

%newy = (%newy - %y);        

%packcounter++;                                                         //this add one to the pack name (1 becomes 2 which become 3 etc…)

}                                                                                  //this is where the loop ends

return;                                                                          //this is where the function gives control back to Tribes

}                                                                                  //this is the end of the function.

 

                                                                                   

function clearfunwithpacks()                                                      //The section that clears it all.

{                                                                                              //this function will wipe away all 10 packs and both blocks

%packcounter = 1;                                                                   //if there are no packs, this will still run, but will give you a message

                                                                                                //telling you that the names were invalid.

 

            for(%counter=0;%counter<10;%counter++)

                        {

                        say(0, "#delpack "@%packcounter@"");          //this is the loop that clears the packs

                        %packcounter++;

                        }         

say(0, "#delblock 1");                                                               //this is the section that clears the blocks

say(0, "#delblock 2");

}

 

Once the above function is finished running, you will have 10 packs in a row. Each pack is subject to the random number, so you may get 1 level, loose one level, or gain 10 sp.

There is also on that may set you to 0 exp, but there is only a .1 percent chance of that each time the loop runs, makes for a good betting game.

 

Another way to make quests is the server method.

This method is for server owners, because all of the info has to be put in the autoexec.cs file.

It starts with the simple line:

 

 

$ServerQuest[1] = “ ”

 

as seen here.

 

$ServerQuest[1] = "#spawnpack pack -2433.95 -265.899 77.5941 | * * EXP 10 >#scheduleblock Next 5 3";

$ServerQuest[2] = "#block Next";

$ServerQuest[3] = "#spawnpack pack -2433.95 -265.899 77.5941 | * * EXP 10";

$ServerQuest[4] = "#endblock";

 

as you can see, the server quests are somewhat more limited in that you have to stay inside the commands, but they are possible, you just have to remember a few things:

1)      Make sure your numbers are sequential and in order

2)      Make sure that you give enough time for the server to start before the quest starts. That can get ugly…

3)      You can make the quest in a separate file, and then run that file from the autoexec.

4)      You CANNOT have more than one line with the same number…

5)      Make sure that you get everything in the clear section, or it will sit there till the server crashes or a lvl 5 admin clears them.

 

The following is a sample server quest:

 

 

You can either copy this to your autoexec.cs or create another .cs file and put exec(“yourfilename.cs”); in the autoexec.cs

 

 

%i = 0;             //this is an easier way than numbering each line. Also, you can move things around,

//and not have to renumber the entire thing… < changed 24 FEB 02 >

 

                        //-----------------------    Loadouts    ----------------------//

                        //         And the spawn of Gandolf and the caster                  //

                        //-------------------------------------------------------------//

 

$ServerQuest[%i++] = "#block Gandolfstart";

$ServerQuest[%i++] = "#loadout Gandolf CLASS Fighter EXP 1110000 LCK 10000";

$ServerQuest[%i++] = "#loadout Gcaster CLASS Mage EXP 1110000 LCK 10000";

$ServerQuest[%i++] = "#spawn Paladin Gandolf Gandolf 6 -1922 -2813.69 161.42";

$ServerQuest[%i++] = "#freeze Gandolf";

$ServerQuest[%i++] = "#fw Gandolf #setinfo  I AM YOUR LORD AND MASTER TO SAY NO IS TO DIE [master]";

$ServerQuest[%i++] = "#spawn Civilian Caster Gcaster 0 -1919.33 -2813.74 161.92";

$ServerQuest[%i++] = "#freeze Caster";

$ServerQuest[%i++] = "#setinvis Caster 1";     

$ServerQuest[%i++] = "#loadout MinorDemon EXP 240000 Claymore 1 LCK 10";

$ServerQuest[%i++] = "#onconsider Gandolf 10 true all >#call Gandolftalk ^victimName,";

 

 

 

                        //-----------------------  Converstion   ----------------------//

                        //                                                                                         //

                        //-------------------------------------------------------------//

 

 

 

$ServerQuest[%i++] = "#onhear Gandolf 20 true all \"master\" >#call gandolfmaster ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

 

$ServerQuest[%i++] = "#block Gandolftalk";

$ServerQuest[%i++] = "#fw Gandolf #tell %1, STOP LOOKING AT ME AND SAY master";

$ServerQuest[%i++] = "#call Gandolfstart";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block gandolfmaster";

$ServerQuest[%i++] = "#fw Gandolf #tell %1, Mortal you will follow my commands? Yes or No";

$ServerQuest[%i++] = "#call answer";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block answer";

$ServerQuest[%i++] = "#clearonhear Gandolf";

$ServerQuest[%i++] = "#onhear Gandolf 10 true all \"yes\" >#call gandolfYes ^victimName,";

$ServerQuest[%i++] = "#onhear Gandolf 10 true all \"no\" >#call gandolfNo ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block gandolfYes";

$ServerQuest[%i++] = "#fw Gandolf #tell %1, Your belief has been rewarded.";

$ServerQuest[%i++] = "#clearonhear Gandolf";

$ServerQuest[%i++] = "#addexp %1 500";

$ServerQuest[%i++] = "#fw Gandolf #tell %1, A very minor demon is coming to your world.";

$ServerQuest[%i++] = "#fw Gandolf #tell %1, find and destroy him. Beware though he is minor, that is from my view.";

$ServerQuest[%i++] = "#fw Gandolf #tell %1, Go now mortal.";

$ServerQuest[%i++] = "#scheduleblock Slavarius 20 0";

$ServerQuest[%i++] = "#call Cast ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

 

$ServerQuest[%i++] = "#block gandolfNo";

$ServerQuest[%i++] = "#fw Gandolf #tell %1, Away with you Infidel";

$ServerQuest[%i++] = "#kill %1";

$ServerQuest[%i++] = "#clearonhear Gandolf";

$ServerQuest[%i++] = "#call CastNo";

$ServerQuest[%i++] = "#endblock";

 

 

                        //---------------------------- EFX ----------------------------//

                        //                                   May or may not cause lag               //

                        //-------------------------------------------------------------//

 

$ServerQuest[%i++] = "#block Cast";

$ServerQuest[%i++] = "#fw Caster #cast dimensionrift";

$ServerQuest[%i++] = "#scheduleblock moveem 7 0 ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block CastNo";

$ServerQuest[%i++] = "#fw Caster #cast dimensionrift";

$ServerQuest[%i++] = "#scheduleblock moveemNo 7 0 ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block moveem";

$ServerQuest[%i++] = "#fw Gandolf #cast remort";

$ServerQuest[%i++] = "#scheduleblock remortem 5 0 ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block moveemNo";

$ServerQuest[%i++] = "#fw Gandolf #cast remort";

$ServerQuest[%i++] = "#scheduleblock remortemNo 5 0";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block remortem";

$ServerQuest[%i++] = "#delbot Caster";

$ServerQuest[%i++] = "#delbot Gandolf";

$ServerQuest[%i++] = "#clearonhear Gandolf";

$ServerQuest[%i++] = "#endblock";

 

 

$ServerQuest[%i++] = "#block remortemNo";

$ServerQuest[%i++] = "#delbot Caster";

$ServerQuest[%i++] = "#delbot Gandolf";

$ServerQuest[%i++] = "#clearonhear Gandolf";

$ServerQuest[%i++] = "#call GodsClearAll";

$ServerQuest[%i++] = "#endblock";

 

                        //---------------------------- Slavarius ----------------------//

                        //                                  Enter the demon                              //

                        //-------------------------------------------------------------//

 

$ServerQuest[%i++] = "#block Slavarius";

$ServerQuest[%i++] = "#spawndis bunker bunker -1285.83 -3033.55 342.367";

$ServerQuest[%i++] = "#spawn spawn Slavarius MinorDemon 0 -1288.79 -3024.12 342.866";

$ServerQuest[%i++] = "#freeze Slavarius";

$ServerQuest[%i++] = "#fw Slavarius #setinfo  They called me a demon!?!?! [demon]";

$ServerQuest[%i++] = "#onhear Slavarius 20 true all \"demon\" >#call Slademon ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block Slademon";

$ServerQuest[%i++] = "#fw Slavarius #tell %1, I can offer you a better deal... [Yes No]";

$ServerQuest[%i++] = "#call SlaYesNo ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block SlaYesNo";

$ServerQuest[%i++] = "#clearonhear Slavarius";

$ServerQuest[%i++] = "#onhear Slavarius 10 true all \"yes\" >#call SlavariusYes ^victimName,";

$ServerQuest[%i++] = "#onhear Slavarius 10 true all \"no\" >#call SlavariusNo ^victimName,";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block SlavariusYes";

$ServerQuest[%i++] = "#clearonhear Slavarius";

$ServerQuest[%i++] = "#fw Slavarius #global BEWARE %1, THEY WILL DEAL WITH A DEVIL";

$ServerQuest[%i++] = "#addexp %1 -3000";

$ServerQuest[%i++] = "#addrankpoints %1 -2";

$ServerQuest[%i++] = "#call Slav";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block SlavariusNo";

$ServerQuest[%i++] = "#clearonhear Slavarius";

$ServerQuest[%i++] = "#fw Slavarius #tell %1, Pathetic fool...";

$ServerQuest[%i++] = "#addlck Slavarius -8";

$ServerQuest[%i++] = "#addexp %1 3000";

$ServerQuest[%i++] = "#call Slav";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block Slav";

$ServerQuest[%i++] = "#delbot Slavarius";

$ServerQuest[%i++] = "#spawn spawn Slavarius MinorDemon 6 -1288.79 -3024.12 342.866";

$ServerQuest[%i++] = "#nodroppack Slavarius 1";

$ServerQuest[%i++] = "#deathmsg Slavarius #shout HOW! YOU ARE JUST A MORTAL!";

$ServerQuest[%i++] = "#onhear Slavarius 10 true all \"HOW! YOU ARE JUST A MORTAL!\" >#scheduleblock SlavariusDies 3 0";

$ServerQuest[%i++] = "#delloadout MinorDemon";

$ServerQuest[%i++] = "#endblock";

 

$ServerQuest[%i++] = "#block SlavariusDies";

$ServerQuest[%i++] = "#spawnpack Slavarius1 -1288.79 -3024.12 342.866 | * * EXP 1000 COINS 9000 SP 50 >#scheduleblock GodsClearAll 5 0"; 

$ServerQuest[%i++] = "#anon all 1 Type #savecharacter NOW!";

$ServerQuest[%i++] = "#endblock";

 

 

 

                        //---------------------------- Clearing------------------------//

                        //                                                                                         //

                        //-------------------------------------------------------------//

 

            $ServerQuest[%i++] = "#block GodsClearAll";

            $ServerQuest[%i++] = "#delblock gandolfhi";

            $ServerQuest[%i++] = "#delblock GandolfStart";

            $ServerQuest[%i++] = "#delblock answer";

            $ServerQuest[%i++] = "#delblock gandolfNo";

            $ServerQuest[%i++] = "#delblock gandolfYes";

            $ServerQuest[%i++] = "#delblock Cast";

            $ServerQuest[%i++] = "#delblock moveemNo";

            $ServerQuest[%i++] = "#delblock moveem";

            $ServerQuest[%i++] = "#delblock Slavarius";

            $ServerQuest[%i++] = "#delblock SlavariusDies";

            $ServerQuest[%i++] = "#delblock remortem";

            $ServerQuest[%i++] = "#delblock Killem";

            $ServerQuest[%i++] = "#delblock remortemNo";

            $ServerQuest[%i++] = "#delblock CastNo";

            $ServerQuest[%i++] = "#delblock Slademon";

            $ServerQuest[%i++] = "#delblock SlaYesNo";

            $ServerQuest[%i++] = "#delblock SlavariusYes";

            $ServerQuest[%i++] = "#delblock SlavariusNo";

            $ServerQuest[%i++] = "#delblock Slav";

            $ServerQuest[%i++] = "#deldis bunker";

            $ServerQuest[%i++] = "#delblock Gandolftalk";

            $ServerQuest[%i++] = "#delblock gandolfmaster";

            $ServerQuest[%i++] = "#delloadout Gandolf";

            $ServerQuest[%i++] = "#delloadout Gcaster";

            $ServerQuest[%i++] = "#delloadout MinorDemon";

 

            $ServerQuest[%i++] = "#delbot Gandolf";

            $ServerQuest[%i++] = "#delbot Caster";

            $ServerQuest[%i++] = "#delbot Slavarius";

            $ServerQuest[%i++] = "#delblock GodsClearAll";

            $ServerQuest[%i++] = "#endblock";

 

 

            $ServerQuest[%i++] = "#scheduleblock Gandolfstart 100 0";

 

 

 

As you can see, the quest is a lot more structured in that everything has to have  a start, and a direction to flow. Because there is no one there to monitor this, think of it as a playstation game. You cannot patch it on the fly; you have to take the whole thing down to fix it. So it is vitally important that it be right.

Also notice that the very last line is the one that starts the whole quest. It is best to put it there, so in the event there is lag, you still have 100 seconds till it starts.

 

 

 

NOTES:

 

            The larger the quest the more lag it can make. Therefore it is a good idea to segment your quests.

If you are going to have 15 or 20 blocks of 3 or more lines, consider grouping the blocks into separate functions so that you reduce the amount of info that is being sent to the server.  The reason is, when you run a function that has 10 blocks, the server loads all 10 blocks right then, the more complex the block, the longer it takes to run it. All of that information has to be uploaded to the server, and that takes bandwidth. That means that the server has to “pause” the other players to take in all the stuff you are sending them. Plus by virtue of the way they work, Functions have to return before the stuff in them is loaded. So if you try to load 30 blocks in 1 function, you WILL lag the server because all 30 lines are being loaded at 1 time. Doing a quest without a function is no better, then there is a continual stream of data that has to be dealt with. So consider breaking them into separate functions. Presto’s Schedule.cs is the right tool for that job, so get it and use it…

 

More on Stuff:

When you run that quest with the random packs, and watch it in the console; all of the numbers are generated before the packs are spawned. Even though the code has the packs spawning in the middle of the loop, the server loads them into memory, and then dumps them out when the function is returned. That means that if you tried to spawn 10 bots using a “for loop”, the bots won’t actually spawn until the function is over. That creates a lot of lag to deal with, and could even crash the server.

 

Also, a quest that runs fine on your machine may have difficulty running on another server. Server side quests can be larger and will run faster simply because there is not a lot of information being sent across the internet. So keep that in mind on you your questing adventure

 

The  Document version

 

 

                        //-----------------------------------------------------------------//

                        //                                  THE END                                      //

                        //      I can be reached at susanthetraveler@hotmail.com  //

                        // at least I will be till one of you guys starts signing me  //

// up for a bunch of mailing lists                               //

// You can test your scripts @ Sue’s quest scripting            //

// the level 3 admin password is admin                    //

                        //-----------------------------------------------------------------//