Re: Syrbal Pass Daily quest - A Little Refreshment
Posted: Mon Jun 24, 2013 8:33 pm
Work`s well!! thak's for your help
MicroMacro home
https://www.solarstrike.net/phpBB3/
This command iterates over to few NPCs and You can't give a drink twice to the same NPC in a very short time.ZZZZZ wrote:Code: Select all
SlashCommand("script TargetNearestFriend()");
Code: Select all
function tenDrinks()
local objectList = CObjectList();
objectList:update();
count=0
for i = 0,objectList:size() do
obj = objectList:getObject(i);
if( obj ~= nil ) then
if( obj.Name == "Exhausted Alliance Warrior") then
player:target(obj)
inventory:useItem("Energy Drink");
count=count+1;
if count>=11 then --11th to be sure ;)
return --break the For loop
end
end
end
end
end
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
function ALRPP()
_npc = {"Kaboy","Masaka Dogtail","Aidamus Schwartz","Kasamir Baschir","Banjen Shaven","Pagee Alon","Will Kanches","Nolis Alon","Lina Lukasz","Layla Lien"}
repeat
queststate = getQuestStatus("Eine kleine Erfrischung","Daily");
for _i = 1,10,1 do
if queststate == "incomplete" then
npc = player:findNearestNameOrId(_npc[_i])
if npc then
player:target(npc.Address)
inventory:useItem("Energietrank");
end
inventory:useItem("Energietrank");
else
end
end
until queststate == "complete"
end
</onload>
<!-- # 1 --><waypoint x="-11776" z="-5642">
player:target_NPC("Lankor Forgia");
AcceptQuestByName("Eine kleine Erfrischung","Daily");
yrest(1000);</waypoint>
<!-- # 2 --><waypoint x="-11776" z="-5642"> ALRPP()
</waypoint>
<!-- # 3 --><waypoint x="-11776" z="-5642">
player:target_NPC("Lankor Forgia");
CompleteQuestByName("Eine kleine Erfrischung","Daily");
</waypoint>
</waypoints>
Code: Select all
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqCount ~= 10 then
player:target_NPC(questGiverId);
AcceptQuestByName(questName,"Daily");
else
inventory:update();
player:update();
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434);
yrest(2000)
player:target_NPC(questGiverId);
AcceptQuestByName(questName,"Daily");
else
player:sleep();
end
end
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-11776" z="-5642">
player:target_NPC("Lankor Forgia");
AcceptQuestByName("A Little Refreshment","Daily");
yrest(10000);</waypoint>
<!-- # 2 --><waypoint x="-11776" z="-5642"> ALRPP()
</waypoint>
<!-- # 3 --><waypoint x="-11776" z="-5642">
player:target_NPC("Lankor Forgia");
CompleteQuestByName("A Little Refreshment","Daily");
</waypoint>
</waypoints>
Code: Select all
-- Function to Change Channels
function ALRPP()
repeat
queststate = getQuestStatus("A Little Refreshment","Daily");
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Masaka Dogtail")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Kasamir Baschir")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Banjen Shaven")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Pagee Alon")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Will Kanchesr")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Nolis Alon")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Lina Lukasz")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Layla Lien")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Aidamus Schwartz")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Kaboy")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
until queststate == "complete"
end
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
questGiverId = 121948 -- Lankor Forgia
questName = 425961 -- A Little Refreshment - Daily
dailyTicket = 202434
</onload>
<!-- # 1 --><waypoint x="-11776" z="-5642">
player:target_NPC(questGiverId);
CompleteQuestByName(questName);
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqCount ~= 10 then
AcceptQuestByName(questName);
else
inventory:update();
player:update();
if inventory:itemTotalCount(dailyTicket) > 0 then
inventory:useItem(dailyTicket);
yrest(2000)
AcceptQuestByName(questName);
else
player:sleep();
end
end
yrest(10000)
</waypoint>
<!-- # 2 --><waypoint x="-11776" z="-5642"> ALRPP()
</waypoint>
</waypoints>
Code: Select all
if queststate == "incomplete" then
Code: Select all
if getQuestStatus(questName) == "incomplete" then
Code: Select all
else
end
Please don't double post. You were correct to start your own topic for an unrelated subject.Sasuke wrote:i need an help....how can i use a macro if i have it in action bar for example in 5 slot?
i have a macro for deliver in automatic energy drink without move...can you help me pls?