Page 1 of 1

Help with Script

Posted: Sun Oct 04, 2015 9:49 pm
by Wannabc5
Whats wrong with this script?


-----------------------------------
-- Zone: Abyssea-La Theine
-- NM: La Theine Liege
-----------------------------------
package.loaded["scripts/zones/Abyssea-La_Theine/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/status");
require("scripts/globals/keyitems");
require("scripts/zones/Abyssea-La_Theine/TextIDs");

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

function onMobDeath(mob,killer)
if (killer:hasKeyItem(PELLUCID_FLY_EYE) == false) then
killer:addKeyItem(PELLUCID_FLY_EYE);
killer:messageSpecial(KEYITEM_OBTAINED, PELLUCID_FLY_EYE);
killer:addCurrency("Cruor",500);
killer:messageSpecial(CRUOR_OBTAINED, 500);

end
end;

Re: Help with Script

Posted: Mon Oct 05, 2015 12:52 am
by tabitaru
!

Re: Help with Script

Posted: Mon Oct 05, 2015 7:59 am
by Wannabc5
I have. That script works with all of my other Abyssea mob but this on is problematic for some reason.

Re: Help with Script

Posted: Mon Oct 05, 2015 10:30 am
by tabitaru
!

Re: Help with Script

Posted: Mon Oct 05, 2015 11:09 am
by Wannabc5
It's not giving me the key item when the mob is killed.

Re: Help with Script

Posted: Mon Oct 05, 2015 2:59 pm
by shadowuz
did you make sure you didn't alrdy have ki from testing cara

Code: Select all

-----------------------------------
-- Zone: Abyssea-La Theine
--  NM:  La Theine Liege
-----------------------------------
package.loaded["scripts/zones/Abyssea-La_Theine/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/status");
require("scripts/globals/keyitems");
require("scripts/zones/Abyssea-La_Theine/TextIDs");

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

function onMobDeath(mob,killer)
    if (killer:hasKeyItem(PELLUCID_FLY_EYE) == false) then
        killer:addKeyItem(PELLUCID_FLY_EYE);
        killer:messageSpecial(KEYITEM_OBTAINED, PELLUCID_FLY_EYE);
		killer:addCurrency("Cruor",500);
		killer:messageSpecial(CRUOR_OBTAINED, 500);
		
    end
end; 
other reason could be its not in your keyitem.lua

Code: Select all

 PELLUCID_FLY_EYE                         = 1485; 

Re: Help with Script

Posted: Mon Oct 05, 2015 5:27 pm
by Wannabc5
Key item isn't in my Abyssea key items and it's in the my key item.lua

Re: Help with Script

Posted: Tue Oct 06, 2015 2:50 am
by tabitaru
!

Re: Help with Script

Posted: Tue Oct 06, 2015 3:45 pm
by tabitaru
!

Re: Help with Script

Posted: Tue Oct 06, 2015 8:52 pm
by TeoTwawki
Look for an error message in your console log right when the code should be executing. And remember just about everything is case sensitive.