Page 1 of 1
mail recall belt
Posted: Fri May 22, 2015 9:42 pm
by Supergala
hi guys i try to buy recall belt from wailing fjord and try to send to all my alt for make fusion.i use this script but mm say me "error to compile lua"...anyone can help me pls?the problem arrive when i add line where i try to send item by mail and try to compile nametable....ty
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
nameTable =
{
"char1","char2" etc
};
counter = 1;
</onLoad>
<!-- # 1 --><waypoint x="-10294" z="2230" y="43">
player:target_NPC(123010) -- Didide Spiderfoot
store:buyItem(228959, 15);
yrest(1000)
</waypoint>
<!-- # 2 --><waypoint x="-10258" z="2236" y="50"> </waypoint>
<!-- # 3 --><waypoint x="-10155" z="2235" y="47"> </waypoint>
<!-- # 4 --><waypoint x="-10072" z="2255" y="48"> </waypoint>
<!-- # 5 --><waypoint x="-9992" z="2265" y="50"> </waypoint>
<!-- # 6 --><waypoint x="-9912" z="2270" y="49">
player:target_NPC(123006) -- Mailbox
UMM_SendByNameOrId(nameTable[counter],228959, 15);
yrest(500);
counter = counter + 1;
end
</waypoint>
</waypoints>
Re: mail recall belt
Posted: Fri May 22, 2015 9:48 pm
by rock5
Supergala wrote:nameTable =
{
"char1","char2" etc
};
Firstly, I assume you don't have "etc" in your file?
Supergala wrote: <!-- # 6 --><waypoint x="-9912" z="2270" y="49">
player:target_NPC(123006) -- Mailbox
UMM_SendByNameOrId(nameTable[counter],228959, 15);
yrest(500);
counter = counter + 1;
end
</waypoint>
That "end" doesn't end anything.
That's all I see.
Re: mail recall belt
Posted: Sat May 23, 2015 7:45 am
by Supergala
y rock i don't have etc,i try to cancel "end" and check if work,another question,if mailbox crash your function is configured for regoll automatically?ty
Re: mail recall belt
Posted: Sat May 23, 2015 9:17 am
by rock5
If you reach your send limit then it logs off then back in again to clear the send limit. Then it continues where it left off.
Re: mail recall belt
Posted: Tue May 26, 2015 8:10 pm
by Supergala
mm say me there is a problem in on load event...i cut end as your suggest but don't wrk.i don't understand why....

Re: mail recall belt
Posted: Tue May 26, 2015 8:48 pm
by Supergala
rock i find the problem....how many name can add in name table?i have around 40 names in nametable,i try to add only 2 and it's work,can you answer me pls?if can't add 40 names how can i compile script for send belt to all?ty
Re: mail recall belt
Posted: Tue May 26, 2015 8:59 pm
by rock5
I can't see anything wrong with your onload.
I see you found the problem. For future reference you can use a trick we have mentioned before on the forums to find errors in onload. Copy the contents of the onload into another file, eg. tmpOnLoad.lua, and place it in the rom folder
Code: Select all
nameTable =
{
"char1","char2" etc
};
counter = 1;
Then change the onload of your waypoint file to point to that file
Code: Select all
<onLoad>
include("tmpOnLoad.lua")
</onLoad>
Then when you get an onload error it will tell you what line it's on and a better error description.
Supergala wrote:rock i find the problem....how many name can add in name table?i have around 40 names in nametable,i try to add only 2 and it's work,can you answer me pls?if can't add 40 names how can i compile script for send belt to all?ty
There is no limit to how many names you can add. You probably just made a mistake adding them. If you can't see what you are doing wrong then just add a few at a time until it fails. Then see what's wrong with what you just added.
Re: mail recall belt
Posted: Tue May 26, 2015 9:11 pm
by Supergala
if i add name after jacala mm say me an error to compile lua.if i use this script i don't have relog if when i send item stuck.why?
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
nameTable =
{
"char 1","char2","char3" etc
};
counter = 1;
<!-- Function to Buy Belts Wailing Fjord -->
function buyBelts_Fjord()
player:openStore("Didide Spiderfoot")
store:buyItem(228959, 20);
yrest(1000);
end
</onLoad>
<!-- # 1 --><waypoint x="-10294" z="2230" y="43">
player:target_NPC("Didide Spiderfoot")
store:buyItem(228959, 15);
yrest(1000)
</waypoint>
<!-- # 2 --><waypoint x="-10258" z="2236" y="50"> </waypoint>
<!-- # 3 --><waypoint x="-10155" z="2235" y="47"> </waypoint>
<!-- # 4 --><waypoint x="-10072" z="2255" y="48"> </waypoint>
<!-- # 5 --><waypoint x="-9992" z="2265" y="50"> </waypoint>
<!-- # 6 --><waypoint x="-9912" z="2270" y="49">
player:target_NPC(123006) -- Mailbox
UMM_SendByNameOrId(nameTable[counter],228959, 15);
yrest(500);
counter = counter + 1;
loadpaths(buybelt2)
end
</waypoint>
</waypoints>
Re: mail recall belt
Posted: Thu May 28, 2015 12:32 pm
by Bill D Cat
I really hope those are not your actual character names, lest someone stumble across this thread and you end up getting banned. Might be a good idea to edit the post to change the names to some type of placeholder names instead.
Re: mail recall belt
Posted: Thu May 28, 2015 2:14 pm
by noobbotter
Yes, edit your post and remove those names.
As for why you can't add any names, keep in mind when you have items in the nameTable, every item should have a comma after it except for the last item in the table. If you are adding more names, make sure all of them have a comma except the last item.
What I'm confused about is the variable "counter" which is established in the onLoad section:
Then in waypoint 6, you send 15 belts to the first name in the table. Then it increases the counter by 1. Then it loads a different waypoint. How will it ever send to other characters?
Re: mail recall belt
Posted: Thu May 28, 2015 2:24 pm
by rock5
The copy he sent me via pm had some quote marks missing so I think he was just adding them wrong.
I think the point with the loadPaths is that he doesn't know how to add it. I added a check to see if it's reached the end of the list.
Re: mail recall belt
Posted: Thu May 28, 2015 2:38 pm
by noobbotter
Ok, Rock. So I assume you showed him how to build a loop to iterate through the table and you fixed his loadpath statement. Also, if he's sending 15 belts to each person, it will need to relog after 4 people so hopefully he has set up what he needs for that to happen properly.
Re: mail recall belt
Posted: Thu May 28, 2015 5:11 pm
by Supergala
thk's for now.i check and try..ty to all
Re: mail recall belt
Posted: Thu May 28, 2015 7:09 pm
by rock5
noobbotter wrote:Also, if he's sending 15 belts to each person, it will need to relog after 4 people
Well.... The mail functions
should handle that.
Re: mail recall belt
Posted: Thu May 28, 2015 7:12 pm
by Supergala
rock check my pm pls
Re: mail recall belt
Posted: Thu May 28, 2015 7:17 pm
by rock5
Already done it.
You don't have to tell me to check my PMs. I do it automatically.

But like my signature says, I always read posts first. That's why I answered the post first.