Yaze
Well-Known Member
- Joined
- Sep 15, 2014
- Messages
- 382
- Reaction score
- 61
Hi, i've got a reuqest if someone could help me.
I am using tfs 0.3.6, with the client 8.6 ,
I would like to have an scroll, that you can use which allows you to enter to one house of these for like 24 hours.
(The lever doesnt matter, it spawns a monster)
So after you use the scroll you get teleported in one of the free houses and allow him to enter and leave for 24 hours, and after that he should lose the house.
The house ownerid will be on my admin char so its easier to create the script.
I've got this script for donation castles maybe someone can just change it that you will only be possible to enter for 24 hours and lose it after it, im not sure if its possible to do it with a house, but somehow theres a way i guess.
-- another script request / fix --
Aswell i would be happy if someone could fix me this script aswell,
The lever which get used should spawn like 2 monsters at same, and you shouldnt be able to use it again till they got killed, this should cost money.
atm i got this error ,
I am using tfs 0.3.6, with the client 8.6 ,
I would like to have an scroll, that you can use which allows you to enter to one house of these for like 24 hours.
(The lever doesnt matter, it spawns a monster)
So after you use the scroll you get teleported in one of the free houses and allow him to enter and leave for 24 hours, and after that he should lose the house.
The house ownerid will be on my admin char so its easier to create the script.
I've got this script for donation castles maybe someone can just change it that you will only be possible to enter for 24 hours and lose it after it, im not sure if its possible to do it with a house, but somehow theres a way i guess.
-- another script request / fix --
Aswell i would be happy if someone could fix me this script aswell,
The lever which get used should spawn like 2 monsters at same, and you shouldnt be able to use it again till they got killed, this should cost money.
atm i got this error ,
Code:
[Error - Action Interface]
data/actions/scripts/lever1.lua:onUse
Description:
data/actions/scripts/lever1.lua:8: attempt to call method 'getActionId' (a nil value)
stack traceback:
data/actions/scripts/lever1.lua:8: in function <data/actions/scripts/lever1.lua:7>
Code:
local creatures = {
[9977] = {name = 'Phantom Lord', cost = 10},
}
local lever = {}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local tmp = creatures[item:getActionId(9977)]
if tmp then
if isCreature(lever[item:getUniqueId(9977)]) then
doPlayerSendCancel(cid, "You need to kill "..getCreatureName(leverMonster).." before you can summon another creature.")
else
if getPlayerMoney(cid) >= tmp.cost then
doPlayerRemoveMoney(cid, tmp.cost)
lever[item:getUniqueId()] = doSummonCreature(tmp.name, toPosition)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
else
doPlayerSendCancel(cid, 'You need '.. tmp.cost ..' gold coins to use this lever.')
end
end
end
return true
end
Last edited: