Wandering Buffbot (80% complete)

Moderator: Moderators

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Wandering Buffbot (80% complete)

#1 Post by sli »

Working on a wandering buffbot that moves from town to town buffing people who ask. Requires the localtime patch.

Code: Select all

automacro giveheal {
	pm /heal/i
	class Priest
	exclusive 1
	call {
		if ($off == 1) goto off
		do sp 28 $.lastpm

		:off
		call botoff
	}
}

automacro giveagi {
	pm /agi/i
	class Priest
	exclusive 1
	call {
		if ($off == 1) goto off
		do sp 29 $.lastpm

		:off
		call botoff
	}
}

automacro givebless {
	pm /bless/i
	class Priest
	exclusive 1
	call {
		if ($off == 1) goto off
		do sp 34 $.lastpm

		:off
		call botoff
	}
}

automacro giveall {
	pm /all/i
	class Priest
	exclusive 1
	call {
		if ($off == 1) goto off
		do sp 34 $.lastpm
		do sp 29 $.lastpm

		:off
		call botoff
	}
}

automacro giveloc {
	pm /location/i
	class Priest
	call {
		do pm "$.lastpm" $.map ($.pos)
	}
}

automacro giveschedule {
	pm /schedule/i
	class Priest
	call {
		do pm "$.lastpm" --- All times are on EST (GMT-5) ---
		do pm "$.lastpm" Prontera: 1:00PM - 2:00PM, 8:00PM - 9:00PM
		do pm "$.lastpm" Morocc: 2:00PM - 3:00PM, 9:00PM - 10:00PM
		do pm "$.lastpm" Geffen: 3:00PM - 4:00PM, 10:00PM - 11:00PM
		do pm "$.lastpm" Al De Baran: 4:00PM - 5:00PM, 11:00PM - 12:00AM
		do pm "$.lastpm" Payon: 5:00PM - 6:00PM, 12:00AM - 1:00AM
		do pm "$.lastpm" Comodo: 6:00PM - 7:00PM, 1:00AM - 2:00AM
		do pm "$.lastpm" Juno: 7:00PM - 8:00PM, 2:00AM - 3:00AM
	}
}

automacro announceonline {
	console /.*in-game\./
	class Priest
	call {
		do c @main Public buffbot now online at $.map ($.pos).
	}
}

automacro lowsp {
	sp < 5%
	class Priest
	var $off == 0
	call {
		do c My SP is low. Please wait.
		do sit
		$off = 1
	}
}

automacro highsp {
	sp > 90%
	var $off == 1
	class Priest
	call {
		do c SP regen completed.
		do stand
		$off = 0
	}
}

automacro reachdest {
	location prontera, morocc, geffen, aldebaran, payon, comodo, yuno
	call {
		$moveType = 0
		$off = 0

		if ($moveType == 1) goto :pron
		if ($moveType == 2) goto :mor
		if ($moveType == 3) goto :gef
		if ($moveType == 4) goto :alde
		if ($moveType == 5) goto :pay
		if ($moveType == 6) goto :como
		if ($moveType == 7) goto :yuno

		:pron
		do c @main Buffbot is now active in Prontera ($.pos)
		stop

		:mor
		do c @main Buffbot is now active in Morocc ($.pos)
		stop

		:gef
		do c @main Buffbot is now active in Geffen ($.pos)
		stop

		:alde
		do c @main Buffbot is now active in Al De Baran ($.pos)
		stop

		:pay
		do c @main Buffbot is now active in Payon ($.pos)
		stop

		:como
		do c @main Buffbot is now active in Comodo ($.pos)
		stop

		:yuno
		do c @main Buffbot is now active in Juno ($.pos)
		stop
	}
}

automacro movepront {
	localtime >= 13:00
	localtime < 14:00
	localtime >= 20:00
	localtime < 21:00
	location not prontera
	class Priest
	call {
		$off = 1
		$moveType = 1
		do c @main Buffbot now moving to Prontera.
		do move prontera
	}
}

