2746
New member introductions / Re: Intro
« on: December 27, 2013, 11:33:57 AM »
Welcome!

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. How script a check to see if your character is hidden? Only thing that I could really find is doing a check for a hidden flag on EUO. I want to add a hide option on a craft script but this would be used at a bank and hiding is low.I do this in a number of scripts, here is an example using the mainloop from my Cart trainer:Code: [Select]event macro 13 21
wait 11000
if H in #charStatus
{
gosub startcraft
}
return
Will this continue to try and hide until character is hidden and then move onto the crafting sub? If not, what am I doing wrong? Is there a better way to do this?Code: [Select];Start Mainloop
repeat
gosub XIIxSkillCheck Cart %StartSkill
set %CurrentSkill #RESULT
gosub SetMap %CurrentSkill
set %CurrentMap #RESULT
gosub XIIxMaxWeight 0
set %ScrollAmount #RESULT - #WEIGHT
while %ToHide = yes && H notin #CHARSTATUS
{
event macro 13 21
wait 11s ;<------ you can skip this if you don't plan to use another skill afterward
}
gosub CartCraft
gosub TrashMap
if #menubutton = Pause
gosub XIIxPause
until #FALSE
; End Mainloop
In this particular example I set a veriable %ToHide in the setup portion but you should still get the point. The idea is to deal with hiding before moving on to the rest of the logic (in the setup subs I don't even give the user the option to try hiding if the skill is less than 20 unless they are human). Ok so the script will continue to try while h is not in the character status? What does the && do?QuoteCode: [Select]2. Using this meditation sub, where would I put in a hide event so that the character hides when meditation is done?
Don't do it in the sub, do it after you return from the sub. I tried doing it at the beginning of my crafting sub but I did it worng or something because it would try and hide after each craft attempt
X
event macro 13 21
wait 11000
if H in #charStatus
{
gosub startcraft
}
return
sub CheckMana
menu delete scriptstatus
Menu Font BGColor Black
menu Font Color Lime
menu text scriptstatus 95 100 Checking Mana
set %_test ( 100 * #mana ) / #maxmana
if ( %_test < 35 ) || ( #mana < %mana )
{
gosub actionblock
menu delete scriptstatus
Menu Font BGColor Black
menu Font Color Lime
menu text scriptstatus 95 100 Meditating
event macro 13 46 ; meditate
set %_tlastskill #systime + 10100
while #mana < ( 95 * #maxmana / 100 )
{
gosub hardwait 1
if %_tlastskill < #systime
{
gosub actionblock
event macro 13 46 ; meditate
set %_tlastskill #systime + 10200
}
}
set %_diff #systime - %_tlastskill - 9000
if %_diff > 0
{
set %_diff ( %_diff / 50 ) + 1
gosub hardwait %_diff
}
}
return
Well done then!
I ditched everything after "set %trashbarrel #ltargetID" simply because you don't need to open the trashcan to use it but either way, problem solved!
I see that Paulo is searching for any container within a 2-tile radius that has a type value of BKF. Are you saying that your trash barrel has a type of BKF when you mention the "ID" being the same that the script is looking for?
I would do something like this -
Replace:Code: [Select]Finditem BKF G_2
For %TrashSearch 1 #FindCnt
{
Set #Findindex %TrashSearch
Event Property #FindID
If Trash in #Property && Secure in #Property
{
Set %TrashBarrel #FindID
Set %TrashSearchSuccess Yes
}
}
If %TrashSearchSuccess <> Yes
{
Display A secure trash barrel was not found within reach. Correct this and restart
pause
}
with:Code: [Select]Display Ok Select the trash barrel.
set #targcurs 1
while #targcurs = 1
wait 1
set %Trashbarrel #ltargetID
Then it will specifically use your targeted container instead of automatically looking for all containers and checking #property to see if its a trash barrel. Just another way to do the same thing without the automation.
X
Display Ok Select your trash barrel.
set #targcurs 1
while #targcurs = 1
wait 1
set %trashbarrel #ltargetID
set #lobjectID #ltargetID
set #nextcposx 800
set #nextcposy 0
event macro 17
wait 20
sub Item1ma ; Clumsy Scroll
set %mana 4
set %regs %bm , _ , %ns
set %current QXL
set %clumsy QXL
set %makestr Clumsy
set %XClick1 27 ; First Circle
set %YClick1 90
set %XClick2 230 ; Clumsy
set %YClick2 70
set %numclick 2
return
P.S. I can always post my rebuild version here.
Aberdeen City and Shire in Scotland has perhaps the highest concentration of castles in any one place.. known as the Castles of the Mar .. with over 300 castles in a relatively small area
ROT is not the only difference - how about poles, daggers, scissors with usages etc
It miss and match, you need to be careful of where you recall. Lot populated area help.