Page 1 of 1

How to add key items to mob_droplist

Posted: Mon Sep 14, 2015 11:46 am
by Wannabc5
How do I add key items to mob_droplist?

Re: How to add key items to mob_droplist

Posted: Mon Sep 14, 2015 12:37 pm
by demolish
mob_droplist is for items
if you wanted to add keyitems you'd have to do it in the mob's script in onMobDeath

Re: How to add key items to mob_droplist

Posted: Tue Sep 15, 2015 9:02 am
by Wannabc5
Is this correct?



-----------------------------------
-- onMobDeath
-----------------------------------

function onMobDeath(mob,killer)

if (killer:hasKeyItem(WARPED_GIGAS_ARMBAND) == false) then
killer:addKeyItem(WARPED_GIGAS_ARMBAND);
killer:messageSpecial(WARPED_GIGAS_ARMBAND);
end

end;

Re: How to add key items to mob_droplist

Posted: Tue Sep 15, 2015 11:00 am
by demolish
almost, make sure to require the globals where the vars are defined
oh and messsageSpecial takes more than one param: message/text id and param (e.g. messageSpecial(KEYITEM_OBTAINED, KEYITEM_ID)
(keyitems are scripts/globals/keyitems, messages/text ids are scripts/zones/ZONE_NAME/TextIDs, other shit is usually scripts/globals/status)

oh and indent cause non-indented code is ewww