• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Need Help please (1 Viewer)

eq_contracts

New member
Joined
Feb 17, 2005
RedCents
Anyone here have great working knowledge of the timer functions in MQ2.

Basically what i'm trying to accomplish is I want my character to call a camp check if asked, but the way I have it now, he will call camp check for every single camp check called, so if someone gets the brainy idea to call camp check 10 times real fast, he'll respond 10 times in like 4-6sec intervals. Which as you coudl tell would be unacceptable. This only happened once that I remember, luckily I was at the keyboard like I am 90% of the time and I just joked about it and noone thought anything different.

Sorry for rambling on. I need a function that will call my camp in camp check , but only once every ${ccdelay}

I've tried to piece this out of existing code, but I really dont' understand the timer and it's variables, so i'm having a hard time getting it functional.

Any help would be greatly appreciated. If you wanna send a PM, I would prefer it.
 
you want your toon to answer camp checks.. but also wait for a timer to have been reached right?

it is a simple event with timer...

But with out having the full code.. it makes it a bit diffucult to give you the generic answer

Rich (BB code):
#event campcheck "#*#Camp Check#*#"

/declare var timer int global

Sub Event_campcheck
  /if /if (${timer}==15) /ooc Camp XYZ
  /return

But your timer variable needs to increment.. and that would need to be in main code...

what is this toon doing?

just sitting there answering camp checks or is he a bot doing other things?

in main loop ...

/varset timer ${Math.Calc[${timer}+1]}


or something like that
 
The person who calls camp check is my tank. he's runnign his own routine.

Wouldn't it be

Rich (BB code):
/varset timer ${Math.Calc[${timer}-1]}


too count down the timer


Basically. I want to define the timer named CCWaitTimer as 0. Once someone calls a camp check I want to respond and start the timer based on the variable ${ccdelay} which I set to 3mins. Then I want it to count down the 3 mins without responding to another camp check. Once the timer expires I want it to call the next camp check someone asks for and restart the timer, etc.

This is how I was approaching it but can't get it to work.

Rich (BB code):
Sub Event_Campcheck

 if (${CCWaitTimer}<0 ){
   /delay 3s
   /echo Someone called a camp check, responding and setting a timer!
   /ooc "camp name" Camped
   /deletevar CCWaitTimer
   /declare CCWaitTimer timer outer ${ccdelay} 
  } 
/return

Anyhow, my coding isn't that great, so you can see why i'm having problems, but this is the idea I would like to accomplish, but i'm having problems with.
 
Bot will not respond to camp checks until at least 3 minutes have past since the Bot's last /ooc.

12:00:00 Player_01 "Camp Check"
12:00:03 Bot_01 "Quarm Camped!"
12:01:00 Player_01 "Camp Check"
12:02:00 Player_02 "Camp Check"
12:02:01 Player_03 "Camp Check"
12:02:02 Player_01 "Camp Check"
12:02:03 Player_05 "Camp Check"
12:02:04 Player_02 "Camp Check"
12:03:02 Player_99 "Camp Check"
12:03:05 Player_08 "Camp Check"
12:03:08 Bot_01 "Quarm Camped!"
12:13:00 Player_01 "Camp Check"
12:13:03 Bot_01 "Quarm Camped!"

Rich (BB code):
#Event CampCheck "#*#Camp Check#*#"

Sub Main
/declare CCWaitTimer timer outer
' Set in seconds. I don't remember if you can use minutes in timer vars or not.
/declare ccdelay int outer 180

:ForeverLoop
   /doevents CampCheck
/goto :ForeverLoop

/return

Sub Event_CampCheck
if (${CCWaitTimer}==0 ) {
   /delay 3s
   /echo Someone called a camp check, responding and setting a timer!
   /ooc Quarm Camped!
   /varset CCWaitTimer ${ccdelay}s
} 
/return

Not tested... 99.99% it's right though...

-SimpleMynd
 
Last edited:
Yeah, getting same problem I had before. I'm just missing something. I have

#event CampCheck "#*#camp check#*#"

Sub Main
/declare CCWaitTimer timer outer
/declare ccdelay int outer 180

"Main loop"
/doevents CampCheck

Sub Event_CampCheck
if (${CCWaitTimer}==0 ) {
/delay 4s
/echo Someone calling check, Responding and setting timer!
/ooc "Camped"
/varset CCWaitTimer ${ccdelay}s
/return

Now the I still get the error I been getting from the start.
DoCommand -Couldn't parse 'if (${CCWaitTimer}==0 ) {


It still does the delay and calls the camp check tho of course, Just cant' get the timer part functioning. Any ideas?
 
eq_contracts said:
Any ideas?

Rich (BB code):
#event CampCheck "#*#camp check#*#"

Sub Main
/declare cctimer timer outer
/declare ccdelay int outer 3 //Delay in minutes
/declare ccname string outer <<Insert Camp Name>>

:mainloop
/doevents
/goto :mainloop

Sub Event_CampCheck
/if (!${cctimer}) {
  /delay 4s
  /echo Someone calling check, Responding and setting timer!
  /ooc ${ccname} Camped
  /varset cctimer ${ccdelay}m
  }
/return
 
btw, if you look back, I forgot to close my if statement and forgot the / before if. My entire problem has been stemmed from the fact I forgot the / infront of the if statement.. Lol... noone noticed!

Thanks for everything guys. I'm slowly learning over the last few years.

Sigh, just feel stupid to make a mistake like this..

Now to work on randomizing responses from a ini :P
 
Last edited:
Need Help please

Users who are viewing this thread

Back
Top