Compiling Error

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Compiling Error

#1 Post by Personalausweis » Sat Oct 23, 2010 3:23 am

Code: Select all

<!-- # 10 --><waypoint x="5528" z="-4382">	</waypoint>
<!-- # 11 --><waypoint x="5534" z="-4432">
						player:target_NPC("Lehman");
						if RoMScript("IsMagicBoxEnable()");
						then
						sendMacro("ChoiceOption(1);");yrest(2000);
						sendMacro("ChoiceOption(1);");yrest(2000);
						RoMScript StoreBuyItem(3, inventory:itemTotalCount(203038)/30);
						else
						sendMacro("AcceptQuest()"); yrest(1000);
						sendMacro("CompleteQuest()"); yrest(1000);
						end
	</waypoint>
<!-- # 12 --><waypoint x="5525" z="-4379">	</waypoint>
what it SHOULD do is:
target Lehman and if AT is enabled he should buy charges for all phirius divided by 30 (900 phirius / 30 = 10 charges)
otherwise he shall activate the AT.

but MM encountered an error by compiling and i shall check waypoint #12

he did not buy anything an did not activate the AT so he didn't even worked on #11



€dit:

Code: Select all

<!-- # 10 --><waypoint x="5528" z="-4382">	</waypoint>
<!-- # 11 --><waypoint x="5534" z="-4432">
						player:target_NPC("Lehman");
						local questCompleted = RoMScript("CheckQuest(421457);");
   						if questCompleted == 2
						then
						keyboardPress(key.VK_SPACE);
						else
						keyboardPress(key.VK_SPACE);
                                                keyboardPress(key.VK_SPACE);
						end
	</waypoint>
<!-- # 12 --><waypoint x="5525" z="-4379">	</waypoint>
changed AT request.
and he jumped twice.
as i put back the a.m. code

Code: Select all

sendMacro("ChoiceOption(1);");yrest(2000);
sendMacro("ChoiceOption(1);");yrest(2000);
RoMScript StoreBuyItem(3, inventory:itemTotalCount(203038)/30);
he gave an error again.
Last edited by Personalausweis on Sat Oct 23, 2010 3:48 am, edited 1 time in total.

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: Compiling Error

#2 Post by swietlowka » Sat Oct 23, 2010 3:46 am

this if RoMScript("IsMagicBoxEnable()"); for sure doesnt work as this function is not valid
i use:
local ATQ= RoMScript("CheckQuest(421457);");
if ATQ == 0
then
blah balh blah
end;

Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Compiling Error

#3 Post by Personalausweis » Sat Oct 23, 2010 3:50 am

Hi, i made some changes:

Code: Select all

player:target_NPC("Lehman");
						local questCompleted = RoMScript("CheckQuest(421457);");
   						if questCompleted == 0
						then
						player:target_NPC("Lehman");
						sendMacro("AcceptQuest()"); yrest(1000);
						sendMacro("CompleteQuest()"); yrest(1000);
						else
						player:target_NPC("Lehman");
						sendMacro("ChoiceOption(1);");
						yrest(2000);
						sendMacro("ChoiceOption(1);");yrest(2000);
						RoMScript StoreBuyItem(3, inventory:itemTotalCount(203038)/30);
						end

but it still doesn't work -.-

any ideas?

User avatar
Administrator
Site Admin
Posts: 5329
Joined: Sat Jan 05, 2008 4:21 pm

Re: Compiling Error

#4 Post by Administrator » Sat Oct 23, 2010 8:41 am

Code: Select all

RoMScript StoreBuyItem(3, inventory:itemTotalCount(203038)/30);
Usually it's a good idea to open the RoMScript function with it's necessary parenthesis and quotes.

Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Compiling Error

#5 Post by Personalausweis » Sat Oct 23, 2010 9:10 am

Code: Select all

RoMScript("StoreBuyItem(1, inventory:itemTotalCount(203038)/30)");
looks better this way? ^^
or shall i reset "inventory:itemTotalCount(203038)/30" with

local Charges = inventory:itemTotalCount(203038)/30

i'll give it a try


€dit:

Code: Select all

player:target_NPC("Lehman");
sendMacro("AcceptQuest();");
yrest(1000);
sendMacro("CompleteQuest();");
yrest(1000);
he targets Lehman, opens dialog, but didn't accept q
MM says:
"Drücke MACRO: RoMScript ausführen "AcceptQuest();" "
"Drücke MACRO: RoMScript ausführen "CompleteQuest();" "

i'm really stucked with it :(

User avatar
Administrator
Site Admin
Posts: 5329
Joined: Sat Jan 05, 2008 4:21 pm

Re: Compiling Error

#6 Post by Administrator » Sat Oct 23, 2010 9:35 am

Code: Select all

RoMScript("StoreBuyItem(1, " .. inventory:itemTotalCount(203038)/30) .. ")");
inventory:itemTotalCount() is a MicroMacro function so you will not pass it to RoM.

Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Compiling Error

#7 Post by Personalausweis » Sat Oct 23, 2010 9:47 am

ok but can i use it this way?

Code: Select all

local charges = inventory:itemTotalCount(203038)/30
RoMScript("StoreBuyItem(1, charges)");

do you have an idea to solve the problem that he did not accept the quest from Lehman?


€dit:

he takes the quest i added:

Code: Select all

player:target_NPC("Lehman");
sendMacro("OnClick_QuestListButton(1,1)");
yrest(1000);

Herbee
Posts: 4
Joined: Thu Oct 21, 2010 9:41 am

Re: Compiling Error

#8 Post by Herbee » Sat Oct 23, 2010 10:20 am

hey,

Code: Select all

RoMScript("StoreBuyItem(1, charges)");
is crap. You can only call this function with a count of items to buy, if the item u want to buy is stackable, such as potions.

However, if those items were stackable, code would be:

Code: Select all

RoMScript("StoreBuyItem(1," ..  charges .. ");");
If u want to buy 3 items, that aren't stackable, just use the macro several times, i.e. in a loop:

Code: Select all

player:merchant("Lehman"); yrest(2000);
sendMacro("ChoiceOption(1);"); yrest(1000);
while (inventory:itemTotalCount(203038) > 0) do --while having phirius tokens left
  sendMacro("StoreBuyItem(1)"); yrest(1200);  --Buy Charge
  inventory:useItem(203487); yrest(500);     --Use Charge
end;
 sendMacro("CloseWindows();"); 
This should do the trick.

greets, herbee

Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Compiling Error

#9 Post by Personalausweis » Sun Oct 24, 2010 4:08 am

thanks a lot herbee.

its runnig now very good.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest