Anybody needs help?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
krix
Posts: 30
Joined: Sun May 13, 2012 7:26 pm

Anybody needs help?

#1 Post by krix » Mon Jul 02, 2012 8:03 pm

There are few people here who do awesome job. Your scripts, waypoints and whole rombot is great and succesfull project. It gave me many hours of fun :)
I cant believe you all use your time not only to keep improving it, but you provide quick and professional "helpdesk" for all users. Even for those who ask basic, annoying questions over and over again.

I feel bad about taking all your hard work and not giving a thing in return. I want to contribute in some way to this community. I don't wanna be one of those who only leach

Unfortunately I'm not good programmer. I just know a bit of java.

I want to help. I can, for example, do sets of waypoints from point A to B, while any of u spend ur time on harder parts of code. I can watch ur scripts many times to pinpoint where something goes wrong. I can do whatever u need and is within my skills.
Lisa, Rock, BillDoor, and all other big guys. I hope u could use extra pair of hands :)
I'm at your service.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Anybody needs help?

#2 Post by lisa » Mon Jul 02, 2012 9:22 pm

You could always tag yourself as a "beta tester" for things.

I know I personally don't play RoM and usually just log in to test things, so if you have the means to test functions and such then you could help in that way.

It would depend greatly on your PC as to how many game clients + MM you can run, also depend on your characters as to what you can test.

I just posted a userfunction today for testing.
http://www.solarstrike.net/phpBB3/viewt ... 913#p38913
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Anybody needs help?

#3 Post by BillDoorNZ » Mon Jul 02, 2012 11:23 pm

yup, beta testing is always helpful :)

I'm currently slogging my way through scripting quests. Slow and painful. I keep coming back to that one and always end up starting a new character, running through till 20/20 then scripting a few more quests as I level it to 50. Tho, I should probably only concentrate on the quests that are 30+ as is faster to just power level a character to 30 anyway.

Having said that, I have so many custom classes for interacting with a separate .Net app via a TCP/IP connection that its a nightmare to even thing about trying to get someone else to help :)

If you are motivated and enjoy this stuff, then making WP's for leveling new characters is always well received. I'm taking a longer term approach with what I'm doing and creating a waypoint for each quest (or maybe for 2 or 3 at once - in cases like quest Ids: 423989,423987 in CoO (Mending Bridges and the Toxin Trace Research quests) which both have to be done together. But because of the customisations I have made, my waypoint files are a little different. e.g.:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
	quest1_Id=423985;
	quest1 = __QL:getQuestById(quest1_Id);
	quest1:update();
	
	quest2_Id=423986;
	quest2 = __QL:getQuestById(quest2_Id);
	quest2:update();

	printf("Starting waypoint for Quest: "..quest1.Name.." ("..tostring(quest1.Id)..")\n");
	
	if (not quest1.Accepted) then
		redirectToWaypointTag("start");
	else
		__QB:update();
	end;
	
	repeatGuard = 0;

	Mobs_Add("_423804");
	lastMaxTargetDistance = settings.profile.options.MAX_TARGET_DIST;
</onLoad>
<onUnload>
	Mobs_Remove("_423804");
	settings.profile.options.MAX_TARGET_DIST = lastMaxTargetDistance;
</onUnload>
	<!-- #   0 --><waypoint x="-7132" z="2006" y="618" tag="start">
		PickupQuestIfIDontHaveIt(quest1);
	</waypoint>
	<!-- #   1 --><waypoint x="-7209" z="1955" y="616"></waypoint>
	<!-- #   2 --><waypoint x="-7307" z="1903" y="617"></waypoint>
	<!-- #   3 --><waypoint x="-7457" z="1866" y="612"></waypoint>
	<!-- #   4 --><waypoint x="-7626" z="1832" y="616"></waypoint>
	<!-- #   5 --><waypoint x="-7730" z="1847" y="616">
		PickupQuestIfIDontHaveIt(quest2);
	</waypoint>
	<!-- #  12 --><waypoint x="-7571" z="1781" y="615"></waypoint>
	<!-- #  13 --><waypoint x="-7428" z="1375" y="614"></waypoint>
	<!-- #  14 --><waypoint x="-7294" z="1228" y="616">teleportToWP();</waypoint>
	<!-- #  15 --><waypoint x="-7234" z="1161" y="618">changeProfileOption("MAX_TARGET_DIST", 100);</waypoint>
	<!-- #  16 --><waypoint x="-6981" z="838" y="614">
		Mobs_Add(GetIdName(105372));
		Mobs_Add(GetIdName(105172));
	</waypoint>
	<!-- #  17 --><waypoint x="-6856" z="746" y="601"></waypoint>
	<!-- #  18 --><waypoint x="-6772" z="569" y="601" tag="loop"></waypoint>
	<!-- #  19 --><waypoint x="-6799" z="463" y="620"></waypoint>
	<!-- #  20 --><waypoint x="-6814" z="299" y="614"></waypoint>
	<!-- #  21 --><waypoint x="-6858" z="121" y="611"></waypoint>
	<!-- #  22 --><waypoint x="-6778" z="-109" y="618"></waypoint>
	<!-- #  23 --><waypoint x="-6763" z="-205" y="618"></waypoint>
	<!-- #  24 --><waypoint x="-6667" z="-327" y="616"></waypoint>
	<!-- #  25 --><waypoint x="-6511" z="-403" y="620">
		redirectIfComplete(quest2.Id, "afterPod", "vanilla");
	</waypoint>
	<!-- #  42 --><waypoint x="-6561" z="-546" y="629" tag="get pod"></waypoint>
	<!-- #  43 --><waypoint x="-6667" z="-561" y="649"></waypoint>
	<!-- #  44 --><waypoint x="-6773" z="-555" y="670">
		while (not CheckGoalIsComplete(quest2.Id, "vanilla")) do
			player:target_NPC(117732);
			yrest(5000);
			--do combat if necessary
		end;
	</waypoint>
	<!-- #  43 --><waypoint x="-6667" z="-561" y="649"></waypoint>
	<!-- #  42 --><waypoint x="-6561" z="-546" y="629"></waypoint>
	
	<!-- #  25 --><waypoint x="-6511" z="-403" y="620" tag="afterPod"></waypoint>
	<!-- #  26 --><waypoint x="-6370" z="-351" y="619"></waypoint>
	<!-- #  27 --><waypoint x="-6220" z="-104" y="599"></waypoint>
	<!-- #  28 --><waypoint x="-6307" z="-22" y="594"></waypoint>
	<!-- #  29 --><waypoint x="-6483" z="129" y="593"></waypoint>
	<!-- #  30 --><waypoint x="-6555" z="282" y="601"></waypoint>
	<!-- #  31 --><waypoint x="-6689" z="501" y="601">
		redirectIfIncomplete(quest2.Id, "loop");
	</waypoint>
	
	<!-- #  32 --><waypoint x="-6921" z="781" y="604">teleportToWP();</waypoint>
	<!-- #  33 --><waypoint x="-6972" z="835" y="613"></waypoint>
	<!-- #  34 --><waypoint x="-7392" z="1368" y="615"></waypoint>
	<!-- #  35 --><waypoint x="-7600" z="1771" y="616"></waypoint>
	<!-- #  36 --><waypoint x="-7702" z="1852" y="616">TurnInQuestIfComplete(quest2);</waypoint>
	<!-- #  37 --><waypoint x="-7551" z="1827" y="615"></waypoint>
	<!-- #  38 --><waypoint x="-7456" z="1879" y="613"></waypoint>
	<!-- #  39 --><waypoint x="-7386" z="1883" y="614"></waypoint>
	<!-- #  40 --><waypoint x="-7234" z="1940" y="617"></waypoint>
	<!-- #  41 --><waypoint x="-7140" z="2008" y="617">
	if (repeatGuard == 0) then
		repeatGuard = 1;
		printf("Turning in Quest\n");
		TurnInQuestIfComplete(quest1);
	end;
	</waypoint>
</waypoints>

where the __QL is a quest list class that loads the quest (using its Id) from a database to get the Starter & Ender NPC Id etc (and reward items) and the helper functions (TurnInQuestIfComplete etc) are used to determine when the quest is fully completed or if parts are complete (e.g. redirectIfComplete(quest2.Id, "afterPod", "vanilla") which skips harvesting of the vanilla pod is the Goal 'Vanilla' is completed).

Ideally later on the bot would look at the players level, zone etc and figure out which quest to do, build a path from their current location to the starting NPC, run there and run the quest waypoint then rinse and repeat.

Meh, anyway, I'm rambling once again.

krix
Posts: 30
Joined: Sun May 13, 2012 7:26 pm

Re: Anybody needs help?

#4 Post by krix » Wed Jul 04, 2012 8:52 am

BillDoorNZ - it would be nice if u made some kind of guide with most used functions like "gatering quest herbs/lost weapons from the ground" , "loot only from questmonster but kill all agresive ones" check if quest completed and so on. What to do if one quest want u to harvest 5 somethings, kill 10 mobs, and use_werid_item 5 times? I'm sure u have some way to check if different parts of quest are completed or not ;)
What is repeatguard for?
With few examples of code like:

Code: Select all

<onLoad>
   quest1_Id=46664666; -- example for simple killing quest 
   quest1 = __QL:getQuestById(quest1_Id);
   quest1:update();

   printf("Starting waypoint for Quest: "..quest1.Name.." ("..tostring(quest1.Id)..")\n");
   
   if (not quest1.Accepted) then                  -- here we make sure quest is accepted
      redirectToWaypointTag("start");
   else
      __QB:update();
   end;  
   lastMaxTargetDistance = settings.profile.options.MAX_TARGET_DIST;
</onLoad>
<!-- #   0 --><waypoint x="-7132" z="2006" y="618" tag="start"> -- HERE WE accept quest in case we dont have it
      PickupQuestIfIDontHaveIt(quest1);
   </waypoint>
<!-- #   1 --><waypoint x="-7209" z="1955" y="616"></waypoint> --  going to place where aour target spawns
   <!-- #   2 --><waypoint x="-7307" z="1903" y="617"></waypoint>
   <!-- #   3 --><waypoint x="-7457" z="1866" y="612"></waypoint>
   <!-- #   4 --><waypoint x="-7626" z="1832" y="616"></waypoint> 
    --[[ here we can put some more WP --]] 
   <!-- #  5 --><waypoint x="-6667" z="-561" y="649"></waypoint>
   <!-- #  6 --><waypoint x="-6561" z="-546" y="629"></waypoint>
   
   <!-- #  7 --><waypoint x="-6511" z="-403" y="620" tag="killingtime"></waypoint> -- we are starting running circles and killing mobs
   <!-- #  8 --><waypoint x="-6370" z="-351" y="619"></waypoint>
   <!-- #  9 --><waypoint x="-6220" z="-104" y="599"></waypoint>
   <!-- #  10 --><waypoint x="-6307" z="-22" y="594"></waypoint>
   <!-- #  11 --><waypoint x="-6483" z="129" y="593"></waypoint>
   <!-- #  12 --><waypoint x="-6555" z="282" y="601"></waypoint>
   <!-- #  13 --><waypoint x="-6689" z="501" y="601">                -- if quest isn't done we return to killingtime  if not, next WP shoud guide us to quest end NPC.
      redirectIfIncomplete(quest1.Id, "killingtime"); </waypoint> 
	  
	  --[[ here we can put some more WP  --]] 
	  
	  <!-- #  xx --><waypoint x="-7140" z="2008" y="617"> -- We take wp close to quest end NPC and get rewards :) 
   
      TurnInQuestIfComplete(quest1);
   
   </waypoint>
</waypoints>
	  
	

Lots of comments - newbies loves comments ;)

And list of already coded quests sound useful. It allows to avoid wasting time.

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Anybody needs help?

#5 Post by BillDoorNZ » Wed Jul 04, 2012 5:09 pm

sorry, was bed ridden yesterday with a nasty cold and too lazy to log on ;)

RepeatGuard is soemthing I have to do due to some modifications I made to bot.lua. I don't want my waypoints to loop automatically, so I added in a check for when the WP index is >= the last one, at which point it stops the waypoint and loads the 'wander' waypoint instead. I was finding that the code in the last waypoint was executing twice for some reason (should really sort it out, but have been too lazy) and as a result I added that check to stop it executing multiple times.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Anybody needs help?

#6 Post by lisa » Sun Jul 08, 2012 4:03 am

How in depth is you database of quests going?

I am playing around with an "intelligent" addon to determine what quest to do, reason I decided to go with an addon is so I could do hundreds of "GetQuestRequest" and not do them all through macros, so speed it up and make it more efficient.
Very early days for this, literally just thought about the idea today and just starting prelim work on it.

Basically I intend to do a zone check, lvl check and what quests have been done and not and then decide what quest/s to do next and then do them.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Anybody needs help?

#7 Post by BillDoorNZ » Sun Jul 08, 2012 3:10 pm

lisa wrote:How in depth is you database of quests going?

I am playing around with an "intelligent" addon to determine what quest to do, reason I decided to go with an addon is so I could do hundreds of "GetQuestRequest" and not do them all through macros, so speed it up and make it more efficient.
Very early days for this, literally just thought about the idea today and just starting prelim work on it.

Basically I intend to do a zone check, lvl check and what quests have been done and not and then decide what quest/s to do next and then do them.
I used RomDB or one of the other rom databases out there and basically pulled all the known (at that time) quests down via some C# code and saved the xml, re-parsed it all and injected it into a db. So the quest list is quite thorough from memory. I then added in some more code to pull reward data from each quests when I pick them up with a character (this is a bit more manual tho, as I run some code to load the quest book info, and use the rom api's to pull a list of rewards etc and then send these off to my server app to save). So far, there are 4220 quests in my db - bearing in mind, these are just the bare basics of the quest info:

Code: Select all

CREATE TABLE [dbo].[QuestDefinitions](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[RomId] [int] NULL,
	[Name] [nvarchar](255) NULL,
	[MinLevel] [int] NULL,
	[Level] [int] NULL,
	[StarterId] [int] NULL,
	[EnderId] [int] NULL,
	[Gold] [int] NULL,
	[XP] [int] NULL,
	[TP] [int] NULL,
	[RewardCategory] [int] NULL,
	[RewardSubCategory] [int] NULL,
	[QuestChainFk] [int] NULL,
	[ChainIndex] [int] NULL,
(The last 2 aren't currently used as its just too much work right now) and the RewardCategory and Subcategory were an intention but have now been replaced by a link table from quest to item etc. i.e.:

Code: Select all

CREATE TABLE [dbo].[ItemDefinitions](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[RomId] [int] NULL,
	[Name] [nvarchar](255) NULL,
	[Value] [int] NULL,
	[ItemType] [nvarchar](255) NULL,
	[ItemSubType] [nvarchar](255) NULL,
	[ItemSubSubType] [nvarchar](255) NULL,
	[RequiredLevel] [int] NULL,

CREATE TABLE [dbo].[QuestRewards](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[RewardIndex] [int] NULL,
	[RewardType] [nvarchar](255) NULL,
	[ItemDefinitionFk] [int] NULL,
	[QuestDefinitionFk] [int] NULL,
	[ItemCount] [int] NULL,

I also have any NPC's etc stored in another table so I can link from the StarterId to get the zone etc.

I have a longer term goal of doing what you are suggesting. Looking at the character, finding a set of quests which will let them get to next level, running those and then repeating. I was planning on getting the bot to do them 1 at a time, and as a result I am building 1 waypoint file per quest (tho some quests have to be done together so some will do more than 1 quest). So the logic would work more like:

1) Find the nearest highest xp quest for the character (that we have a waypoint for)
2) Build a path to the starter npc
3) Run to the starter npc
4) Execute the quest waypoint
5) Update the database so we know the character has run this quest
6) Repeat

Because I store the quest rewards I also include some logic for the bot to figure out which reward item to chose (very basic atm, tho you specify whether you want Leather/Cloth/Plate etc or if you just want gold (default)).

