Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Update for 10.39
04-28-2014, 08:52 PM, (This post was last modified: 05-10-2014, 12:27 AM by lopht.)
#1
Script Update for 10.39
As always get it on the downloads page and post any bugs you find here.
changelog:
1.Cavebot no longer fails to attack some monsters
2.Looter should loot all corpses, unless you put a ;9 on the monsters at targetting.txt
3.The autoexplorer should work properly in the new areas now
4.There is a new script option for people to use. Its not super advanced, but hopefully it helps with some of the little things people have been requesting. It comes with a few small scripts to show how it works.
5.These changes only apply to 10.38/10.39

Directions are as follows, (this info is also in sample.lua)
Code:
To run scripts,
1.check the script[x] box
2.On your screen you should see @ All Scripts, F9 Hide/Show, F10 Reload
  a.If you dont see this, expand your tibia window or delete the scripts.cfg file
3.Drag the @ to move this where you want
4.Click on the individual scripts to turn them on/off
5.Click save to save your 'On' list

Note: Pressing Escape pauses all scripts, the same as it pauses hotkeys
      You can resume them by clicking "Click to Unpause" on your screen or pressing F11

Note2: All keys and options are customizeable by editing script_gui.lua and script_loader.lua

--------Draw Functions---------

printtext(text)  //prints to dos console box
DrawText(text,x,y,color)

----------Action Functions---------//try to call only 1 per callback
AttackTarget(targetid)
FollowTarget(targetid)
CastHotkey(text)
CastRuneTarget(runeid,targetid)
CastRuneXY(x,y,runeid)
MoveTo(x,y)
UseSpell(text)                          //talking, casting spells ect
UseContainerItem(cont_number,item_slot,id)   //eating food,opening bp ect
UseInventoryItem(inv_slot,id)                //eating food,opening bp ect
UseGroundItem(x,y,id)                        //using ladders switches corpses ect.
UseItemOnGround(x,y,id)                      //using rope/shovel/rune ect from your bps to the ground

ThrowItemCtoC(cont_number,item_slot,cont_number2,item_slot2,id,amount)
ThrowItemCtoI(cont_number,item_slot,inv_slot,id,amount)
ThrowItemItoC(inv_slot,cont_number2,item_slot2,id,amount)
ThrowItemCtoG(cont_number,item_slot,x,y,id,amount)
ThrowItemGtoC(x,y,cont_number,item_slot,id,amount)
ThrowItemGtoG(x,y,x2,y2,id,amount)

NpcSay(text)
NpcBuy(id,amount)
NpcSell(id,amount)

---------Container/Ground Functions---------
FindItem(id) returns cinfo or nil        //1st one found //   cinfo.num,cinfo.slot,cinfo.quantity
FindNextItem(id) returns cinfo or nil    //next one
GetGround(x,y) returns table             //t[1]=id1 t[2]=quantity1 t[3]=id2 t[4]=quantity2 t[5]=id3 ect   Ex GetGround(self.x+1,self.y)

---------Waypoint Functions----------
SetWaypoint(x,y,z)          // Note:to use ropes or ladders, make sure to put a waypoint on the rope hole and the next waypoint above next to the hole
SetHardWaypoint(x,y,z)      // Tries to go to the exact location
SetWarpWaypoint(x,y,z)      // Use this for stairs/holes and warps
SetStopPoint()
ClearWaypoints()
StartWaypoints()
StopWaypoints()
SetHuntingOn(0 or 1)        // SetHuntingOn(1) player hunts while doing waypoints

StartAutoExplorer(floors)   // Ex StartAutoExplorer(-2)=down 2 floors, StartAutoExplorer(0)=just the current floor
StopAutoExplorer()

--------More Global Functions----------
setTimerCallback(function)         //you need this if you want your script to persist
GetScriptPause() returns 1 or 0    //1 if scripts were paused
GetGround(x,y) returns idlist      //Ex GetGround(self.x+1,self.y)
IsKeyDown(number) returns number //accepts virtual key codes returns 0 if not pressed
SetManaPotIDS(normalmana,strongmana,greatmana,paladinmana)      // for use by the healer if your otserver has custom ids 0 means dont change
SetHealPotIDS(normalheal,strongheal,greatheal,paladinheal)      // Same as SetManaPotIDS
SetRuneIDS(ITEM_UH,ITEM_SD,ITEM_GFB,ITEM_MWALL,ITEM_ROPE)                 // Ex SetRuneIDS(3160,0,0,0,0) this changes the UH rune to 3160
SetLootTimer(time_in_ms)                                                  // Ex SetLootTimer(240)

-------Extras------
PlaySound("filename.wav") or PlaySound("Beep")
SetClipboard(text)


-----------self------------
self.name
self.x
self.y
self.z
self.id
self.sx
self.sy
self.hp
self.mp
self.hpmax
self.mpmax
self.condition
self.level
self.cap
self.exp
self.magiclevel
self.backpack
self.ring
self.ammy
self.arrow
self.arrowct
self.hand
self.handct
self.handleft
self.handleftct

