Help with Script

Post Reply
Wannabc5
Posts: 25
Joined: Tue Feb 24, 2015 8:28 am

Help with Script

Post by Wannabc5 » Sun Oct 04, 2015 9:49 pm

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;

User avatar
tabitaru
Posts: 99
Joined: Sun Apr 12, 2015 4:49 am

Re: Help with Script

Post by tabitaru » Mon Oct 05, 2015 12:52 am

!
Last edited by tabitaru on Sun Oct 18, 2015 6:47 am, edited 1 time in total.

Wannabc5
Posts: 25
Joined: Tue Feb 24, 2015 8:28 am

Re: Help with Script

Post by Wannabc5 » Mon Oct 05, 2015 7:59 am

I have. That script works with all of my other Abyssea mob but this on is problematic for some reason.

User avatar
tabitaru
Posts: 99
Joined: Sun Apr 12, 2015 4:49 am

Re: Help with Script

Post by tabitaru » Mon Oct 05, 2015 10:30 am

!
Last edited by tabitaru on Sun Oct 18, 2015 6:47 am, edited 1 time in total.

Wannabc5
Posts: 25
Joined: Tue Feb 24, 2015 8:28 am

Re: Help with Script

Post by Wannabc5 » Mon Oct 05, 2015 11:09 am

It's not giving me the key item when the mob is killed.

shadowuz
Posts: 26
Joined: Mon May 18, 2015 9:46 am

Re: Help with Script

Post by shadowuz » Mon Oct 05, 2015 2:59 pm

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; 

Wannabc5
Posts: 25
Joined: Tue Feb 24, 2015 8:28 am

Re: Help with Script

Post by Wannabc5 » Mon Oct 05, 2015 5:27 pm

Key item isn't in my Abyssea key items and it's in the my key item.lua

User avatar
tabitaru
Posts: 99
Joined: Sun Apr 12, 2015 4:49 am

Re: Help with Script

Post by tabitaru » Tue Oct 06, 2015 2:50 am

!
Last edited by tabitaru on Sun Oct 18, 2015 6:46 am, edited 1 time in total.

User avatar
tabitaru
Posts: 99
Joined: Sun Apr 12, 2015 4:49 am

Re: Help with Script

Post by tabitaru » Tue Oct 06, 2015 3:45 pm

!
Last edited by tabitaru on Sun Oct 18, 2015 6:46 am, edited 1 time in total.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Help with Script

Post by TeoTwawki » Tue Oct 06, 2015 8:52 pm

Look for an error message in your console log right when the code should be executing. And remember just about everything is case sensitive.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Post Reply