Author Topic: basic tutorial modification help  (Read 3304 times)

0 Members and 1 Guest are viewing this topic.

Offline jwardlaw09Topic starter

  • Jr. Member
  • **
  • Posts: 13
  • Activity:
    0%
  • Reputation Power: 0
  • jwardlaw09 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
basic tutorial modification help
« on: March 12, 2010, 06:18:28 PM »
0
hi guys, sorry have to make this quick i am on my way our the door... basic problem i think.
I'm trying to take cervezas healpot tutorial and make it work for me, same concept just bandaids. here is what i have, i think the problem is in the healme sub. let me know what you come up with thanks :D Looking at it again i bet im messing up the finditem command in that sub.... when i run the script nothing really happens :(

Code: [Select]


set %bandie ( #maxhits - 20 )

SUO


if #hits < %bandie && #sCnt > %bandie_time
  {
    gosub Healme
    set %bandie_time ( #sCnt + 10 )
  }
wait 5

until #CharGhost = YES
while #CharGhost = YES
  wait 0
GoTo SUO

sub Healme
  wait 3
  findItem WLOYFRD C_, #backpackID
  if #findKind = -1
    return
  set #lobjectID #findID
   set #ltargetKind 1
  event macro 17 0
return






Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: basic tutorial modification help
« Reply #1 on: March 12, 2010, 06:31:29 PM »
0
You need to set the timers at the beginning...

set %bandie_time #sCnt

If you don't do that the script doesn't know if #sCnt is greater then %bandie_time
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Scrripty

  • Guest
Re: basic tutorial modification help
« Reply #2 on: March 12, 2010, 08:42:45 PM »
0
You also need a space in your finditem line:

Code: [Select]
finditem(SPACE)WHATEVER(SPACE)C_(SPACE),(SPACE)#backpackid

Offline jwardlaw09Topic starter

  • Jr. Member
  • **
  • Posts: 13
  • Activity:
    0%
  • Reputation Power: 0
  • jwardlaw09 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: basic tutorial modification help
« Reply #3 on: March 12, 2010, 11:27:50 PM »
0
awesome thanks guys, i just got home from work so i will make the changes and let you know how it goes. kudos on the tutorial cerveza... easy to understand.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: basic tutorial modification help
« Reply #4 on: March 13, 2010, 02:04:03 AM »
0
Glad you find it useful ;)
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline jwardlaw09Topic starter

  • Jr. Member
  • **
  • Posts: 13
  • Activity:
    0%
  • Reputation Power: 0
  • jwardlaw09 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: basic tutorial modification help
« Reply #5 on: March 13, 2010, 02:39:52 AM »
0
WOOT! The script was a horrible failure lol... i couldnt figure out why it kept looping when it got to targeting me. I almost posted for help but know i have to do my own research... so i did and it dawned on me i had nothing there for targeting myself after selecting the bandies lol... so fixed it up with a target self event macro and it works great. Only problem is a delay between targeting and applying the first bandie... odd this only affects the first. Anyways i couldnt have made this work without the help of all of you...  (the reason i start applying bandies at maxhits - 5 is because of the delay. after the first aid is applied this goes away)

Code: [Select]

set %bandie_time #sCnt
set %bandie ( #maxhits - 5 )

SUO:
repeat


if #hits < %bandie && #sCnt > %bandie_time
  {
    gosub Healme
    set %bandie_time ( #sCnt + 10 )
  }
wait 3

until #CharGhost = YES
while #CharGhost = YES
  wait 0
GoTo SUO

sub Healme
  wait 3
  findItem #charID C_ , #backpackID
  if #findKind = -1
    return
  set #lobjectID #findID
   set #ltargetKind 1
  event macro 17 0
  target 2
  event macro 23 0
  wait 2
return




« Last Edit: March 13, 2010, 02:49:31 AM by Cerveza »

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: basic tutorial modification help
« Reply #6 on: March 13, 2010, 02:50:19 AM »
0
Changed the hard coded char id to the system's #charID

You could actually be tracked down by your real char ID.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline jwardlaw09Topic starter

  • Jr. Member
  • **
  • Posts: 13
  • Activity:
    0%
  • Reputation Power: 0
  • jwardlaw09 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: basic tutorial modification help
« Reply #7 on: March 13, 2010, 03:01:32 AM »
0
sorry to do this to you cerveza but could you elaborate? i know your referring to..

Code: [Select]
  findItem #charID C_ , #backpackID


i realize what charID is but what is the difference between hard coded and system charID?

sorry just sounds important and i wanna make sure i understand.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: basic tutorial modification help
« Reply #8 on: March 13, 2010, 03:06:10 AM »
0
If you use XYZABC in your script, they (developers) could hunt you down because that is a unique ID. If they were to see it here (and I'm sure they wander by) then it might spell trouble.

Use the systems charID with is the same thing, but not specific.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Scrripty

  • Guest
Re: basic tutorial modification help
« Reply #9 on: March 13, 2010, 09:43:13 AM »
0
WOOT! The script was a horrible failure lol...

You have a timer problem in there too bud.  See the %bandie_time #sCnt?  How is your if hits < bandie_time statement ever going to be #true if the timer cannot EVER be > than #sCnt? :)  Read through it like a book from top to buttom and left to right to see what I"m saying.  How is #sCnt going to EVER be greater than %bandie_time unless you specifically set it that way?  You need #sCn't to be < OR = to #sCnt. :)  When you set a timer, you need to make sure it's initial condition can be matched by your variable so it can get started when the script starts.  Also, your timers will count down, so say you do #sCnt + 10, it will start counting DOWN so your varaibles will most of the time read :  if suchandsuchtime > #sCnt whatever... :)  The timer wont be greater than your variable usually unless that's SPECIFICALLY what you're looking for... hehe  It will normally be set to higher than your variable, then the timer will count down and be LESS THAN your variable.  Then you can check for < or >.  But your initial setting of the timer needs to be something that your equation can start on.  Say, set %bandie_time #sCnt, then you would need to do if %bandie_time >= #sCnt... so the initial scan for the timer will be #true enough to start doing the action. :)

Code: [Select]

set %bandie_time #sCnt
set %bandie ( #maxhits - 5 )

SUO:
repeat


if #hits < %bandie && #sCnt > %bandie_time
  {
    gosub Healme
    set %bandie_time ( #sCnt + 10 )
  }
wait 3

until #CharGhost = YES
while #CharGhost = YES
  wait 0
GoTo SUO

sub Healme
  wait 3
  findItem #charID C_ , #backpackID
  if #findKind = -1
    return
  set #lobjectID #findID
   set #ltargetKind 1
  event macro 17 0
  target 2
  event macro 23 0
  wait 2
return





[/quote]
« Last Edit: March 13, 2010, 09:47:48 AM by Scripty »

Tags: