Page 1 of 1

why wont this compile?

Posted: Sat Jan 14, 2012 11:52 pm
by jdawg78
howdy there, so ive been a fan of blyads dogmeat script :D shout outs! so i decided to use my moderate coding ability (mostly java) to try to improve it. i noticed that in the original script, after a select amount of dogmeats, the waypoint makes you run all the way from the frontline camp to Static Lafrofea or whatever :? ive died many times amounting to 3m+ debt so i decided to make this:

Code: Select all

 <?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="-6355" z="-3881" y="164">	</waypoint>
	<!-- #  2 --><waypoint x="-6512" z="-3815" y="166">	</waypoint>
	<!-- #  3 --><waypoint x="-6662" z="-3794" y="168">	</waypoint>
	<!-- #  4 --><waypoint x="-6793" z="-3804" y="166">	</waypoint>
	<!-- #  5 --><waypoint x="-6922" z="-3881" y="166">	</waypoint>
	<!-- #  6 --><waypoint x="-7047" z="-3907" y="159">	</waypoint>
	<!-- #  7 --><waypoint x="-7142" z="-3955" y="136"> player:target_Object("Mailbox",1000) yrest(300); sendMacro("ChoiceOption(1);"); yrest(400);
      UMM_SendByNameOrId("my alt",{"Guard Dog Meat"})  yrest(10000); UMM_SendByNameOrId("my alt",{"III"})  yrest(10000);
	</waypoint>
	<!-- #  8 --><waypoint x="-7065" z="-3922" y="155">	</waypoint>
	<!-- #  9 --><waypoint x="-6934" z="-3895" y="166">	</waypoint>
	<!-- #  10 --><waypoint x="-6805" z="-3805" y="166">	</waypoint>
	<!-- #  11 --><waypoint x="-6691" z="-3746" y="166">	</waypoint>
	<!-- #  12 --><waypoint x="-6576" z="-3790" y="166">	</waypoint>
	<!-- #  13 --><waypoint x="-6425" z="-3847" y="166">	</waypoint>
	<!-- #  14 --><waypoint x="-6343" z="-3905" y="163"> player:target_NPC("Snoop the Stubborn"); yrest(500); sendMacro("ChoiceOption("1");"); yrest(12000); player:target_NPC("Ailic's Aide"); yrest(500); sendMacro("ChoiceOption("1");");  yrest(12000); player:target_NPC("Ailic's Aide"); yrest(500); sendMacro("ChoiceOption("1");");  yrest(12000); player:target_NPC("Ailic's Aide"); yrest(500); sendMacro("ChoiceOption("1");");  waitForLoadingScreen(); yrest(2000); player:target_NPC("Snoop the Stubborn"); yrest(500); sendMacro("ChoiceOption("1");");  yrest(12000); player:target_NPC("Ailic's Aide"); yrest(500); sendMacro("ChoiceOption("1");");  yrest(22000; loadPaths("blyads_dogmeat_loop.xml")
	</waypoint>	
</waypoints>
basically (after being recalled to heffner) will do the mailing, then go back to snoop and begin the process of porting back to frontline, but when i initiate the waypoint file it wont compile, probably due to my (many) obvious syntax errors. any help?

Re: why wont this compile?

Posted: Sun Jan 15, 2012 12:05 am
by rock5
Your choice options are wrong.

Code: Select all

sendMacro("ChoiceOption("1");");  
Do it like the first one you did.

Code: Select all

sendMacro("ChoiceOption(1);");  
Also you'll need to do a "player:update()" at each new location or the "target_NPC" commands wont work.

Mind you I have never done a bunch of teleports like that. I usually do a waypoint at each new location. Should work though. Although if you have to restart the script at one of those locations it wont work. That's why its good to have a waypoint at each teleport point.

Re: why wont this compile?

Posted: Sun Jan 15, 2012 12:06 am
by lisa
you are missing an end/close bracket

Code: Select all

yrest(22000; loadPaths("blyads_dogmeat_loop.xml")

Code: Select all

yrest(22000); loadPaths("blyads_dogmeat_loop.xml")

Re: why wont this compile?

Posted: Sun Jan 15, 2012 12:10 am
by jdawg78
thanks for your quick reply! and i as for the waypoints after each teleport i considered it, is there a command somewhere i can type in that would give me my current co-ordinates? the only reason i didn't want to is because to my knowledge i'd have to save multiple rom/createpath.lua xml's for each teleport and i assume you cant have a waypoint without co-ordinates? thanks again.

Re: why wont this compile?

Posted: Sun Jan 15, 2012 12:26 am
by lisa
if you keep the WP stuck in an onload loop then you don't need any coords.

as for player coords

Code: Select all

player.X
player.Z
player.Y
make sure to do player:update() though or you might get old information.

Re: why wont this compile?

Posted: Sun Jan 15, 2012 12:42 am
by rock5
Or use getpos.lua

Edit:
Of course when creating the waypoint file with createpath you could have
  • teleport
    target npc and press 4
    press 1 to create wp
    teleport
    target npc and press 4
    press 1 to create wp
etc.

Re: why wont this compile?

Posted: Sun Jan 15, 2012 12:50 am
by jdawg78
perfect, thanks rock5. im going to tidy this as best i can, i would like to contribute this to the community. when its done would i post it here, on blyads post, or somewhere else?

Re: why wont this compile?

Posted: Sun Jan 15, 2012 2:00 am
by rock5
It's a modification of his script so I'd post it there. Does he still update it? Maybe he'll add your changes to his version.