CustomMode for professionals - MMOCrawlerbots | WoW Bot Forum
Important: Please register to use the 20 minutes trial version or buy the bot!
Bot ready for World of Warcraft 5.4 Build 17538

UpdateLauncher DOWNLOAD

Wow Bot: CrawlerBot Last version: click here State: EU: working US: working

Author Topic: CustomMode for professionals  (Read 5559 times)

October 30, 2012, 19:09:57 PM

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
With the CustomMode you can really do everything like in the good old Pirox-times. In this thread I will write a tutorial.


Note: This Tutorial will based on the legendary Framework. You do not have to use it, but it will make your life much easier.


Table of content


LUA-Basics
How a CustomMode works
Create the first CustomMode Profile
Using the Legendary Framework
Using the Legendary Editor
Overview Functions Bot
Overview functions Legendary framework

Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

October 30, 2012, 19:12:13 PM
Reply #1

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
Note: I'll ask Kampfschaf if I can use his English guide

Variablen
Als erstes haben wir die Variablen. In Variablen werden Daten zwischengespeichert und es gibt verscheiden Typen für Buchstaben zahlen und Zustände. Den Type für Zustände nennt man auch Boolean und kann entweder true (wahr/ja) oder false (falsch/nein) beinhalten.
Variablen für Zahlen heißen number. Die Unterscheidungen sind wichtig, da man diese Tpyen nicht untereinander zuweisen kann. Eine Zahl bleibt immer eine Zahl, ein Boolean immer ein Boolean. Es gibt auch noch Zeichenketten die Buchsatben beinhalten. Der Inhalt muss immer in Anführungszeichen zugewiesen werden.

Beispiel:
Code: [Select]
a = 1
b = 2
c = true

ergebnis = a + b
fehler = a + b + c

zeichenkette = "Hallo!"
Ergebnis wird 3 sein, während die variable fehler einen Fehler verursachen wird, da man Zahlen nicht mit Zuständen addieren kann.

Übrigens in LUA müssen wir nicht, wie in anderen Programmiersprachen Typisch die variablen initialisieren, man könnte aber indem man das Schlüsselwort local benutzt.
Code: [Select]
local a=1
Funktionen
Da wir Funktionen für Custom Classes nicht dringend brauchen, hier nur ein kurzer Einblick: Eine Funktion ist eine Möglichkeit sich wiederhohlende Aufgaben zusammen zu fassen. Man kann sie mit Parametern aufrufen und sie gibt am Ende ein Ergebnis zurück.

Funktionen können ganz einfach mit ihrem Namen aufgerufen werden. Eine Funktion beginnt immer mit dem Schlüsselwort function Gefolgt von dem Namen und den Parametern. Ein Parameter sind Variablen die innerhalb der Funktion benutzt werden sollen. Mehrere parameter werden mit einem Komma getrennt. Eine Funktion endet immer mit einem end davor jedoch muss mit dem Befehl return etwas zurückgegeben werden.

Beispiel:
Code: [Select]
function [/b]NAME_DER_FUNKTION()
  return
end

function]addiere(_a, _b)
  return [/b]_a +_ b
end

ergebnis = addiere(1, 2)
Im ersten Beispiel wird nichts zurückgegeben. Trotzdem muss return vorhanden sein. Das zweite Beispiel addiert einfach 2 Zahlen und gibt das Ergebnis zurück.

Operatoren
Wichtig für uns sind die Vergleichsoperatoren. Hier eine Übersicht:
== Ist gleich
~= ungleich
< größer als
> kleiner als
<= größer oder gleich
>= kleiner oder gleich

Die logischen Operatoren können Benutzt werden um Bedingungen zu verknüpfen dafür gibt es folgende:

and beide Bedingungen müssen erfüllt sein
or eine Bedingung muss erfüllt sein
not bedeute eine Umkehrung "Wenn etwas nicht zutrifft."

Diese logischen Operatoren können miteinander Verknüpft werden. Ziemlich trokcendes theam aber Grundlage für Verzweigungen.

Verzweigungen
Das ist der Kernbereich für die Custom Classes.  Für eine Verzweigung prüft ob eine bedingung wahr ist und führt dann einen Anweisungsblock aus. Man muss genau wie bei Funktionen aber immer das Ende einer Verzweigung mit end angeben.
 Man muss sich das so vorstellen:

