Author Topic: Quick Quesiton  (Read 2407 times)

0 Members and 1 Guest are viewing this topic.

Offline RnTopic starter

  • Full Member
  • ***
  • Posts: 177
  • Activity:
    0%
  • Reputation Power: 0
  • Rn has no influence.
  • Gender: Male
  • Respect: +15
  • Referrals: 0
    • View Profile
Quick Quesiton
« on: August 07, 2009, 05:28:03 PM »
0
I'm using a hiding/stealth training script but I feel it could be better but my scripting ability is limited

The following code is after start/stop locations have been set

Code: [Select]
goto stealth

stealth:
if #menubutton = b_stop
{
   goto Main
}
If H notIn #charStatus
{
gosub hider
}
while #charposx <> %x1 || #charposy <> %y1
{
move %x1 %y1 0 4
}
if #menubutton = b_stop
{
   goto Main
}
If H notIn #charStatus
gosub hider
while #charposx <> %x2 || #charposy <> %y2
{
move %x2 %y2 0 4
}
goto stealth

sub hider
hideloop:
event Macro 13 21
If H notIn #charStatus
{
wait 10
goto hideloop
}
return


This will only attempt to hide if I become unhidden but im trying to figure out how to keep my character constantly attempting to hide, even when its already hidden.

I know i need to get rid of the "If H notIn #charStatus" If's, but im not sure what i should be replacing it with. I assume ill need a simple "event Macro 13 21" loop but im not sure how to keep it going in the background while the character is moving

Suggestions?



edited for clarity
« Last Edit: August 07, 2009, 05:52:53 PM by Rn »

Offline RnTopic starter

  • Full Member
  • ***
  • Posts: 177
  • Activity:
    0%
  • Reputation Power: 0
  • Rn has no influence.
  • Gender: Male
  • Respect: +15
  • Referrals: 0
    • View Profile
Re: Quick Quesiton
« Reply #1 on: August 07, 2009, 06:02:39 PM »
0
ha, think i just solved it. I did delete those If loops but didn't add anything else to it and its working just how I wanted.

I want to share this with everyone but the majority, well pretty much all of it besides minor tweaks, of it was written by someone else and I want to make sure I give them credit, is their a certain way to do so?


Offline SunTigress

  • TopTwo's Woman
  • Elite
  • *
  • *
  • Posts: 900
  • Activity:
    0%
  • Reputation Power: 9
  • SunTigress has no influence.
  • Gender: Female
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Quick Quesiton
« Reply #2 on: August 07, 2009, 06:38:28 PM »
0
best way to do so is just state that in the top of teh script something like this

Code: [Select]
Hiding/invis script
originally written by Runaway Zamboni
edited and modified by Rn (maybe even say what was modified)
If at first you don't succeed, try try again. Then give up. There is no use in making a fool of yourself.

Offline RnTopic starter

  • Full Member
  • ***
  • Posts: 177
  • Activity:
    0%
  • Reputation Power: 0
  • Rn has no influence.
  • Gender: Male
  • Respect: +15
  • Referrals: 0
    • View Profile
Re: Quick Quesiton
« Reply #3 on: August 07, 2009, 06:52:34 PM »
0
kk, ima go post this in the submit a script section

Tags: