Page 1 of 1

Where to find a list of all items and buffs

Posted: Thu Sep 29, 2011 4:19 am
by spawni
At the moment i read lot of code-examples for the bot try the exampels and change them to my needs.
A lot of scripts are about checking if player has a buff - and use a item, if the buff is not already there.

When i see it right, the bot takes item-codes out of the consumabels.xml
But there are not all the possible items in it.
Searching the forum has given me no results - so I need your help - is there a complete standard-list? does every coder do his own entries?

Example of what I am looking for - in the consumables.xml the Items 207203 and 207202 are not listet - script gives an error

Code: Select all

<!-- #  1 --><waypoint x="4755" z="900" type="TRAVEL">	
	if (not player:hasBuff("506687")) then
    inventory:useItem(207203);
    end  

	if (not player:hasBuff("506686")) then
    inventory:useItem(207202);
    end 

	if (not player:hasBuff("506684")) then
    inventory:useItem(207200);
    end 
   </waypoint>

Re: Where to find a list of all items and buffs

Posted: Thu Sep 29, 2011 4:30 am
by lisa
I use this in profile onleavecombat

Code: Select all

	if (not player:hasBuff(506687)) then
		inventory:useItem(207203);
    end  

	if (not player:hasBuff(506686)) then
		inventory:useItem(207202);
    end 

	if (not player:hasBuff(506684)) then
		inventory:useItem(207200);
    end
You don't need to have it listed in consumables database for it to use the item.

At first I thought that when you use " " in the hasBuff might be the issue but I also use it like that in my profile for another buff, so not sure why it is erroring.
It's probably just a capital instead if lowercase being used somewhere, I always test my code in a userfunction that way the error message tells you exactly what is wrong.

Re: Where to find a list of all items and buffs

Posted: Thu Sep 29, 2011 4:48 am
by rock5
The actual error message would be useful too.

Re: Where to find a list of all items and buffs

Posted: Thu Sep 29, 2011 4:51 am
by lisa
WP errors usually just say failed to compile code which doesn't help much. That's why I test in a userfunction first ;)

Re: Where to find a list of all items and buffs

Posted: Thu Sep 29, 2011 10:25 am
by spawni
:oops: I have run the script after a few (other) corrections - and now buffs take place as the should. Thx for the help :)