Wenn (Bedingung erfüllt ist) dann (mache ein paar Sachen) Ende.
Die Befehle dafür sind if (=Wenn) then (=dann) elseif (=wenn nicht, dann prüfe nächstes wenn) else (=andernfalls)

Hier ein beispiel für eine einfache Verzweigung. Wenn die Bedingung erfüllt ist führe die Anweisung aus:
if Bedingung then Anweisung end
Wenn die bedingung erfüllt ist dann soll Anweisung1 ausgeführt werden in allen andern Fällen anweisung2

if Bedingung then 
   Anweisung1
else
   Anweisung2
end


Wenn die Bedingung1 erfüllt ist dann soll Anweisung1 ausgeführt werden, wenn die bedingung2 erfüllt ist dann soll Anweisung2 ausgeführt werden in allen andern Fällen Anweisung3

if Bedingung1 then 
   Anweisung1
elseif Bedingung2 then
   Anweisung2
else
   Anweisung3 
end


Wir können Bedingungen mit auch logischen Operatoren Verknüpfen.

Beispiel:
Code: [Select]
if (1<2) then _Log("Puh Glück gehabt, 1 ist kleiner als 2") else _Log("Fehler. Bitte das Universum neu starten!") end

if (1<2 and 0==0) [b]then _Log("Puh Glück gehabt, 1 ist kleiner als 2 und 0 ist 0") else _Log("Fehler. Bitte das Universum neu starten!") end
Der Befehl _Log ist übrigens eine Funktion die der Bot zur Verfügung stellt.
Ach so bevor ich eines vergesse: Alle Anweisungen müssen mit einem Semikolon enden, wenn danach eine weitere Anweisung folgt.
Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

October 30, 2012, 19:12:35 PM
Reply #2

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
How a CustomMode works

-EMPTY-
Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

October 30, 2012, 19:12:47 PM
Reply #3

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
-Create the first CustomMode Profile-

take a look in the helloween Profile or here:

Code: Lua
  1. dofile("legendary.lua") -- Include the legendary Framework VER:0.01 by riarry
  2. -- Guide: Ah und Mailbox
  3.  
  4. function AHundMailbox()
  5.     GoTo( 2030.196, -4680.135, 28.226, 2)
  6.     GoTo( 2037.393, -4676.396, 31.278, 2)
  7.     GoTo( 2046.667, -4672.257, 31.298, 2)
  8.     GoTo( 2056.684, -4668.194, 32.591, 2)
  9.     GoTo( 2063.888, -4664.557, 32.509, 2)
  10.     UseObject(35192, 0, 1000) -- Auktionator Drezbit
  11.     GoTo( 2057.338, -4667.791, 32.548, 2)
  12.     GoTo( 2050.114, -4671.236, 31.315, 2)
  13.     GoTo( 2043.558, -4674.517, 31.29, 2)
  14.     GoTo( 2036.785, -4677.09, 31.279, 2)
  15.     GoTo( 2031.455, -4679.104, 29.28, 2)
  16.     GoTo( 2030.198, -4683.122, 28.142, 2)
  17.     UseObject(2128, 0, 1000) -- Briefkasten
  18.     WowLuaDoString("PostalOpenAllButton:Click()")
  19.     Sleep(30000)
  20. end
  21.  
  22. NavigateTo( 2026.902, -4681.845, 28.267, 2)
  23.  
  24. for i = 1,10,1 do
  25.     AHundMailbox()
  26. end
  27.  
« Last Edit: October 30, 2012, 19:18:38 PM by riarry »
Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

October 30, 2012, 19:13:45 PM
Reply #4

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
-Using the Legendary Framework-

Download the actual version: http://dl.legendarybot.com/legendary.lua
Include it via dofile in your profile
Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

October 30, 2012, 19:14:36 PM
Reply #5

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
-Using the Legendary Editor-

Take a look here: http://mmocrawlerbots.com/forum/general-talk/the-power-of-custommode/
Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

October 30, 2012, 19:15:47 PM
Reply #6

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile

Here is an overview of the functiosn for CustomMode:


TYPNAMEPARAMLISTFRAMEWORKVERINFOPARAMRETURN
functionIsIngame()MMoCrawlerBots0.009Returns if a the player logged inno parametersBoolean (TRUE/FALSE)
functionIsLoadingOrConnecting()MMoCrawlerBots0.009Returns if WoW is loading or connectingno parametersBoolean (TRUE/FALSE)
functionIsObjectOutdoors(ObjectAddr)MMoCrawlerBots0.009Reruns if an Object is Outdoors (not in a cave or house)ObjectAddr = memoryAddress of the ObjectBoolean (TRUE/FALSE)
functionDoTerrainClick(x, y, z)MMoCrawlerBots0.009Execute a click on the world coordinates givenx,y,z= coordinates to clicknothing
functionGetProfessionMaxSkill(ProfessionId)MMoCrawlerBots0.009Returns the maximum Level you can reach with this professionProfessionId= Id for the professionInteger
functionGetProfessionSkill(ProfessionId)MMoCrawlerBots0.009Returns the current profession level of the given professionProfessionId= Id for the professionInteger
functionGetPlayerFaction()MMoCrawlerBots0.009Returns the Player's Factionno parametersInteger: 0=Horde, 1=Ally
functionUpdateMemory()MMoCrawlerBots0.009Forces the Bot to read the memory new. Use after continent change!no parametersnothing
functionGetCharName()MMoCrawlerBots0.009Returns the players nameno parametersString: palyername
functionFileExists(file)MMoCrawlerBots0.009Returns if a file exists. Relative paths are allowed, root is Botfolder\CustomModefile=filename Boolean (TRUE/FALSE)
functionIniRead(File,Section,Key,Default)MMoCrawlerBots0.009Return a Value stored in File, Section, Key. If not found it returns Default.  relative paths are allowed, root is Botfolder\CustomModeFile=filename (\CustomMode, relative) Section=Sectionname in the ini-file Key=name of the Key to read. If the Section/Key or File not found it returns the value you have given in the Default parameterString: Value of the Key, if not found it returns Default
functionIniWrite(File,Section,Key,Value)MMoCrawlerBots0.009Writes the Value to the Key in the Section in the File. relative paths are allowed, root is Botfolder\CustomModeFile=filename (\CustomMode, relative) Section=Sectionname in the ini-file Key=name of the key write. Value= The value to write
functionGetObjectPos(ObjectAddr)MMoCrawlerBots0.009Returns the position of an object. You need the memory Address of the ObjectObjectAddr = memoryAddress of the ObjectARRAY:
  • =x, [1]=y, [2]=z
functionGetPlayer()MMoCrawlerBots0.009Returns the memoryAddress of the player_baseUinteger=Playerbase
functionHasBuff(UnitAddr,SpellID)MMoCrawlerBots0.009Returns if a Unit have a buffUnitAddr=Memory Address of the Unit, SpellID=the spelled of the BuffBoolean (TRUE/FALSE)
functionSleep(ms)MMoCrawlerBots0.009Sleeps for the given time in millisecondsms=Time in millisecondsnothing
functionSetMount(MountType)MMoCrawlerBots0.009Sets the MountType to useMountType=0 (Ground) / 1 (Fly)/ 2 (Water)nothing
functionDoMount()MMoCrawlerBots0.009Forces the player to mount up. You have to Use SetMount firstno parametersnothing
functionDisMount()MMoCrawlerBots0.009Forces the player to mount downno parametersnothing
functionInteractWith(ObjectAddr)MMoCrawlerBots0.009Interact with an Object.ObjectAddr = memoryAddress of the Objectnothing
functionSetTarget(ObjectAddr)MMoCrawlerBots0.009Set target to Object. This will ONLY work with Units!ObjectAddr = memoryAddress of the Objectnothing
functionGetObjectByDisplayID(DisplayID)MMoCrawlerBots0.009Returns the memoryAddress of the ObjectDisplayID= displayed from a objectUinteger=Object Address
functionGetObjectByID(ObjectID)MMoCrawlerBots0.009Returns the memoryAddress of the ObjectObjectID= Id of an objectUinteger=Object Address
functionWowLuaDoString(LuaCommand)MMoCrawlerBots0.009Executes a LUA command in WoWLuaCommand=LUA Commandnothing
functionWowGetLuaValue(LuaVarName)MMoCrawlerBots0.009Returns the value of the given LUA Variable. You must execute a WoWLuaDoString() with a LUA commands which will determining the LUA Variable. Do not declare the variable as localLuaVarName= Name of the LUA variable you used in WoWLuaDoString() before String: value of the LUA Variable
functionClickToMove(x,y,z,precision)MMoCrawlerBots0.009The player will go to  the given coordinates, no navigation will be used. The precision parameter is used to set up how exact the player will get to the coordinates.  Below 2 will causes errors. Do not mix up with Click To move in WoWx,y,z=coordinates precision=how precise to reach the coordinatesnothing
functionNavigateTo(x,y,z,precision)MMoCrawlerBots0.009The player will go to  the given coordinates,  navigation will be used. The precision parameter is used to set up how exact the player will get to the coordinates.  Below 2 will causes errors. x,y,z=coordinates precision=how precise to reach the coordinatesnothing
functionGlobalFlyingNavigate(x,y,z,precision)MMoCrawlerBots0.009The player will fly to  the given coordinates,  navigation will be used. The precision parameter is used to set up how exact the player will get to the coordinates.  Below 2 will causes errors. x,y,z=coordinates precision=how precise to reach the coordinatesnothing
function_Log(text)MMoCrawlerBots0.009Writes a text to the Log-WindowText=String of textnothing
functionRunBotMode(Mode, File,Condition,TillMiningSkill,TillHerbSkill)MMoCrawlerBots0.009Starts a other Botmodus. The current profile its stopped. With the Condition 'skill' the boot will run the profile till the skilllevels defined in TillMiningSkill,TillHerbSkill are reached. You can also use a time limit in Minutes. Then set Condition to 'time' and use TillMiningSkill as Time limit. TillHerbSkill must be set to 0Mode="Gathering", "Grinding" , "Fishing" , "Spot fishing" File=filename (\CustomMode, relative) Condition="skill", "time" TillMiningSkill=mining skill to reach TillHerbSkill=herbing skill to reach nothing
functionDoGrind(StartLevel, EndLevel,MobID,hotspots)MMoCrawlerBots0.009Start GrindMode. The current profile will pause. Start and End Level are the conditions. You can Use different MobIDs separated by | for each id. The | separates the hotspots (x,y,z) from each othersee descriptionnothing

Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

