166
New member introductions / Re: Happy to meet everyone :)
« on: August 29, 2008, 03:16:55 AM »
Well met BlondeM!! Welcome to the site.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
;---------------------------------
; %1 pack to search
; %2 pack to move to
;---------------------------------
sub search_bag
Finditem * C_ , %1
If #findkind = 0
{
For %moveloop 1 #findcnt
{
Finditem %loot C_ , %1
If #findkind = 0
{
exevent drag #findid #findstack
exevent dropc %2
WAIT %MSwait
set %attempt %attempt + 1
If %attempt > 3
{
for %S 1 10
{
Sound
Event sysmessage The packie is full
}
}
}
}
}
set %attempt 0
return
;-----------------------------------------------------------------------
; stuff you need to set to make script work RIGHT
;-----------------------------------------------------------------------
Set %beatle MAGK ; Id of your beetle
set %beatlepack UTFSZMD ; pack inside of beetle
set %lootbag RHIJJND ; bag inside your backpack for loot
set %resourcebox CZANLMD ; ID of secure within reach of homerune
set %heavyshit JJG_sto_pof_guf ; items you want moved to the beetle
set %dropspot_runebookid ZFUEBRD ; default runebook for drop location
set %hunted_runebookid BYLKBRD ; default runebook for dungeon
set %magery false ; true = recall false = sacred journey
set %healspell 202 ; 28 = greater heal, 3 = Heal, 202 = Close Wounds
set %loot JJG_OZF_DEG_rwf_guf_sto_pof_TTO_GMF_OKF ; stuff you want to loot
set %the_hunted ih_FE_AE_uf_QE_AF_ye_XE_DF_CD_RGB_PGB_SGB_JD_gb ; critters to kill
set %Evade_Critters ye_XE_DF_CD
;--------------------------------------------------------------------
set %knives CNF_GMH ; tools use to cut corpses dagger_skinning knife_
set %VSwait 5 ; very short wait
set %MSwait 10 ; medium wait
set %LSwait 15 ; long wait
gosub setup
gosub Define_rail
gosub steed setup
;------------------------------
;Main loop
;------------------------------
start:
gosub weightcheck
gosub recall_to_spot %dropspot_runebookid
gosub positionpacks
gosub unloadall
gosub recall_to_spot %hunted_runebookid
gosub positionpacks
gosub enter_level_1
if %menu_check = start
{
for %i 1 %endspot
{
gosub remount
gosub check_health
gosub menu_check
set %oldcharposx #charposx
set %oldcharposy #charposy
set %oldcharposz #charposz
set %x %x . %i
set %y %y . %i
set %z %z . %i
gosub Weightcheck
gosub moveto_spot %x %y %z %oldcharposx %oldcharposy
set %enemyfound false
repeat
{
gosub kill
}
until %enemyfound = false
set %corpsefound false
repeat
{
gosub findcorpse
gosub moveto_spot %x %y %z %oldcharposx %oldcharposy
gosub check_health
gosub kill
}
until %corpsefound = false
}
gosub leave_level_1
goto start
Sub Supply_check
Finditem RWF C_ , #backpackid ; this is arrows
if #FINDSTACK < 100
{
set %tograb 300 - #FINDSTACK
set #lobjectid %resourcebox
wait %vSwait
event macro 17 0
wait %vSwait
contpos 0 0
wait %vSwait
Finditem RWF C_ , %resourcebox
IF #FINDSTACK >= %tograb
{
exevent drag #findid %tograb
exevent dropc #backpackid
wait %MSwait
}
Else
{
event exmsg #charid 3 70 Out of arrows
halt
}
}
finditem ZLF C_ , #backpackid ; this is bandaids
if #findstack < 25
{
set %tograb 100 - #FINDSTACK
set #lobjectid %resourcebox
wait %vSwait
event macro 17 0
wait %vSwait
contpos 0 0
wait %vSwait
Finditem ZLF C_ , %resourcebox
IF #FINDSTACK >= %tograb
{
exevent drag #findid %tograb
exevent dropc #backpackid
wait %MSwait
}
Else
{
event exmsg #charid 3 70 Out of arrows
halt
}
}
return
event macro 1 0 Bank
wait 15
set #TARGCURS 1
event exmsg #charid 3 0 Target your bag now
repeat
{
wait 1
}
until #TARGCURS = 0
Set %WhatBagYouWant #ltargetid
you don't need the { around it as long as it tabbed and between the repeat and until. i looked through some of TM's and they don't have{} around them. and i'll check out the rest of the codes and i'll check the syntax.
sub target
findItem %monster G_5
if #findKind = -1
return
set %target #findID
set #ltargetID #findID
set #ltargetKind 1
set %flagwait ( #sCnt + 50 )
repeat
event macro 27 0
gosub checkheal
if #result = #true
gosub heal
until %flagwait < #sCnt || #enemyid = n/a
wait 10
return
sub target
findItem %monster G_5
if #findKind = -1
return
set %target #findID
set #ltargetID #findID
set #ltargetKind 1
set %flagwait ( #sCnt + 50 )
repeat
{
event macro 27 0
gosub checkheal
if #result = #true
gosub heal
}
until %flagwait < #sCnt || #enemyid = n/a
wait 10
return
Method count: 55
Command count: 55
*** Pass 1 - Label accounting:
*** Warning - Tag _opensecure: - Line 679 already exists. First occurance: 641
*** Error - Line 700 Close brace has no opening brace.
*** Warning - SUBROUTINE tm_travelfromnamedrunebook - Line 380 unused
*** Warning - SUBROUTINE tm_randomrunebooktravel - Line 426 unused
*** Warning - SUBROUTINE tm_travelfromobject - Line 451 unused
*** Warning - SUBROUTINE adjmaxweight - Line 708 unused
*** Warning - SUBROUTINE healtest - Line 778 unused
*** Warning - GOTO _opensecure: - Line 647 has no matching tag
*** Warning - GOTO _opensecure: - Line 684 has no matching tag
Subroutine labels = 22
Tag labels = 16
66 Code block(s).
8 Warnings(s) encountered.
*** Pass 2 - Execution [SYNTAXCHECK]
1 Error(s) encountered.
;----------------------------------
;%1 Type or ID of the item to restock
;%2 the amount to grab
;%3 the container to grab from
;%4 the container to drop to
Sub Restock
Finditem %1 C_ , %3
if #findkind = 0 && #findstack >= %2
{
exevent drag #findid %2
exevent dropc %4
wait 10
return true
}
event exmsg #charid 3 0 You do not have enough of that item.
return false
sub counter
finditem ZLF C_ , #backpackid
if #findkind = 0 && #findstack <= 20
EVENT ExMsg #charID 3 33 You are Low on bandaids!
if #findkind = -1
event exmsg #charid 3 33 You are out of bandaids!
return
;-------Heal-(hopefully)-----------------
sub heal
if #result #true
finditem ZLF c_ , #backpackid
{
if #findkind = 0 ; -1 not found, 0 in a container, 1 on the ground
{
set #lobjectId #findId
event macro 17
target 5s
event macro 23
repeat
{
wait 0
}
until %fullheal in #sysmsg || %lilheal in #sysmsg || %retry in #sysmsg || %tryagain in #sysmsg || %wait in #sysMsg
}
return