I've been trying to script a lot of the usable items not in there already and they seem to work with one catch I have to use an item before hand like a potion / antacid / food then they will activate. Otherwise I go to use an item the casting/using bar box pops up for a split second then does nothing. If I use one of my other items first all works fine. Here's 2 examples of the scripts; Any ideas of what the problem could be?
The Server window has no errors this is an example of what I get when trying to use an item and it won't use.
Using Kazham Earring 5x with no luck - scripted exactly like Duchy Earring
parse: 037 : 1443 1442 0A from user Compmike
parse: 037 : 144A 1449 0A from user Compmike
parse: 037 : 144F 144E 0A from user Compmike
parse: 037 : 1458 1457 0A from user Compmike
parse: 037 : 145E 145D 0A from user Compmike
Then use antacid
parse: 037 : 16A0 16F9 0A from user Compmike
Then use Kazham Earring and it works
parse: 037 : 17A9 17A8 0A from user Compmike
parse: 00D : 17BF 17BE 04 from user Compmike
CZone:: Upper_Jueno DecreaseZoneCounter <0> Compmike etc etc..
-----------------------------------------
-- ID: 16042
-- Item: Duchy Earring
-- Enchantment: "Teleport" (Upper Jueno)
-----------------------------------------
require("scripts/globals/settings");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
result = 0;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
target:setPos(5,0,-6,0,244);
end;
-----------------------------------------
-- ID: 10777
-- Item: Caloussu Ring
-- Item Effect: Enchantment: DEF +30
-- Durration : 5 Mins
-----------------------------------------
require("scripts/globals/settings");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
return 0;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
if(target:hasStatusEffect(EFFECT_ENCHANTMENT) == false) then
target:addStatusEffect(EFFECT_ENCHANTMENT,0,0,300,10777);
end;
end;
-----------------------------------------
-- onEffectGain Action
-----------------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_DEF, 30);
end;
-----------------------------------------
-- onEffectLose Action
-----------------------------------------
function onEffectLose(target,effect)
target:delMod(MOD_DEF, 30);
end;
Item usage help please.
Re: Item usage help please.
require("scripts/globals/status");
-
- Posts: 115
- Joined: Wed Jan 23, 2013 11:14 pm
Re: Item usage help please.
great thanks, that worked on the enchantment items, but still nothing on the teleport items
-
- Developer
- Posts: 539
- Joined: Sun Jul 22, 2012 12:17 am
Re: Item usage help please.
Code: Select all
function onItemCheck(target)
result = 0;
end;
Test Server: Hanekawa | Fantasy World: Naito
An occasionally updated list of what works
Bugs reports go here. | Project chat here.
Things I've found, but don't plan to work on.
An occasionally updated list of what works
Bugs reports go here. | Project chat here.
Things I've found, but don't plan to work on.