ELEM3NT
LUA Status: Beginner
Okay, can anybody be helpful enough to make me 3 somewhat-easy scripts? Seems pretty simple for other people but for me, I tried to get them to work and it got so frustrating!
Script 1) I right click an item (5951 is itemid) and it removes 4 different walls in 4 different positions, then after 30 seconds, it adds the 3 different walls in 4 different positions back to normal. So its kinda like 4 Walls Removed, 30 Second Interval, then 4 Walls added again, then when I right click the item again it repeats. I got a script that does that but it only removes, doesn't add it again:
Script 2) Set someone's basespeed once right clicked lever? Like right click lever, there basespeed stays at 100.. This is what I have, I just need it to change the basespeed to a certain number so everyone can be same speed(only need the function to put it in my script)
Script 3) Once someone goes through portal, they get kicked and once they log back on, there at the temple. (from the portal's coordinates)
Questions:
1) How do I make it so people can walk through eachother(the tibia function)? Because my event is a maze and I don't people trapping eachother.. There are alot of 1 way paths.
2) How do I make it so people can't use spells in certain areas, like utani hur to speed them up n stuff. Like they've already been exhausted? =O
I know this must sound like alot of work, but please if you can, make these scripts!
Thank you! :thumbup:
Script 1) I right click an item (5951 is itemid) and it removes 4 different walls in 4 different positions, then after 30 seconds, it adds the 3 different walls in 4 different positions back to normal. So its kinda like 4 Walls Removed, 30 Second Interval, then 4 Walls added again, then when I right click the item again it repeats. I got a script that does that but it only removes, doesn't add it again:
LUA:
-- Removing walls with time (By Conde Sapo)
function onUse(cid, item, fromPosition, itemEx, toPosition)
pausa = 0 -- 2 sec.
-- wall positions - don't change stackpos.
wall0pos = {x=1741, y=2051, z=7, stackpos=1}
wall1pos = {x=1743, y=2051, z=7, stackpos=1}
wall2pos = {x=1741, y=2052, z=7, stackpos=1}
wall3pos = {x=1743, y=2052, z=7, stackpos=1}
if item.itemid == 5951 then
wall0 = getThingfromPos(wall0pos)
if wall0.itemid ~= 0 then
doBroadcastMessage("The maze event has started! Find the ham my little rats!", 22)
doRemoveItem(wall0.uid,1)
addEvent(wait1,pausa,wall1pos)
end
else
end
return 1
end
function wait1(wall1pos)
thing = getThingfromPos(wall1pos)
doRemoveItem(thing.uid,1)
addEvent(wait2,pausa,wall2pos)
end
function wait2(wall2pos)
thing = getThingfromPos(wall2pos)
doRemoveItem(thing.uid,1)
addEvent(wait3,pausa,wall3pos)
end
function wait3(wall3pos)
thing = getThingfromPos(wall3pos)
doRemoveItem(thing.uid,1)
end
Script 2) Set someone's basespeed once right clicked lever? Like right click lever, there basespeed stays at 100.. This is what I have, I just need it to change the basespeed to a certain number so everyone can be same speed(only need the function to put it in my script)
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local outfit = { lookType = 21, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0 }
if item.actionid == 6273 then
doSetCreatureOutfit(cid, outfit, 10000*60*1000)
doSendAnimatedText(getPlayerPosition(cid), "HAM!", 78)
>doSetBaseSpeed or however you do it here or something<
doPlayerSendTextMessage(cid,22,"Please here while the event gets started.")
doTeleportThing(cid, {x=1742, y=2052, z=7})
end
end
Script 3) Once someone goes through portal, they get kicked and once they log back on, there at the temple. (from the portal's coordinates)
Questions:
1) How do I make it so people can walk through eachother(the tibia function)? Because my event is a maze and I don't people trapping eachother.. There are alot of 1 way paths.
2) How do I make it so people can't use spells in certain areas, like utani hur to speed them up n stuff. Like they've already been exhausted? =O
I know this must sound like alot of work, but please if you can, make these scripts!
Last edited: