This is a guide over how to make your own PScript, and then you can convert it to a WR profile.
__________________________________________________ _______
To Start Off:
The proper name for Ppather script is pscript. Those that remember my old guide this one was updated for the newest in the bizz, but so much was done I decided to repost it.
What Is PScript?
Pscript is the language used for coding, Ppather tasks. Yes it is PpaTHer not panther. It is a nice and easy language, great for beginners, easy for pros.
The differences, pscript and others.
One of the BIG, I mean BIGGG!!! Differences in Pscript and other forms of scripting is, no preprocessors. This is also what I call an “English-Language” it means that the Variables in the script, do what they say, not like “$MyZone” tells the bot that your targets, zone would be after the attack.
The semi-colon:
The semi colon, is one of the most important parts of Pscript. If you have ever coded in another coding language then it may be familiar to you that some lines end with a “;” (semi-colon(looks like this ; there are no “s”)). In Pscript though all commands end with a ; it is to clarify “end of command” a missing ; is the most common bug in a hand written script.
Example: nonworking- $Prio = 2
working- $Prio = 2;
The Friendly Neighborhood //:
As is in most scripts, you can put a // to put notes, it wont flag it as a command, but ignore it (in other languages it is a #) There are two types of notes, WHOLE line notes, and, brace yourself, non-whole line notes! It is like that in most languages that use //.
Ex:
You and Variables:Code://this is a whole line note $MyDurability //this is a non-whole line note.
Variables are simple things. They always have a $ in front of them so you know. A variable controls what to do next. Gliders extension will flag the variable when loaded, so when the time comes Glider will use it to check on things that can CHANGE hence it being a variable.
Exs:
What else is there to say about Variables... Hmm they control what is happening and what is going to happen.Code:$IsInCombat $MyZone $MySubZone $MyHealth $MyMana $MyEnergy $MyDurability $MyGearType $MyX $MyY $MyZ $FreeBagSlots $MyMoney $IsStealthed $BGQueued $AlreadyTrained $ItemCount
IsStealthed, tells the bot weather you should be in stealth or not, this is a great example of, what I call, “Non-English Pscript”. Most Variables are self-explanatory, like MyMana, but IsStealthed not so much.Code:$IsStealthed = True //This is a great example
The = True tells it it should be in stealth, If it said = False, means that you shouldn't during this event. Some Variables don't use True and false some use 1 and 0. Or even for those like MyMana it could be 5402 for if your health reaches that, the bot will do this. One last touch on Variables, they are CaSe-SeNsItIvE, meaning the capitols have to be right.
A Function:
If you have ever coded in ANY language, just skip this. Great example of this is the “HaveBuff” Function. As many know glider is bad at buffing. But Ppather checks to see if you have a buff by using this function.(this was written for Glider at first I converted all the major parts to work for WoW-Robot.)
The Operator:Code:HaveBuff(Inner Fire) //This can be anyother buff.
Not to much detail on this I don't like them much.
A simple example is
$var1 +2
That makes it $var3
Messy coding, to confuse the user maybe, but yeah as I said I hate it.
Okay you get more than that. They modify Variables, simply put +2 adds two to the variable.
The Mother Goose:
So lets move on the the mother goose and her hens (thats right for a goose right?)
Par, its the mother of your commands. Now since I am a strong believer in learn by seeing here it is:
Several other preprocessors are:Code:Par { Defend { $Prio = 0;} Loot { Prio = 2;} Danger { $Prio = 1;} }
Code:Seq If ThenThis means: Until The item Light Leather is 10 go to this spot and skin kills.Code:Until { $cond = ($ItemCount{“Light Leather”} = 10) ; Par { Hotspots [[Hotspots]] //read later } Loot { $Skin = True } }
This is some messy scripting on my part I know.
Hotspots:
Hotspots tells the bot were to go. It doesn't mean stay confined to this area. It says anything with in a 500 yard vicinity is fare game, run around in this area.
Hotspots are more than the killing zone though, they are also were some vendors are, that detail will come in later at the example script.
Hotspots are just a general area to tell you where to go to. Getting a hotspot in WoW-Robot is harder than back in Ppather. You need to know your X Y and Z and fill it in.
Script:
Here it is the long awaited example script. Here I will touch up on Variables not talked about.
The Break Down:Code:Par { $MinLevel = $MyLevel-6; $MaxLevel = $MyLevel + 2; Defend { $Prio = 0; } Danger { $Prio = 1; $Distance = 20; } Loot { $Prio = 2; } Par { $Prio =2; $MinDurability = .1; $MinFreeBagSlots = 4; $SellGrey = true; $SellWhite = true; $SellGreen = false; $Protected = ["bandage", "leather", "hearth", "copper rod", "shot", "arrow", "potion", "ore", "mining pick", "ribs", "poison", "shell", "thieves", "injector", "flash powder", "mote", "primal", "text", "fertile", "candle", "grainbread", "water", "skinning", "sargeras", "conjured", "brie", "banana", "strange dust"]; Vendor { $RepairNPC = "Nargal Deatheye"; $SellNPC = "Nargal Deatheye"; } } Pull { $Prio = 3; $Factions = [16, 189, 48, 130, 15, 38]; } Hotspots { $Prio = 4; $Order = "Random"; $Locations = [[ -811.1, -2695.9, 93.3], [ -947.0, -2777.2, 93.2], [ -1110.2, -2960.8, 92.7], [ -1083.0, -3189.3, 91.7]]; / } }
This says the first thing to do is make sure you are safe. Then make sure you are not in agro range, THEN Loot.Code:Defend { $Prio = 0; } Danger { $Prio = 1; $Distance = 20; } Loot { $Prio = 2;
Lets crack into some vendoring VIA Ppather.
This says when resting its your third priority is to:Code:Par { $Prio =2; $MinDurability = .1; $MinFreeBagSlots = 4; $SellGrey = true; $SellWhite = true; $SellGreen = false; $Protected = ["bandage", "leather", "hearth", "copper rod", "shot", "arrow", "potion", "ore", "mining pick", "ribs", "poison", "shell", "thieves", "injector", "flash powder", "mote", "primal", "text", "fertile", "candle", "grainbread", "water", "skinning", "sargeras", "conjured", "brie", "banana", "strange dust"];
repair if below 90%
Have at least 4 bag slots
Sell all greys
sell all whites
Keep all greens
Don't sell anything with a word(s) that follows: bandage, leather, hearth, copper rod, shot, arrow, potion, ore, mining pick, ribs, poison, shell, thieves, injector, flash powder, mote, primal, text, fertile, cnadle, grainbread, water, skinning, sargeras, conjured, brie, banana, and strange dust.
What vendor do you want?
This is pretty simple, it tells the bot what vendor to vendor to.
There are several other Preprocessors. One would be the Preprocessors Pull.Code:Vendor { $RepairNPC = "Nargal Deatheye"; $SellNPC = "Nargal Deatheye"; } }
_________________________________________________
There is much more to my original guide that what is here. It's all just a wall of code though. If you would like more I can post it, but it wont help as much as this first part.


LinkBack URL
About LinkBacks


Reply With Quote
SEO by vBSEO 3.5.0 RC2