Help for complete script

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Ballerlocke
Posts: 12
Joined: Sat Jul 23, 2011 7:22 pm

Help for complete script

#1 Post by Ballerlocke »

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
</onLoad>
<!-- # 1 --><waypoint x="2510" z="-1387" y="53" tag="start">
player:target_NPC("Gildenburgverwalter"); ------------------go to Guild Castle
yrest(2000);
sendMacro("ChoiceOption(2);");
waitForLoadingScreen(10);
yrest(2000);
</waypoint>
<!-- # 1 --><waypoint x="0" z="-448" y="5"> </waypoint>
<!-- # 2 --><waypoint x="0" z="-396" y="5"> </waypoint>
<!-- # 3 --><waypoint x="0" z="-361" y="5">
numtoken = inventory:getItemCount(203402); ------------------- if the char has not enough Tempest Height Warrior Necklace for Quest go to Bank
if 30 >= numtoken then
-- Wait for user to use some shells.
__WPL:setWaypointIndex(__WPL:findWaypointTag("goBank"))
end
</waypoint>
<!-- # 4 --><waypoint x="-2" z="-327" y="5" tag="continue"> </waypoint>
<!-- # 5 --><waypoint x="-26" z="-299" y="5"> </waypoint>
<!-- # 6 --><waypoint x="-59" z="-268" y="5"> </waypoint>
<!-- # 7 --><waypoint x="-78" z="-235" y="5">
do player:target_NPC("Gildenquestbrett III"); ------------------ Accept Quest Guild Need Weapons
sendMacro("OnClick_QuestListButton(1,5)");
sendMacro("CompleteQuest()");
sendMacro("CloseWindows()");
end
do player:target_NPC("Gildenquestbrett III"); -------------------- Complett Quest Guild Need Weapons
sendMacro("OnClick_QuestListButton(3,1)");
sendMacro("AcceptQuest()");
sendMacro("CloseWindows()");
yrest(1000);
end
RoMScript("ChangeChar()"); ------------------------- Login Next Char on this Account
waitForLoadingScreen()
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
</waypoint>


<!-- # 1 --><waypoint x="0" z="-223" y="5" tag="goBank"> </waypoint>
<!-- # 2 --><waypoint x="-1" z="-60" y="5"> </waypoint>
<!-- # 3 --><waypoint x="0" z="101" y="7"> </waypoint>
<!-- # 4 --><waypoint x="0" z="256" y="7"> </waypoint>
<!-- # 5 --><waypoint x="12" z="439" y="7"> </waypoint>
<!-- # 6 --><waypoint x="27" z="540" y="7"> </waypoint>
<!-- # 7 --><waypoint x="40" z="619" y="7">
player:target_NPC("112062"); ------------ Guild Treasury Switch open
yrest(2000)
local count = 30;
local item = guildbank:findItem("203402")
while ((99 > count) and (item)) do
item:moveTo("bags")
count = count + item.ItemCount;
item = guildbank:findItem("203402");
end
yrest(4000)
player:target_NPC("112062"); ------------ Guild Treasury Switch close
</waypoint>
----- -Here is my problem i don't no how i write to take out one stack of the Questitem of the Bank/ In the Bank are allways item for the quest on index tab one-

<!-- # 9 --><waypoint x="15" z="545" y="7"> </waypoint>
<!-- # 10 --><waypoint x="-10" z="450" y="7"> </waypoint>
<!-- # 11 --><waypoint x="-12" z="308" y="7"> </waypoint>
<!-- # 12 --><waypoint x="-9" z="142" y="7"> </waypoint>
<!-- # 13 --><waypoint x="-7" z="17" y="7"> </waypoint>
<!-- # 14 --><waypoint x="-6" z="-161" y="5"> </waypoint>
<!-- # 15 --><waypoint x="-6" z="-248" y="5">
__WPL:setWaypointIndex(__WPL:findWaypointTag("continue"))
</waypoint>
</waypoints>
Last edited by Ballerlocke on Fri Sep 14, 2012 10:07 am, edited 2 times in total.
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Help for complete script

#2 Post by BillDoorNZ »

please put code and waypoint xml in code tags!!! makes it easier to read

not sure who "Gildentresor-Schalter" is - assume bank npc?

What you need to do is:

1) talk to the bank npc and get them to open your bank bag (Use the ChoiceOptionByName helper method)
2) use rocks item stuff to find the item you want:

Code: Select all

local count = 0;
local item = bank:findItem("itemname")
while ((count < numberOfItemsINeed) and (item)) do
	item:moveTo("bags")
	count = count + item.ItemCount;
	
	item = bank:findItem("itemname"); 
end
Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: Help for complete script

#3 Post by Jandrana »

not sure who "Gildentresor-Schalter" is - assume bank npc?
It's "Guild Treasury Switch"

Just a small hint: to make scripts working independent of client language it is better
to use object id's. You will find them in runes database. To keep scripts readable
add the name of the object, quest, npc as a comment (preferable in english).
So people that need to understand the script, don't need to lookup the id in runesdatabase.

Example for the "Guild Treasury Switch" -> http://www.runesdatabase.com/npc/112062/
Ballerlocke
Posts: 12
Joined: Sat Jul 23, 2011 7:22 pm

Re: Help for complete script

#4 Post by Ballerlocke »

thanks jandrana but this point is ok i play in german. i can yous the ID of the switcher then all countrys can yous this script
Ballerlocke
Posts: 12
Joined: Sat Jul 23, 2011 7:22 pm

Re: Help for complete script

#5 Post by Ballerlocke »

I have update the script for hope you can better read this

BillDoorNZ I tried your but in notepad++ he see a problem after
"while ((count <"


Code:
local count = 0;
local item = bank:findItem("203402")
while ((count < numberOfItemsINeed) and (item)) do
item:moveTo("bags")
count = count + item.ItemCount;

item = bank:findItem("203402");
end
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Help for complete script

#6 Post by rock5 »

Can't use '<' in xml files. They are interpreted as the beginning of a tag. Easy solution just switch them around. xml files have no problem with '>'. So

Code: Select all

while ((numberOfItemsINeed > count) and (item)) do
will work just fine and means the same thing.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Help for complete script

#7 Post by BillDoorNZ »

dont know that bank will work for you either...given its the guild bank, not a normal bank. Rock may know how that one works or have implemented stuff already.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Help for complete script

#8 Post by rock5 »

The same. Just substitute guildbank for bank. Good to see someone use these extra classes I added.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Ballerlocke
Posts: 12
Joined: Sat Jul 23, 2011 7:22 pm

Re: Help for complete script

#9 Post by Ballerlocke »

i update again but he still don't pickup item out of bank where is the mistake
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Help for complete script

#10 Post by rock5 »

Ids are numbers, not strings. Try removing the quotes.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Ballerlocke
Posts: 12
Joined: Sat Jul 23, 2011 7:22 pm

Re: Help for complete script

#11 Post by Ballerlocke »

thanks now it goes
next plan if he go to Guildbank send Guildrubins to a other Char
valsan
Posts: 9
Joined: Wed Oct 10, 2012 4:37 pm

Re: Help for complete script

#12 Post by valsan »

Hi all!

Im writing a waypoint to do the guild quest, basically i copy from this post but it dont run.

The seccion of the error is when try to get item from the guild bank:

Code: Select all

player:target_NPC("112062"); 
yrest(6000)
player:target_NPC("112062"); --open twice, in case anyone left open
yrest(1000)

item = guildbank:findItem("Collar del guerrero de Cumbre Tempestad")
if item then
    item:moveTo(bags)
end
i try using the ID from database, use while and if....

sorry for my very bad english :)
Attachments
MisionGremio.xml
To test it, need to go to East in Varanas
(2.2 KiB) Downloaded 410 times
valsan
Posts: 9
Joined: Wed Oct 10, 2012 4:37 pm

Re: Help for complete script

#13 Post by valsan »

I also try with

Code: Select all

local count = 0;
local item = bank:findItem(203402) 
while ((count < 30) and (item)) do
item:moveTo("bags")
count = count + item.ItemCount;

item = bank:findItem(203402);
end
but not working, even using guildbank:findItem not workin...

any help or tip please?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Help for complete script

#14 Post by rock5 »

That code works for me. Maybe you are not giving the bank or guildbank enough time to open before using that code.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
valsan
Posts: 9
Joined: Wed Oct 10, 2012 4:37 pm

Re: Help for complete script

#15 Post by valsan »

Finnaly run!!

This is the code i used for it:

Code: Select all

local count = 0;
local item = guildbank:findItem(203402);

while ((30 > count) and (item)) do
item:moveTo("bags");
count = count + item.ItemCount
item = guildbank:findItem(203402);
yrest(2000)
end
Post Reply