October 30, 2012, 19:17:03 PM
Reply #7

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
The functions avaible from the legendary Framework version 0.12:

TYPNAMEPARAMLISTFRAMEWORKVERINFOPARAMRETURN
functionMountUp(MountType)Legendary0.1Mounts up. Using a ground mount (Mount type=1), a fly mount (MountType=2) or a Water Mount (MountType = 3)MountType=0 (Ground) / 1 (Fly)/ 2 (Water)nothing
functionGoTo(x,y,z,[precision]Legendary0.1The player will go to  the given coordinates, no navigation will be used. The precision parameter is OPTINAL and used to set up how exact the player will get to the coordinates.  Below 2 will causes errors.  The Waypoint will be saved in the Logx,y,z=coordinates [precision=how precise to reach the coordinates]
functionMountDown()Legendary0.1Forces the player to mount down
functionUseObject(id, [walkto=0, [wait=1000]))Legendary0.1Interact with an Object. Id is the Display ID. The player will go to the Object if wanted and will wait after Interacting. Default is 1000msid=Displayed [walk to=1/0: Walks to the Object, default=0] [wait=how to wait after interacting, default=1000]nothing
functionUseNPC(id, [walkto=0, [wait=1000]))Legendary0.1Interact with a NPC. ID is the Display ID. The player will go to the NPC if wanted and will wait after Interacting. Default is 1000msid=Displayed [walk to=1/0: Walks to the Object, default=0] [wait=how long to wait after interacting, default=1000]nothing
functionUseMailbox(id, [walkto=0, [wait=1000]))Legendary0.12Sends mail. ID is the Display ID. The player will go to the Mailbox if wanted and will wait after sending Items. Default is 1000ms. HINT: You have to set the ProfileVarFile. In this File you have to setup the Mailsettings firstid=Displayed [walk to=1/0: Walks to the Object, default=0] [wait=how long to wait after interacting, default=1000]nothing
functionUseVendor(id, [walkto=0, [wait=1000]))Legendary0.12Repairs/Sells Items to a Vendor. ID is the Display ID. The player will go to theVendor if wanted and will wait after selling. Default is 1000ms. HINT: You have to set the ProfileVarFile. In this File you have to setup the Sell settings firstid=Displayed [walk to=1/0: Walks to the Object, default=0] [wait=how long to wait after interacting, default=1000]nothing
functionUseTrainer(id, [walkto=0, [wait=1000]))Legendary0.12Learning all avaible Skills at a Trainer. ID is the Display ID. The player will go to the NPC if wanted and will wait after lerning all skills Default is 1000msid=Displayed [walk to=1/0: Walks to the Object, default=0] [wait=how to wait after interacting, default=1000]nothing
VariableProfileVarFilepath_to_your_var fileLegendary0.12The Variable contains the path and the name to your Varfile. IN this file you can store everey Var you want. The standart Vars like Mail and Vendor settings are stored there. This file must existsExample: ProfileVarFile = "legendary framework\\test.var"nothing
functionSleepIt(min, [max])Legendary0.12Sleeps  a random time between min and max in millisecondsmin= minimum time in milliseconds the bot have to wait [max= maximum time in milliseconds the bot have to wait, if not set then is max=min ]nothing
functionSaveVar(key, value, [varfile])Legendary0.12Save a Value to a key in the varfile. If varfile is not given then the framework will use the ProfileVarFilekey=Name of the Key in der Variablefile. Value=the value (variable) to store. [varfile=Path and name of the Varfile. Standart is set in ProfileVarFile]nothing
functionReadVar(key, varfile)Legendary0.12Loads the value from the  key in the varfile. If varfile is not given then the framework will use the ProfileVarFile. If there is no key found, the function will return 0key=Name of the Key in der Variablefile where the framework shall read the varibale. [varfile=Path and name of the Varfile. Standart is set in ProfileVarFile]value
VariableIgnoreTargets{MobId,[...]}Legendary0.13Set the Mobs which sahll ignored by the CombatEngine. Use a comma (,) as delimiter. You have to Sue the NPCIDs (not the DisplayID)IgnoreTargets={123,456,789}nothing
functionUseItemByID(id, [wait])Legendary0.13Use an Item with the id. The Item must be in your bags. The Bot will sleep the given optional parameter wait, Standard is 500msid=ItemID [wait=how long to wait after interacting, default=1000]nothing
functionUseItemByName(name, [wait])Legendary0.13Use an Item with the name. The Bot will sleep the given optional parameter wait, Standard is 500msname=Itemname [wait=how long to wait after interacting, default=1000]nothing
functionQuest_Accept(gossip)Legendary0.13Accepts the Quest given by the NPC. You can set the GossipTitleButton, if the NPC have more than one GossipOption. The functions return the QuestID from the accepted Quest.gossip=Index of the Gossipbutton from the NPCInteger:QuestID
functionQuest_InLog(qid)Legendary0.13Checks if a Quest is in the Questlog.qid= the QuestIDBoolean (TRUE/FALSE)
functionQuest_CountObjectives(qid)Legendary0.13Counts the objectives for the Quest. The quest must in your Questlog.qid= the QuestIDInteger:Number of Questobjectives
functionQuest_GetObjectiveText(qid,objective)Legendary0.13Returns the Text of the given objective. The quest must in your Questlog.qid= the QuestID. objective=Index of the QuestobjectiveString: Objectivetext -Localized (e.g. "Gingerbread Cookie: 0/5")
functionQuest_ObjectiveFinished(qid,objective)Legendary0.13Checks if a given objective is finished. The quest must in your Questlog.qid= the QuestID. objective=Index of the QuestobjectiveBoolean (TRUE/FALSE)
functionQuest_Finished(qid)Legendary0.13Checks if a Quest is finished. The quest must in your Questlog.qid= the QuestIDBoolean (TRUE/FALSE)
functionQuest_Complete(choice)Legendary0.13Completes a Quest and choose the reward indexed by "choice". choice=reward indexnothing
functionEnableCombat()Legendary0.13Enables the CombatMode. The Bots searches for EnemyTragets in range and will attack it. You can use IgnoreTargets = {...} to ignore some Mobs. Note: The bot will only search for a target when you call a GoTo(...) commandno parametersnothing
functionDisableCombat()Legendary0.13Disable the CombatMode. no parametersnothing
« Last Edit: November 08, 2012, 12:54:52 PM by riarry »
Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

October 30, 2012, 19:44:53 PM
Reply #8

johnboy Offline

  • *
  • Posts: 23
  • Reputation: 9
    • View Profile
Nice +rep
Dickes Danke für die Arbeit

October 30, 2012, 22:52:14 PM
Reply #9

VivalaRuschi Offline

  • *
  • Posts: 33
  • Reputation: 2
    • View Profile
Das tut ist echt gut geworden
kannst du mir verraten wie ich herausfinde ob eine bestimmte quest im questlog ist ?
möchte ein kleinen dailyquest bot schreiben :D

November 01, 2012, 00:39:34 AM
Reply #10

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
Die Funktionen fürs Questen fehlen leider noch.
Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

November 01, 2012, 06:01:27 AM
Reply #11

Axas Offline

  • *
  • Posts: 28
  • Reputation: 7
    • View Profile
Die Funktionen fürs Questen fehlen leider noch.

Hey thanks riarry for mentioning quest functions. I know you guys are doing a great Job, but i dont know how much u are thinking about the questfeature.

Like pvptool, i guess, you will atleast have functions to read the questlog, but besides this there are alot more important things that can be read (atm just through textdetection and addons), but with your knowhow possibly through the bot itself.

I'm talking about following informations:
General Quest Progress 4 Steps (Not done, In progress (accepted), Completed, Done) ;;Most important quest was already done before starting bot?
Active Quest Single Progress (Progress 1: 3/7, Progress 2: 5/8) ;; Not through yellow statustext

I dont know if the functions will have the same or similar structure like for pvptool, but this would be how i would structure them:

-function DoIfQuestProgress()
-function DoWhenQuestProgress( QuestID, QuestProgressIndicator, QuestProgress, [function])
QuestID: declaration of Quest like 12345
QuestProgressIndicator: If quest requires 2 different actions like killing bears and collecting meat.
QuestProgress: Either number of amount or general progress like (complete) (notcomplete).
[function]: function to be executed if true

-function DoIfQuest()
-function DoWhenQuest( QuestID, GeneralQuestProgress, [function]
QuestID: declaration of Quest like 12345
GeneralQuestProgress: Available (Not in Questlog, not turned in yet), Active (In Questlog), Completed (Questprogress is completed, not turned in yet), Done (was turned in, cant be accepted again).
[function]: function to be executed if true

Example for a Quest with 2 missions like killing bears and collecting meat:

function DoIfQuest( 12345, Done, 'SendText("Already Done!")')
function DoIfQuest( 12345, Available, 'SendText("I got to go to the Quest Giver!")')
function DoIfQuest( 12345, Active, 'SendText("Quest Accepted, in Log and ready to go!")')
function DoIfQuest( 12345, Completed, 'SendText("Well i did my job, now i should turn the Quest in!")')

function DoIfQuestProgress( 12345, 1, 7, 'SendText("7 of X bears killed - sad...")')
function DoIfQuestProgress( 12345, 1, complete, 'SendText("Mission One - complete, yay")')
function DoIfQuestProgress( 12345, 2, 5, 'SendText("5 of X meat collected - im hungry...")')
function DoIfQuestProgress( 12345, 2, notcomplete,'SendText("Gotta do the round again to collect more meat...")')
« Last Edit: November 01, 2012, 06:03:14 AM by Axas »

November 01, 2012, 10:53:27 AM
Reply #12

DOCDBA Offline

  • *
  • Posts: 6
  • Reputation: 2
    • View Profile
Hiho,
 bitte noch an eine BagItemCount(ItemID) -> Return -> ShortInt
denken

Greez DOC

November 06, 2012, 09:32:56 AM
Reply #13

riarry Offline

  • *
  • Posts: 1024
  • Reputation: 113
    • View Profile
Preview: 0.13

GetFreeBagSlots()
returns the free bagslots

GetItemCount(id)
counts how many items there are You can use the itemname instead of the id

UseHearthstone()
Use the hearthstone. returns 1 if successful, 0 if the Hearthstone is on cooldown

Questfunctions will follow soon, but this is much work, while the wow api does not allow to get the current status of a quest.

Great Multi-Area herb&Mine Profile: SuperFarm 2.0
Awesome Fishing 1-600 with Coinmaster Achievment
--- NO SUPPORT VIA PM ---

November 07, 2012, 05:52:12 AM
Reply #14

DOCDBA Offline

  • *
  • Posts: 6
  • Reputation: 2
    • View Profile
Hi Riarry,
 muss aber gehen da Zygor das ja auch abfragen kann, die lesen das aber über die Quest complete List aus.
Dann nehmen die die den Text aus der Quest List so weit ich das nachvollziehen konnte.

Greez Doc

 

* Recent Topics

* Useful Stuff