The biggest hurdle to this is building the waypoint files for each quest :( However, I'm doing some testing and research to see if I can get the bot to figure out how to do some of the quests - I have a small amount of the game world mapped out with nodes for navigation and I have a large list of monster and npc locations in the database:

Code: Select all

CREATE TABLE [dbo].[NonPlayerEntities](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[RomId] [int] NULL,
	[UniqueId] [int] NULL,
	[Name] [nvarchar](255) NULL,
	[ZoneId] [int] NULL,
	[X] [float] NULL,
	[Y] [float] NULL,
	[Z] [float] NULL,
	[EntityTypes] [tinyint] NULL,
	[RomType] [tinyint] NULL,
So, in theory the bot should be able to run to known locations of the mobs it needs to kill - I just need to determine how to get the mob id etc from the quest book info (I don't use the long description etc yet so need to look into it). I do pull the goals for the quest back, but they are plain text and don't always include enough info to work out what mob to target etc.

If I can do this, then it will just be a matter of a lot more mapping of the game world and updating of the NPE database and from there a lot of testing - but I'd rather do that than build waypoint files forever and a day!! :)

All very ambitious and time consuming. So this is all a long way off.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Anybody needs help?

#8 Post by lisa » Sun Jul 08, 2012 9:08 pm

Sounds good =)

I was looking at basically checking player lvl and then doing a check for quests that can be done for that lvl in that zone, hence the GetQuestRequest usage, instead of having an actual database for each character. So you could load any char and just run the bot and it will decide what quest to do.
Kind of making it a 1 button lvl up bot as such.

I was going along the same lines of mapping the world map and just using the code I was working on months ago for pathing to places, rock and admin did a lot of work on it too. So no need for actual WP files for each quest.

No idea if I will actually get anywhere with the project, it is rather large and time is as always not on my side.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Anybody needs help?

#9 Post by BillDoorNZ » Sun Jul 08, 2012 9:15 pm

lisa wrote:Sounds good =)

I was looking at basically checking player lvl and then doing a check for quests that can be done for that lvl in that zone, hence the GetQuestRequest usage, instead of having an actual database for each character. So you could load any char and just run the bot and it will decide what quest to do.
Kind of making it a 1 button lvl up bot as such.

I was going along the same lines of mapping the world map and just using the code I was working on months ago for pathing to places, rock and admin did a lot of work on it too. So no need for actual WP files for each quest.

No idea if I will actually get anywhere with the project, it is rather large and time is as always not on my side.
amen to that. :)

the 'pathing' stuff you mentioned sounds interesting. Does it require that you have a lot of nodes laid down and it reuses those? or was it more intelligent and didn't need any nodes at all?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Anybody needs help?

#10 Post by lisa » Sun Jul 08, 2012 9:47 pm

Yeah we did it using nodes with connections between each node, otherwise you would still run into obstructions. Originally I set it up with a grid system covering the entire map, I think that was going a bit overboard though and have been thinking of just "paths" as such all connecting up.
Hmm I would describe it like a road instead of a grid and the code decides best path to take to go from where you are to where you want to be, adds the points to take into a table and then can follow them using a moveto function.

I'll add an old pic I did for the AT instance.
atpoints.png
That is a visualization of the points and how the points connected, you can see the "arrows" which are directional from point to point to show which points connect to which.
All the point data is in a table for each map. Found this 1, can't remember what map it was for, been a while.

Code: Select all

	[1]={ X=3342 , Z=3956, Y=7, Links={[1]={Num=2},}},
	[2]={ X=3392 , Z=3944, Y=7, Links={[1]={Num=1},[2]={Num=3},}},
	[3]={ X=3441 , Z=3933, Y=7, Links={[1]={Num=2},[2]={Num=4},}},
	[4]={ X=3489 , Z=3921, Y=7, Links={[1]={Num=3},[2]={Num=5},}},
	[5]={ X=3538 , Z=3916, Y=7, Links={[1]={Num=4},[2]={Num=6},}},
	[6]={ X=3582 , Z=3931, Y=7, Links={[1]={Num=5},[2]={Num=7},}},
	[7]={ X=3608 , Z=3963, Y=7, Links={[1]={Num=6},[2]={Num=8},}},
	[8]={ X=3635 , Z=4010, Y=7, Links={[1]={Num=7},[2]={Num=9},}},
	[9]={ X=3654 , Z=4047, Y=7, Links={[1]={Num=8},[2]={Num=10},}},
	[10]={ X=3671 , Z=4090, Y=7, Links={[1]={Num=9},[2]={Num=11},}},
	[11]={ X=3693 , Z=4128, Y=7, Links={[1]={Num=10},[2]={Num=12},}},
	[12]={ X=3706 , Z=4163, Y=7, Links={[1]={Num=11},[2]={Num=13},}},
	[13]={ X=3707 , Z=4202, Y=7, Links={[1]={Num=12},[2]={Num=14},}},
	[14]={ X=3697 , Z=4247, Y=7, Links={[1]={Num=13},[2]={Num=15},}},
	[15]={ X=3680 , Z=4297, Y=7, Links={[1]={Num=14},[2]={Num=16},}},
	[16]={ X=3664 , Z=4346, Y=7, Links={[1]={Num=15},[2]={Num=17},}},
	[17]={ X=4166 , Z=4415, Y=7, Links={[1]={Num=16},[2]={Num=18},}},
	[18]={ X=4406 , Z=3929, Y=7, Links={[1]={Num=17},[2]={Num=19},}},
	[19]={ X=4097 , Z=3378, Y=7, Links={[1]={Num=18},[2]={Num=20},}},
	[20]={ X=3611 , Z=3421, Y=7, Links={[1]={Num=19},[2]={Num=21},}},
	[21]={ X=3359 , Z=3778, Y=7, Links={[1]={Num=20},[2]={Num=22},[3]={Num=36},}},
	[22]={ X=3329 , Z=3954, Y=7, Links={[1]={Num=21},[2]={Num=1},}},
	[23]={ X=4021 , Z=3944, Y=88, Links={}},
	[24]={ X=3830 , Z=4094, Y=88, Links={}},
	[25]={ X=3676 , Z=4124, Y=88, Links={}},
	[26]={ X=3506 , Z=3836, Y=88, Links={}},
	[27]={ X=3681 , Z=3549, Y=88, Links={}},
	[28]={ X=3827 , Z=3577, Y=88, Links={}},
	[29]={ X=4012 , Z=3551, Y=88, Links={}},
	[30]={ X=4169 , Z=3837, Y=88, Links={}},
	[31]={ X=4007 , Z=4128, Y=88, Links={}},
	[32]={ X=3873 , Z=4097, Y=88, Links={}},
	[33]={ X=3835 , Z=3629, Y=88, Links={}},
	[34]={ X=3657 , Z=3728, Y=88, Links={}},
	[35]={ X=3847 , Z=4029, Y=88, Links={}},
	[36]={ X=3062 , Z=3556, Y=0, Links={[1]={Num=21},}},
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Anybody needs help?

#11 Post by BillDoorNZ » Sun Jul 08, 2012 10:24 pm

ah yes...exactly what I'm doing...tho I keep teleport npcs too and dynamically associate them with the closest nodes (and any other npcs).

then, as you mention, to get to and npc or location...get the closest node to the player, find shortest path (I use A* algorithm) and then I just build a waypoint file and tell the bot to run it.

Code: Select all

CREATE TABLE [dbo].[MapPoints](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[X] [float] NULL,
	[Y] [float] NULL,
	[Z] [float] NULL,
	[MapZoneFk] [int] NULL,
	[Name] [nvarchar](255) NULL,


CREATE TABLE [dbo].[MapLinks](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[MapPointFk] [int] NOT NULL,
	[MapPointEndFk] [int] NOT NULL,
	[LinkType] [int] NULL, --LINK type can be walk / teleport
	[Script] [nvarchar](255) NULL,

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Anybody needs help?

#12 Post by lisa » Sun Jul 08, 2012 10:46 pm

What I do is use the existing createpath and then run a function I created to turn the WP into the table format I wanted, so creating the actual points is farely easy.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Anybody needs help?

#13 Post by BillDoorNZ » Mon Jul 09, 2012 2:11 pm

heh...I understand why you do it that way!! I'd already built my external C# winforms app when I started doing all that so it was easy enough just to capture the waypoints from that app and save them in a similar way :) In fact, I altered my app to automatically add waypoints as I moved around (this is enabled and disabled tho so as to not automap all the time - which would be a nightmare) and then I just run along the roads / routes and make sure I stop at the turning points - not really ideal, but the lazy-mans version of not-going-insane :)

I originally had all the nodes and npc's etc in one big xml document, but recently split it out into the database structure I've been outlining - tho my app is still running off the old document mostly and I'm slowly rebuilding the whole thing based around the database :) And I need to change the teleport scripts from ChoiceOptions to ChoiceOptionByName to make them more reliable and then of course get it to store which characters know about which teleport routes to stop those annoying situations where the tool builds a path the character can't follow :(

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests