D1mAnn
Posts: 37 Joined: Mon Jul 04, 2011 4:56 am
#1
Post
by D1mAnn » Mon Jul 04, 2011 5:08 am
Hi guys, please help to write a script. I have next code
Code: Select all
RoMScript('SendChatMessage("Send me Random Fusion Stone", "WHISPER", 0, "name_of_the_character_who_sends_letters");'); yrest(15000);
while not RoMScript("UnitExists('party1')") do
sendMacro('InviteByName("name of the character who sends letters")');
yrest(3000);
end
yrest(5000);
local cnt = 0;
local cnt2 = 0;
local cnt3 = 0;
local retry_count = 0;
while(1 > cnt)and(9 > cnt2)and(20000 > cnt3)and(retry_count<3)do
player:target_NPC("Почтовый ящик Острова Эльфов",1500); sendMacro("ChoiceOption(1);"); yrest(2500);
UMM_TakeMail (); yrest(1000);
sendMacro("CloseWindows()"); yrest(100); inventory:update();
this is script use on first bot, on second bot need script which will be mailing to the player who wrote the last
The problem is that the name of the player receiving the letter is always changing
D1mAnn
Posts: 37 Joined: Mon Jul 04, 2011 4:56 am
#3
Post
by D1mAnn » Mon Jul 04, 2011 5:53 am
Code: Select all
EventMonitorStart("Send me Random Fusion Stone","CHAT_MSG_WHISPER",",,,")
local time, moretocome, msg = EventMonitorCheck("Send me Random Fusion Stone","1")
if string.find(msg, "string to match") then
player:target_NPC("Почтовый ящик",1000); sendMacro("ChoiceOption(1);"); yrest(1000);
inventory:update();
UMM_SendByNameOrId ("?????", "Random Fusion Stone") ;
end
EventMonitorStop("Send me Random Fusion Stone")
Ok, I have a event, how do I know which name to send mail
D1mAnn
Posts: 37 Joined: Mon Jul 04, 2011 4:56 am
#4
Post
by D1mAnn » Mon Jul 04, 2011 6:03 am
in my opinion you do not quite understand what I need. Ok this is full script runing on bot1
Code: Select all
<waypoints type="TRAVEL">
<onLoad>
repeat zoneid = RoMScript("GetZoneID()") until zoneid
if zoneid ~= 12 then error("\a\a\a\You are too far from Elven Island.") end
</onLoad>
<!-- # 1 --><waypoint x="31954" z="3278" tag="Start">
repeat zoneid = RoMScript("GetZoneID()") until zoneid
if zoneid ~= 12 then error("\a\a\a\You are too far from Elven Island.") end
</waypoint>
<!-- # 2 --><waypoint x="31925" z="3391"> </waypoint>
<!-- # 3 --><waypoint x="31890" z="3511"> </waypoint>
<!-- # 4 --><waypoint x="31844" z="3555"> </waypoint>
<!-- # 5 --><waypoint x="31797" z="3597">
RoMScript('SendChatMessage("Send me Random Fusion Stone", "WHISPER", 0, "Pushit");'); yrest(1000);
RoMScript('SendChatMessage("Send me Excellent Belt", "WHISPER", 0, "Pushit");'); yrest(15000);
while not RoMScript("UnitExists('party1')") do
sendMacro('InviteByName("Pushit")');
yrest(3000);
end
yrest(5000);
local cnt = 0;
local cnt2 = 0;
local cnt3 = 0;
local retry_count = 0;
while(1 > cnt)and(9 > cnt2)and(20000 > cnt3)and(retry_count<3)do
player:target_NPC("Почтовый ящик Острова Эльфов",1500); sendMacro("ChoiceOption(1);"); yrest(2500);
UMM_TakeMail (); yrest(1000);
sendMacro("CloseWindows()"); yrest(100); inventory:update();
cnt = inventory:getItemCount(203276);
cnt2 = inventory:getItemCount(227502);
cnt3 = inventory:getItemCount(202999);
retry_count = retry_count + 1;
end
if 1 > inventory:itemTotalCount(203276) then
error("\a\a\a\We didn't receive item.");
end
if 9 > inventory:itemTotalCount(227502) then
error("\a\a\a\We didn't receive item.");
end
if 9 > inventory:itemTotalCount(202999) then
error("\a\a\a\We didn't receive item.");
end
inventory:useItem(203276); yrest(1000);
</waypoint>
<!-- # 6 --><waypoint x="31998" z="3298"></waypoint>
<!-- # 7 --><waypoint x="32161" z="3358"></waypoint>
<!-- # 8 --><waypoint x="32289" z="3346" tag="Restart">
player:target_NPC("Распорядитель ежедневных заданий");player:rest(2);
RoMScript("SpeakFrame_AcceptQuest();");player:rest(1);
player:target_NPC("Распорядитель ежедневных заданий");player:rest(2);
RoMScript("SpeakFrame_CompleteQuest();");player:rest(1);
changeProfileOption("MAX_TARGET_DIST", 10);
-- Take Giftbags
inventory:useItem(201843);player:rest(4); ---1
inventory:update();
inventory:useItem(201844);player:rest(4); ---2
inventory:update();
</waypoint>
<!-- # 10 --><waypoint x="32288" z="3340"></waypoint>
<!-- # 11 --><waypoint x="32197" z="3362"></waypoint>
<!-- # 12 --><waypoint x="32126" z="3437"></waypoint>
<!-- # 13 --><waypoint x="32016" z="3590"></waypoint>
<!-- # 14 --><waypoint x="31959" z="3726"></waypoint>
<!-- # 15 --><waypoint x="31927" z="3836"></waypoint>
<!-- # 16 --><waypoint x="31899" z="3951"></waypoint>
<!-- # 17 --><waypoint x="31891" z="4086"></waypoint>
<!-- # 18 --><waypoint x="31880" z="4215">inventory:useItem(207051); yrest(1000);</waypoint>
<!-- # 19 --><waypoint x="31889" z="4381"></waypoint>
<!-- # 20 --><waypoint x="31896" z="4530"></waypoint>
<!-- Elf_dailies -->
<!-- # 21 --><waypoint x="31851" z="4592">
repeat
repeat
player:target_NPC("Блинсик"); yrest(200)
until RoMScript("SpeakFrame:IsVisible()")
sendMacro("AcceptQuest()"); yrest(1000);
until getQuestStatus("Помоги им расти") ~= "not accepted"
</waypoint>
<!-- # 22 --><waypoint x="31851" z="4592" tag="Main">
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 9 == dailyQuestCount then
printf (player.Name.."_dailys are completed...");
__WPL:setWaypointIndex(__WPL:findWaypointTag("escape"));
else
printf(player.Name.."_\145\164\165\171\160\173\174 "..dailyQuestCount.." \164\165\169\171\168\170\174\162.");
end
</waypoint>
queststate = getQuestStatus("Помоги им расти")
if queststate == "not accepted" == true then
__WPL:setWaypointIndex(__WPL:findWaypointTag("accepted"));
elseif queststate == "complete" and GetReward == true then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Hand in quest"));
else
<!-- # 23 --><waypoint x="31858" z="4642"></waypoint>
<!-- # 24 --><waypoint x="31796" z="4887"></waypoint>
<!-- # 25 --><waypoint x="31422" z="5713" tag="Harvest Crystal">
player:target_Object(112976); yrest(500);
queststate = getQuestStatus("Помоги им расти")
if queststate == "incomplete" == true then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Harvest Crystal"));
elseif queststate == "complete" and GetReward then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Hand in quest"));
end
</waypoint>
end
<!-- # 26 --><waypoint x="31797" z="4875" tag="Hand in quest"></waypoint>
<!-- # 27 --><waypoint x="31861" z="4690"></waypoint>
<!-- # 28 --><waypoint x="31860" z="4649">
repeat
repeat
player:target_NPC("Блинсик"); yrest(200)
until RoMScript("SpeakFrame:IsVisible()")
sendMacro("CompleteQuest()"); yrest(1500);
until getQuestStatus("Помоги им расти") ~= "complete"
</waypoint>
<!-- # 29 --><waypoint x="31851" z="4592" tag="accepted">
repeat
repeat
player:target_NPC("Блинсик"); yrest(200)
until RoMScript("SpeakFrame:IsVisible()")
sendMacro("AcceptQuest()"); yrest(1000);
until getQuestStatus("Помоги им расти") ~= "not accepted"
__WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
</waypoint>
<!-- Elf_escape -->
<!-- # 30 --><waypoint x="31896" z="4519" tag="escape">
inventory:update();
if 90 > inventory:itemTotalCount(203038) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
end
</waypoint>
<!-- # 31 --><waypoint x="32041" z="4450"></waypoint>
<!-- # 32 --><waypoint x="32140" z="4411"></waypoint>
<!-- # 33 --><waypoint x="32153" z="4427"></waypoint>
<!-- # 34 --><waypoint x="32246" z="4365"></waypoint>
<!-- # 35 --><waypoint x="32282" z="4250">
player:mount();rest(3);
</waypoint>
<!-- # 36 --><waypoint x="32335" z="4128"></waypoint>
<!-- # 37 --><waypoint x="32261" z="3976"></waypoint>
<!-- # 38 --><waypoint x="32182" z="3784"></waypoint>
<!-- # 39 --><waypoint x="32181" z="3645"></waypoint>
<!-- # 40 --><waypoint x="32178" z="3484"></waypoint>
<!-- # 41 --><waypoint x="32177" z="3421"></waypoint>
<!-- # 42 --><waypoint x="32251" z="3316">
inventory:update();
if 90 > inventory:itemTotalCount(203038) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Restart"));
end
</waypoint>
<!-- # 43 --><waypoint x="32234" z="3220"></waypoint>
<!-- # 44 --><waypoint x="32119" z="3168"></waypoint>
<!-- # 45 --><waypoint x="31991" z="3138"></waypoint>
<!-- # 46 --><waypoint x="31801" z="3151"></waypoint>
<!-- # 47 --><waypoint x="31746" z="3040"></waypoint>
<!-- # 48 --><waypoint x="31720" z="2951"></waypoint>
<!-- # 49 --><waypoint x="31608" z="2696"></waypoint>
<!-- # 50 --><waypoint x="31419" z="2384"></waypoint>
<!-- # 51 --><waypoint x="31336" z="2269"></waypoint>
<!-- # 52 --><waypoint x="31120" z="2134"></waypoint>
<!-- # 53 --><waypoint x="30780" z="2147"></waypoint>
<!-- # 54 --><waypoint x="30639" z="2154"></waypoint>
<!-- # 55 --><waypoint x="30422" z="2170"></waypoint>
<!-- # 56 --><waypoint x="30263" z="2259"></waypoint>
<!-- # 57 --><waypoint x="30056" z="2399"></waypoint>
<!-- # 58 --><waypoint x="29934" z="2542"></waypoint>
<!-- # 59 --><waypoint x="29817" z="2674"></waypoint>
<!-- # 60 --><waypoint x="29631" z="2883"></waypoint>
<!-- # 61 --><waypoint x="29557" z="3070"></waypoint>
<!-- # 62 --><waypoint x="29513" z="3240"></waypoint>
<!-- # 63 --><waypoint x="29474" z="3373"></waypoint>
<!-- # 64 --><waypoint x="29427" z="3510"></waypoint>
<!-- # 65 --><waypoint x="29350" z="3739"></waypoint>
<!-- # 66 --><waypoint x="29273" z="3969"></waypoint>
<!-- # 67 --><waypoint x="29173" z="4205"></waypoint>
<!-- # 68 --><waypoint x="29071" z="4441"></waypoint>
<!-- # 69 --><waypoint x="28829" z="4631"></waypoint>
<!-- # 70 --><waypoint x="28641" z="4706"></waypoint>
<!-- # 71 --><waypoint x="28382" z="4791"></waypoint>
<!-- # 72 --><waypoint x="28148" z="4518"></waypoint>
<!-- # 73 --><waypoint x="27955" z="4420"></waypoint>
<!-- # 74 --><waypoint x="27842" z="4361"></waypoint>
<!-- # 75 --><waypoint x="27860" z="4254"></waypoint>
<!-- # 76 --><waypoint x="27967" z="4212"></waypoint>
<!-- # 77 --><waypoint x="28176" z="4097"></waypoint>
<!-- # 78 --><waypoint x="28392" z="3981"></waypoint>
<!-- # 79 --><waypoint x="28416" z="3787"></waypoint>
<!-- # 80 --><waypoint x="28439" z="3589"></waypoint>
<!-- # 81 --><waypoint x="28451" z="3450"></waypoint>
<!-- # 82 --><waypoint x="28324" z="3433"></waypoint>
<!-- # 83 --><waypoint x="28189" z="3432"></waypoint>
<!-- # 84 --><waypoint x="28001" z="3455"></waypoint>
<!-- # 85 --><waypoint x="27937" z="3427">
player:target_NPC("Сидкло");player:rest(1);
RoMScript("ChoiceOption(1);");
waitForLoadingScreen();
</waypoint>
<!-- Varanas -->
<!-- # 86 --><waypoint x="4406" z="-3621"></waypoint>
<!-- # 87 --><waypoint x="4550" z="-3508"></waypoint>
<!-- # 88 --><waypoint x="4755" z="-3529"></waypoint>
<!-- # 89 --><waypoint x="4845" z="-3541"></waypoint>
<!-- # 90 --><waypoint x="4948" z="-3624"></waypoint>
<!-- # 91 --><waypoint x="5095" z="-3735"></waypoint>
<!-- # 92 --><waypoint x="5243" z="-3853"></waypoint>
<!-- # 93 --><waypoint x="5267" z="-3901"></waypoint>
<!-- # 94 --><waypoint x="5294" z="-3934"></waypoint>
<!-- # 95 --><waypoint x="5353" z="-3881"></waypoint>
<!-- # 96 --><waypoint x="5390" z="-3915"></waypoint>
<!-- # 97 --><waypoint x="5419" z="-3948"></waypoint>
<!-- # 98 --><waypoint x="5474" z="-4161"></waypoint>
<!-- # 99 --><waypoint x="5481" z="-4188"></waypoint>
<!-- # 100 --><waypoint x="5528" z="-4378"></waypoint>
<!-- # 101 --><waypoint x="5520" z="-4416" tag="charge">
local cnt = 0;
local retry_count = 0;
while(13 > cnt)and(retry_count<3)do
player:target_NPC("Леман");player:rest(1);
RoMScript("OnClick_QuestListButton(1, 1);");
RoMScript("SpeakFrame_AcceptQuest();");player:rest(1);
player:target_NPC("Леман");player:rest(1);
RoMScript("OnClick_QuestListButton(3, 1);");player:rest(1);
RoMScript("SpeakFrame_CompleteQuest();");player:rest(1);
RoMScript("SpeakFrame_Hide();");
player:target_NPC("Леман");player:rest(1);
RoMScript("ChoiceOption(1);");player:rest(1);
RoMScript("ChoiceOption(1);");player:rest(1);
RoMScript("StoreBuyItem(1);");player:rest(1);
RoMScript("StoreBuyItem(1);");player:rest(1);
RoMScript("StoreBuyItem(1);");player:rest(1);
RoMScript("SpeakFrame_Hide();CloseStore();StoreFrame:Hide();");player:rest(1);
inventory:update();
inventory:useItem(203487); yrest(2000);
inventory:update();
inventory:useItem(203487); yrest(2000);
inventory:update();
inventory:useItem(203487); yrest(2000);
inventory:update();
cnt = RoMScript("GetMagicBoxEnergy()")
retry_count = retry_count + 1;
end
if 13 > cnt then
error("\a\a\a\We didn't receive charges.");
end
</waypoint>
<!-- # 102 --><waypoint x="5517" z="-4385"></waypoint>
<!-- # 103 --><waypoint x="5502" z="-4259"></waypoint>
<!-- # 104 --><waypoint x="5496" z="-4209"></waypoint>
<!-- # 105 --><waypoint x="5472" z="-4072"></waypoint>
<!-- # 106 --><waypoint x="5427" z="-3962"></waypoint>
<!-- # 107 --><waypoint x="5383" z="-3891"></waypoint>
<!-- # 108 --><waypoint x="5307" z="-3934"></waypoint>
<!-- # 109 --><waypoint x="5303" z="-3923">
player:target_NPC("Лив");player:rest(1);
RoMScript("ChoiceOption(2);");
waitForLoadingScreen();
</waypoint>
<waypoint x="4745" z="-1967" tag="Stone">
player:rest(2);
local cnt = 0;
local retry_count = 0;
while(cnt == 0)and(retry_count<3)do
-- Config Save
sendMacro("FusionConfig_OnShow()"); yrest(2000)
sendMacro("FusionConfigFrame_ItemlistEditBox:SetText(TEXT('Превосходный пояс'))"); yrest(2000)
sendMacro("FusionConfig_Save()"); yrest(2000)
-- Open dialogs
if RoMScript("AdvancedMagicBoxFrame ~= nil") then
sendMacro("AdvancedMagicBoxFrame:Show()"); yrest(2000)
else
sendMacro("MagicBoxFrame:Show()"); yrest(2000)
end
sendMacro("FusionFrame:Show()"); yrest(2000)
-- Set number to make
sendMacro("FusionFrameFusionNumberEditBoxFusionAndItem:SetText('9')"); yrest(1000)
sendMacro("FusionFrameFusionNumberEditBox5:SetText('3')"); yrest(1000)
sendMacro("FusionFrameFusionNumberEditBox6:SetText('1')"); yrest(2000)
-- Do
sendMacro("Fusion_QueueManastones(FusionFrame_Do)");
repeat yrest(2000) until RoMScript("Fusion.LastGrad")==0
-- close
yrest(2000)
if RoMScript("AdvancedMagicBoxFrame ~= nil") then
sendMacro("AdvancedMagicBoxFrame:Hide()"); yrest(2000)
else
sendMacro("MagicBoxFrame:Hide()"); yrest(2000)
end
inventory:update();
cnt = inventory:getItemCount(202845);
retry_count = retry_count + 1;
end
if 1 > cnt then
error("\a\a\a\We didn't receive Stone.");
end
</waypoint>
<!-- # 110 --><waypoint x="4862" z="-1982"> </waypoint>
<!-- # 111 --><waypoint x="4983" z="-2007"> </waypoint>
<!-- # 112 --><waypoint x="5134" z="-2117"> </waypoint>
<!-- # 113 --><waypoint x="5218" z="-2200">
-- Send Mana Stone and Gold
player:target_NPC("Почтовый ящик",1000); sendMacro("ChoiceOption(1);"); yrest(1000);
inventory:update();
UMM_SendByNameOrId ("Pushit", "Шар опыта: 10 000 очков") ;
UMM_SendByNameOrId ("Pushit", "Камень маны ур. 6");
UMM_SendMoney ("Pushit", "All");
sendMacro("CloseWindows()"); yrest(100);
sendMacro("LeaveParty();");
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();");
waitForLoadingScreen();
player:update();
__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"));
</waypoint>
</waypoints>
I want to fully automate the process
I need script for send stone and belt for second bot
lisa
Posts: 8332 Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia
#5
Post
by lisa » Mon Jul 04, 2011 6:18 am
I notice you seem to always invite the other character to party, if that is the case then you can simply get it's name with this function
GetPartyMemberName(partyslotnumber) -- partyslotnumber = 1-5
Code: Select all
party1 = GetPartyMemberName(1)
UMM_SendByNameOrId (party1, "Шар опыта: 10 000 очков") ;
UMM_SendByNameOrId (party1, "Камень маны ур. 6");
UMM_SendMoney (party1, "All");
D1mAnn
Posts: 37 Joined: Mon Jul 04, 2011 4:56 am
#6
Post
by D1mAnn » Mon Jul 04, 2011 6:26 am
hmm great, but is party leader
GetPartyLeaderName(); ?
rock5
Posts: 12173 Joined: Tue Jan 05, 2010 3:30 am
Location: Australia
#7
Post
by rock5 » Mon Jul 04, 2011 6:39 am
Code: Select all
local time, moretocome, msg = EventMonitorCheck("Send me Random Fusion Stone","1")This only gets the first argument of the event which is the message. The 4th argument is the sender so you can use this.
Code: Select all
local time, moretocome, msg, sender = EventMonitorCheck("Send me Random Fusion Stone","1,4")Then you can check the sender and send to that sender.
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.”
lisa
Posts: 8332 Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia
#8
Post
by lisa » Mon Jul 04, 2011 7:11 am
D1mAnn wrote: hmm great, but is party leader
GetPartyLeaderName(); ?
when you look at the player icons on the left, player is always top, then they go in order 1-5 down from there.
So if only 2 characters in party the other character will always be party1 regardless of who is the leader.
So bot2 is going to send the belts and stones, so it will be the same code but items you send will be different.
D1mAnn
Posts: 37 Joined: Mon Jul 04, 2011 4:56 am
#9
Post
by D1mAnn » Mon Jul 04, 2011 9:11 am
aaaa I don't know how use this function
Code: Select all
<waypoints>
<waypoint x="2254" z="31899" y="61" tag = "start">
EventMonitorStart("Send me Random Fusion Stone","CHAT_MSG_WHISPER","party1");
local time, moretocome, msg = EventMonitorCheck("Send me Random Fusion Stone","1");
if string.find(msg, "string to match") then
player:target_NPC("Почтовый ящик",1000); yrest(1000);
inventory:update();
party1 = GetPartyMemberName(1);
UMM_SendByNameOrId ("party1", "Random Fusion Stone");
EventMonitorStop("Send me Random Fusion Stone")
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
</waypoint>
</waypoints>
lisa
Posts: 8332 Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia
#10
Post
by lisa » Mon Jul 04, 2011 9:20 am
you have
Code: Select all
UMM_SendByNameOrId ("party1", "Random Fusion Stone");
with "" around party1
need this
Code: Select all
UMM_SendByNameOrId (party1, "Random Fusion Stone");
Also for this I don't think you need to monitor events
Try this code
Code: Select all
<waypoint x="2254" z="31899" y="61" tag = "start">
player:target_NPC("Почтовый ящик",1000); yrest(1000);
inventory:update();
party1 = GetPartyMemberName(1);
UMM_SendByNameOrId (party1, "Random Fusion Stone");
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
</waypoint>
D1mAnn
Posts: 37 Joined: Mon Jul 04, 2011 4:56 am
#11
Post
by D1mAnn » Mon Jul 04, 2011 9:31 am
this script send mail permanently, I needed that after receiving a private message
rock5
Posts: 12173 Joined: Tue Jan 05, 2010 3:30 am
Location: Australia
#12
Post
by rock5 » Mon Jul 04, 2011 9:53 am
Try this.
Code: Select all
<waypoints>
<waypoint x="2254" z="31899" y="61" >
EventMonitorStart("Send me Random Fusion Stone","CHAT_MSG_WHISPER");
repeat
local time, moretocome, msg, sender = EventMonitorCheck("Send me Random Fusion Stone","1,4");
local party1 = GetPartyMemberName(1);
if msg and (party1 == sender) then
player:target_NPC("Почтовый ящик",1000); yrest(1000);
inventory:update();
UMM_SendByNameOrId (party1, "Random Fusion Stone");
end
until false
</waypoint>
</waypoints>
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.”
lisa
Posts: 8332 Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia
#13
Post
by lisa » Mon Jul 04, 2011 10:06 am
Ahh I think I am begining to understand, sorry I must be a little tired.
I went back through original code you posted, I am guessing you want a stone sent when you whisper send stone and a belt sent when you whisper send belt.
What Rock did was of course awesome but just add in a couple things to send the item requested
Code: Select all
<waypoints>
<waypoint x="2254" z="31899" y="61" >
EventMonitorStart("Send me Random Fusion Stone","CHAT_MSG_WHISPER");
repeat
local time, moretocome, msg, sender = EventMonitorCheck("Send me Random Fusion Stone","1,4");
local party1 = GetPartyMemberName(1);
if msg and (party1 == sender) then
if string.find(msg,"Stone") then
player:target_NPC("Почтовый ящик",1000); yrest(1000);
inventory:update();
UMM_SendByNameOrId (party1, "Random Fusion Stone");
end
if string.find(msg,"Belt") then
player:target_NPC("Почтовый ящик",1000); yrest(1000);
inventory:update();
UMM_SendByNameOrId (party1, "Excellent Belt");
end
end
until moretocome == false
</waypoint>
</waypoints>
D1mAnn
Posts: 37 Joined: Mon Jul 04, 2011 4:56 am
#14
Post
by D1mAnn » Mon Jul 04, 2011 10:47 am
great thx guys
D1mAnn
Posts: 37 Joined: Mon Jul 04, 2011 4:56 am
#15
Post
by D1mAnn » Mon Jul 04, 2011 10:55 am
One more question, how to register the number sent by things?
rock5
Posts: 12173 Joined: Tue Jan 05, 2010 3:30 am
Location: Australia
#16
Post
by rock5 » Mon Jul 04, 2011 11:23 am
lisa wrote: until moretocome == false
If you use that it will restart the waypoint and restart the monitor potentially errasing messages. Stick with
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.”