automacro movemor {
	localtime >= 14:00
	localtime < 15:00
	localtime >= 21:00
	localtime < 22:00
	location not morocc
	class Priest
	call {
		$off = 1
		$moveType = 2
		do c @main Buffbot now moving to Morocc.
		do move morocc
	}
}

macro botoff {
	if ($moveType > 0) goto :dest

	do c Please wait while I regen SP.
	stop

	:dest
	do c You'll have to wait until I reach my destination.

}
cs : ee : realist
ElfoLiNk
Noob
Noob
Posts: 19
Joined: 05 Jun 2008, 12:06
Noob?: No

Re: Wandering Buffbot (80% complete)

#2 Post by ElfoLiNk »

error:

Code: Select all

automacro givebless {
   pm /[b]agi[/b]/i
   class Priest
   exclusive 1
   call {
      if ($off == 1) goto off
      do sp 34 $.lastpm

      :off
      call botoff
   }
}
Image
Image
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Wandering Buffbot (80% complete)

#3 Post by sli »

Technically an oversight, not an error.
cs : ee : realist
ElfoLiNk
Noob
Noob
Posts: 19
Joined: 05 Jun 2008, 12:06
Noob?: No

Re: Wandering Buffbot (80% complete)

#4 Post by ElfoLiNk »

yes but my english is basic and i don't know the word oversight XD now i understand
Image
Image
ravanly
Noob
Noob
Posts: 2
Joined: 14 May 2008, 07:06
Noob?: Yes

Re: Wandering Buffbot (80% complete)

#5 Post by ravanly »

how does macro buff my mercenary
fco2783
Plain Yogurt
Plain Yogurt
Posts: 95
Joined: 05 Apr 2008, 05:15
Noob?: Yes
Location: in place where you cant go

Re: Wandering Buffbot (80% complete)

#6 Post by fco2783 »

we can do it... public chat with distance and not pm chat...
Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid

Re: Wandering Buffbot (80% complete)

#7 Post by Darki »

Hey, it could use a macro that makes it throw a Sanctuary skill if there are a lot of people in the screen. I guess it would be useful when there is a lot of people so you don't need to use heal so many times.

-----

This, combined with GM tweak, could make a nice "healer NPC" substitute. I guess, it's possible to put the OpenKore in the same host as the server?

I mean, if you're a server admin, you can create a job with all support skills (like priest/Soul linker ones, endows, chemical protection, berserk pitcher, etc), and then, make it to have a huge SP regeneration (for example give it a powered up Increase SP recovery skill), or to make it more real/cute, a way to get unlimited blue potions.

What do you think?
ImageImageImage
ImageImageImage
ImageImageImage
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Wandering Buffbot (80% complete)

#8 Post by sli »

I think that's kind of the entire point of this macro.
cs : ee : realist
Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid

Re: Wandering Buffbot (80% complete)

#9 Post by Darki »

I have a doubt, because I though about something similar (my first interest in bots was for slave accounts and healers). I've been planning some stuff about private servers and customs, and now it's possible even to creare walking npcs and so... wouldn't be kinda redundant then this? I do prefer the bot because is a "player", and you can, with someone that knows the authority code, for example, to take it and use it, and a lot of stuff... but I had the idea that, why use an account shen you can simply have an npc that is from the normal game emulator, and it can do the same function?

I'm not 100% sure about this (I guess this can be a stupidity from some "pro" wannabes from my game forum), but just wanted to ask. I've never seen a walking npc, except the sprite of a walking kafra in a website.
ImageImageImage
ImageImageImage
ImageImageImage
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Wandering Buffbot (80% complete)

#10 Post by sli »

All things considered, if I were running a server I'd just write a small, simple bot that just runs macros or has multiple bots codified into it natively (read: write my own standalone bot), then make it multithreaded so it could run a few at once. It'd use very little resources and could be taken down for maintenance without messing with the server at all, even to reload.
cs : ee : realist