Apoccalypse
New Member
- Joined
- Apr 15, 2017
- Messages
- 114
- Solutions
- 2
- Reaction score
- 4
Hello Guys,
I have the following script:
It works fine but I want to rewrite that script a little.
Presently when I place an itemid=2159 at piece1pos the item disapears after I use a lever (id9825) and the boss shows up.
Although instead of using the lever I want to make the item=2159 to disapear and the boss show up as a result of the termination of the specific words by the player.
I know that I have to use function onSay but I can not deal with it.
I have also another problem.
The required amount of the item (2159) to run the script is currently one.Is it a way to increase it up to 100?
I thought that if I change stackpos=1 to stackpos=100 it will solve my problem but unfortunately it doesn't work that way
If anyone could help that would be great
I have the following script:
local level = 400
function onUse(cid, item, frompos, item2, topos)
piece1pos = {x=789, y=700, z=6, stackpos=1}
getpiece1 = getThingfromPos(piece1pos)
if item.uid == 8223 and item.itemid == 9825 and getpiece1.itemid == 2159 then
doRemoveItem(getpiece1.uid,1)
TheDavyJonespos = {x=789, y=704, z=6}
doSummonCreature("The Davy Jones", TheDavyJonespos)
doSendMagicEffect(TheDavyJonespos,6)
end
return 1
end
function onUse(cid, item, frompos, item2, topos)
piece1pos = {x=789, y=700, z=6, stackpos=1}
getpiece1 = getThingfromPos(piece1pos)
if item.uid == 8223 and item.itemid == 9825 and getpiece1.itemid == 2159 then
doRemoveItem(getpiece1.uid,1)
TheDavyJonespos = {x=789, y=704, z=6}
doSummonCreature("The Davy Jones", TheDavyJonespos)
doSendMagicEffect(TheDavyJonespos,6)
end
return 1
end
It works fine but I want to rewrite that script a little.
Presently when I place an itemid=2159 at piece1pos the item disapears after I use a lever (id9825) and the boss shows up.
Although instead of using the lever I want to make the item=2159 to disapear and the boss show up as a result of the termination of the specific words by the player.
I know that I have to use function onSay but I can not deal with it.
I have also another problem.
The required amount of the item (2159) to run the script is currently one.Is it a way to increase it up to 100?
piece1pos = {x=789, y=700, z=6, stackpos=1}
I thought that if I change stackpos=1 to stackpos=100 it will solve my problem but unfortunately it doesn't work that way
If anyone could help that would be great