how to check whether a given questID exists in a char?
Moderator: Moderators
-
- Developers
- Posts: 308
- Joined: 06 Jul 2012, 13:44
- Noob?: No
how to check whether a given questID exists in a char?
my idea was to iterate through the quest list in an array, and check it by ID, but how do I get the quest list into an array, so that I can use it in a macro?
-
- Human
- Posts: 29
- Joined: 13 Jul 2012, 06:32
- Noob?: Yes
Re: how to check whether a given questID exists in a char?
Im not sure What exactly u need and for what ,, but in most servers the command " @quest " gives the quest ids and all other info
-
- Been there done that!
- Posts: 118
- Joined: 19 Sep 2011, 07:30
- Noob?: Yes
Re: how to check whether a given questID exists in a char?
using command quest list in console??ever_boy_ wrote:my idea was to iterate through the quest list in an array, and check it by ID, but how do I get the quest list into an array, so that I can use it in a macro?
$::questID maybe


Sorry, my english is very bad !
-
- Developers
- Posts: 308
- Joined: 06 Jul 2012, 13:44
- Noob?: No
Re: how to check whether a given questID exists in a char?
brilliant. just tell me how can I store the quests's IDs inside an array using quest list command.rocknroll wrote:using command quest list in console??
nevermind it, I was just being ironic.
let's say I wanted to iterate through chars' ID in my 'ml' list. I would do that:
[codedo eval foreach (@{$::playersList->getItems()}) {next if ( ...[/code]
now I don't know how to do this, looping through the quests' ID, instead of player's ID.
-
- Moderators
- Posts: 208
- Joined: 01 Feb 2010, 17:37
- Noob?: No
- Location: Brazil - MG
Re: how to check whether a given questID exists in a char?
Do you really want to loop through the list of quests or you just want info about one of them?
-
- Developers
- Posts: 308
- Joined: 06 Jul 2012, 13:44
- Noob?: No
Re: how to check whether a given questID exists in a char?
I wanna check whether or not a given quest exists in a char's quest list. How do I do that? By checking a given quest ID (say, 1111) against all ID's in a char's quest list.
The reason for that is that I want to check if the desired quest is active or inactive, but the eval fails when then quest Id doesn't exist.
The reason for that is that I want to check if the desired quest is active or inactive, but the eval fails when then quest Id doesn't exist.