Page 1 of 1

brain lapse here, lua function hasitem()

Posted: Mon Sep 11, 2017 6:32 am
by Ememjr
i have the full grasp of hasitem() in quest scripts
but
i i am forgetting how in the lua quest script to check if i dont have an item
i would like to change some of the quests that gives you a quest item that is required to progress the quest ie. a usable item
then removes it when finshed with it, to give you another if you dont have it and you are on the quest step that requires it.

i want to do a id not hasitem() then give me another,

of course this would be only for specific quests where that item is no available anywhere else, but breaks the quest as not completeable if you dont have the item

Re: brain lapse here, lua function hasitem()

Posted: Mon Sep 11, 2017 3:59 pm
by Jabantiz
On live you can usually go back to the npc and they will offer you another item if you lost the first and that would just be a simple

Code: Select all

if not HasItem() then
-- give item
end