This is my script i use for "poi oil lever"
oil_lever.lua
Tutorial part:
How do i change the splat to an other type? (e.g. blood)
its simple just edit this
to
you can change the nr to any other type will be usefull for custom scripts
What is wall1 = {x=32801, y=32336, z=11, stackpos=1}?
wall1 is the bridge that will be summoned (i know it should stand something else but i did just copy an old wall summon script)
What is splash = {x=32800, y=32339, z=11, stackpos=1}?
that is where the splat should be in this script you should put it where the lever is located (that is how its working on real tibia) but remmember if you want to make a hard quest you maybe want the splat to be far away from the lever to make it hard for the player/team that is going to enter the area
that is pretty much what i need to tell you if you know anything about lua scripting you can edit the rest by yourself
this script has been tested on TFS 0.3.2 and it did work good (it could be improved)
oil_lever.lua
Code:
function onUse(cid, item, frompos, item2, topos)
wall1 = {x=32801, y=32336, z=11, stackpos=1}
getwall1 = getThingfromPos(wall1)
splash = {x=32800, y=32339, z=11, stackpos=1}
oil = getThingfromPos(splash)
if item.uid == 3040 and item.itemid == 1945 and oil.itemid == 2016 and oil.type == 11 and getwall1.uid == 0 then
doCreateItem(5770,1,wall1)
doSendMagicEffect(splash,13)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 3040 and item.itemid == 1946 and oil.itemid == 2016 and oil.type == 11 and getwall1.uid == 0 then
doTransformItem(item.uid,item.itemid-1)
else
doCreatureSay(cid, "The lever is creaking and rusty.", 19)
end
end
Tutorial part:
How do i change the splat to an other type? (e.g. blood)
its simple just edit this
Code:
oil.type == [B]11[/B]
Code:
oil.type == [B]2[/B]
What is wall1 = {x=32801, y=32336, z=11, stackpos=1}?
wall1 is the bridge that will be summoned (i know it should stand something else but i did just copy an old wall summon script)
What is splash = {x=32800, y=32339, z=11, stackpos=1}?
that is where the splat should be in this script you should put it where the lever is located (that is how its working on real tibia) but remmember if you want to make a hard quest you maybe want the splat to be far away from the lever to make it hard for the player/team that is going to enter the area
that is pretty much what i need to tell you if you know anything about lua scripting you can edit the rest by yourself
this script has been tested on TFS 0.3.2 and it did work good (it could be improved)