brain lapse here, lua function hasitem()

Discussions of the design and development of in-game content.

Moderator: Team Members

Post Reply
User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

brain lapse here, lua function hasitem()

Post by Ememjr » Mon Sep 11, 2017 6:32 am

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

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: brain lapse here, lua function hasitem()

Post by Jabantiz » Mon Sep 11, 2017 3:59 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests