Jump to content

Quest profile :use Item on my self


fanmeng123

Recommended Posts

use runcode, (not tested)

Lua.LuaDoString("ClearTarget();");
Thread.sleep(25);
ItemsManager.UseItem(itemId);
Usefuls.WaitIsCasting();

 

Edited by The Smokie.
Link to comment
Share on other sites

if you want to add a if statement you can. sorry i was half dead when i wrote this code. here one thats not popo.]

if (!Quest.HasQuest(Quest ID) && !ItemsManager.HasItemById(Item ID))
{
Lua.LuaDoString("ClearTarget();");
Thread.sleep(25);
ItemsManager.UseItem(itemId);
Usefuls.WaitIsCasting();
}

Really you're choice.

or 
  
if (!Quest.HasQuest(Quest ID))
{
 
  Lua.LuaDoString("ClearTarget();");
 
  If !ItemsManager.HasItemById(Item ID))
 {
   ItemsManager.UseItem(item Id);
   Usefuls.WaitIsCasting();
 }
}
   

 

Link to comment
Share on other sites

7 hours ago, The Smokie. said:

if you want to add a if statement you can. sorry i was half dead when i wrote this code. here one thats not popo.]


if (!Quest.HasQuest(Quest ID) && !ItemsManager.HasItemById(Item ID))
{
Lua.LuaDoString("ClearTarget();");
Thread.sleep(25);
ItemsManager.UseItem(itemId);
Usefuls.WaitIsCasting();
}

Really you're choice.

or 
  
if (!Quest.HasQuest(Quest ID))
{
 
  Lua.LuaDoString("ClearTarget();");
 
  If !ItemsManager.HasItemById(Item ID))
 {
   ItemsManager.UseItem(item Id);
   Usefuls.WaitIsCasting();
 }
}
   

 

Hi

Thank you so much. I'll try it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...