----------creatures[MAXCREATURES]---------

creatures[i]
creatures[i].id
creatures[i].x
creatures[i].y
creatures[i].z
creatures[i].hp
creatures[i].movespeed
creatures[i].name
}

---------conts[MAXCONTAINERS]---------

conts[i].contnum
conts[i].name
conts[i].numitems
conts[i].items[j].id
conts[i].items[j].num

-------inventory------
SLOT_HEAD=1;
SLOT_AMMY=2;
SLOT_BACKPACK=3;
SLOT_ARMOR=4;
SLOT_HAND=5;
SLOT_HANDLEFT=6;
SLOT_LEGS=7;
SLOT_FEET=8;
SLOT_RING=9;
SLOT_AMMO=10;

EDIT: the newest one has a few more bug fixes with ramps and ladders
also, the cavebot uses a safe EXORIMAX now when hunting to avoid getting skull when a player is next to you and the target dies

EDIT2: make sure you download the newest one as there was another bugfix
Reply
04-29-2014, 12:05 AM,
#2
RE: Script Update for 10.39
doesnt open next bp for lot pls fix it
Reply
04-29-2014, 01:08 AM, (This post was last modified: 04-29-2014, 01:19 AM by lopht.)
#3
RE: Script Update for 10.39
hmm try this script until its fixed.
Make a new file called openbps.lua in the Magebot folder and copy paste this.
Then check scripts[x] and click the openbps.lua text in blue.
Then Click the "Click to Sav" and it will always run when you check scripts[x]

Code:
local CLOCK
local gptimer=os.clock()-.40
function opennewbp()
    CLOCK=os.clock()
    if (CLOCK-gptimer<2.2) then return 0; end
    gptimer=CLOCK
    if (MAXCONTAINERS>0) then
        local j=1
        while (j<MAXCONTAINERS+1) do
        if (conts[j].numitems>18) then
            local i=1
            while (i<conts[j].numitems+1) do
                local item=conts[j].items[i].id
                if (item~=2854 and (item<2865 or item>2871) and item~=3253) then
                    i=i+1
                else
                    UseContainerItem(conts[j].contnum,i-1,item)
                    return
                end
            end
        end
        j=j+1
        end
    end
end
    
SetTimerCallback("opennewbp")
Reply
04-29-2014, 06:54 AM,
#4
RE: Script Update for 10.39
I can not open the Magebot, when I try an error window with the following message appears.
The application can not be started because it was not found MSVCR.100.DLL. Reinstalling the application may fix the problem ........
only to reinstall the application does not solve the problem

what do I do?
Reply
04-29-2014, 07:28 AM,
#5
RE: Script Update for 10.39
i have the same problems when i try to open magebot its says

The application can not be started because it was not found MSVCR.100.DLL. Reinstalling the application may fix the problem

and i reinstall the application alot of time and still have the problems and till now i cant open magebot

so what i have to do to fix this problems

anyone can help plz?
Reply
04-29-2014, 10:16 AM,
#6
RE: Script Update for 10.39
I uploaded a new version that fixes this
Reply
04-29-2014, 12:36 PM,
#7
RE: Script Update for 10.39
Thx Adm !! :***
Reply
04-30-2014, 01:53 AM, (This post was last modified: 04-30-2014, 04:47 AM by Borikson.)
#8
RE: Script Update for 10.39
nvm..
Reply
04-30-2014, 07:16 AM,
#9
RE: Script Update for 10.39
(04-29-2014, 10:16 AM)lopht Wrote: I uploaded a new version that fixes this

Dude where's my key?
It's been two weeks and I bought has not arrived yet and you will answer emails!
Reply
04-30-2014, 07:59 AM,
#10
RE: Script Update for 10.39
(04-29-2014, 01:08 AM)lopht Wrote: hmm try this script until its fixed.
Make a new file called openbps.lua in the Magebot folder and copy paste this.
Then check scripts[x] and click the openbps.lua text in blue.
Then Click the "Click to Sav" and it will always run when you check scripts[x]

Code:
local CLOCK
local gptimer=os.clock()-.40
function opennewbp()
    CLOCK=os.clock()
    if (CLOCK-gptimer<2.2) then return 0; end
    gptimer=CLOCK
    if (MAXCONTAINERS>0) then
        local j=1
        while (j<MAXCONTAINERS+1) do
        if (conts[j].numitems>18) then
            local i=1
            while (i<conts[j].numitems+1) do
                local item=conts[j].items[i].id
                if (item~=2854 and (item<2865 or item>2871) and item~=3253) then
                    i=i+1
                else
                    UseContainerItem(conts[j].contnum,i-1,item)
                    return
                end
            end
        end
        j=j+1
        end
    end
end
    
SetTimerCallback("opennewbp")


I created the file in the folder, but when I click on the script name does not appear openbps.lua file. help admin

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)