how can i? need coding
how can i? need coding
how can i repeat a waypoint when the rom system gives "You did not gain any items"
i am running a waypoint file to collect quest items but sometimes i get interuppted by combat and it says "You did not gain any items". What code can I write to recognize it saying You did not gain any items and then repeat the waypoint?
I need this b/c sometimes it will skip the waypoint and move to the next without collecting the item after killing the mob.
i am running a waypoint file to collect quest items but sometimes i get interuppted by combat and it says "You did not gain any items". What code can I write to recognize it saying You did not gain any items and then repeat the waypoint?
I need this b/c sometimes it will skip the waypoint and move to the next without collecting the item after killing the mob.
Re: how can i? need coding
Have you tried the following code?
By item name
By item name
or by item IDplayer:target_Object("Insert Item Name", nil, nil, true);
player:target_Object(######, nil, nil, true);
Scout/Knight/Rogue 70/66/66
Re: how can i? need coding
no i just use
player:target_Object("Edible Wild Plant");sendMacro("ChoiceOption(1);");
Re: how can i? need coding
Romplayer wrote:no i just useplayer:target_Object("Edible Wild Plant");sendMacro("ChoiceOption(1);");
Use this instead:
Code: Select all
player:target_Object("Edible Wild Plant", nil, nil, true);
From the wiki:
player:target_Object(_objname, _waittime, _harvestall, _donotignore, _evalFunc);
This will target an object similarly to target_NPC but this function has more options to cater for the different behaviors of different objects.
_objname = name or id of object to target. Accepts partial names or a table of names and ids.(Required)
_waittime = time to wait if the object takes time to action, in ms. By default will wait until casting bar is gone. Only really necessary if you want it to wait longer than it takes to collect.(Optional)
_harvestall = true if you wish to collect all in the immediate area. Only use if the object disappears once collected. (Default is false ie. opens/collects only once)
_donotignore = If false, will target an object once then move onto the next object. If true, will continue to target object until it disappears or moves away. Only set to true if the target disappears or moves away or you might end up in an infinite loop.(if _harvestall = true then the default is false, else it is true).
_evalFunc = A user created custom function that can be used to evaluate whether objects are valid or not. Should except an address as an argument and return true or false. (Optional)
Scout/Knight/Rogue 70/66/66
Re: how can i? need coding
ok i used
I need something that can recognize "You did not gain any items" and then repeat the WP
but it still skips if i am interrupted by combatplayer:target_Object("Edible Wild Plant", nil, nil, true);
I need something that can recognize "You did not gain any items" and then repeat the WP
Re: how can i? need coding
maybe the "You did not gain any items" is an registered event? or can i write something that reads the general log for that string?
Re: how can i? need coding
I honestly do not know. I've never messed around with in game event code. I also do a WP for this daily. I use the following code in my <onLoad>:
Pretty basic coding compared to what some people do here, but it does the trick. Just put "getewp()" at the points where the plant is. Just remember to set WPtype back to NORMAL somewhere if you also collect the fox meat in the same WP file.
Code: Select all
function getewp()
player:update()
if wolf then
player:target(104724)
player:update()
player:fight()
end
if condor then
player:target(104725)
player:update()
player:fight()
end
if (inventory:itemTotalCount(208547) ~= 10) then
player:target_Object("Edible Wild Plant", nil, nil, true);
else
__WPL:setForcedWaypointType("RUN")
end
end
Last edited by kanta on Fri Jan 13, 2012 11:46 pm, edited 2 times in total.
Scout/Knight/Rogue 70/66/66
Re: how can i? need coding
wouldn't it be easier to check if you received the item?
So do a count of item in inventory.
or if it is a quest and only need that item to complete quest then you can check if quest has been completed.
or check if the object itself has dissappeared?
So do a count of item in inventory.
or if it is a quest and only need that item to complete quest then you can check if quest has been completed.
or check if the object itself has dissappeared?
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: how can i? need coding
I know which one this is for. The daily quest "If I Persevere". He needs both wild fox meat and edible wild plants.
Scout/Knight/Rogue 70/66/66
Re: how can i? need coding
I'd do an inventory update check but it seems that it is always lagged or slowed when it popups onscreen that u gained a quest item. Meaning I gain +1 of quest item but it waits till the notification fades away. By then it is too late having gained another item or moved on to a next waypoint.
Who is online
Users browsing this forum: Google [Bot] and 52 guests