dave182
New Member
- Joined
- Jan 23, 2009
- Messages
- 80
- Reaction score
- 3
Hi, this is an usefull script. It works like this: you kill a monster (whatever you want, just change it on the script) and after that, it opens any object (you can change on the script) for XX minutes. After XX minutes, the object will put to its originally position.
First, you have to go to your data/creaturescripts/creaturescripts.xml folder, you open it and you paste this:
name=monster, you have to change it to the name of the monster you want, if you kill it it opens the object to pass.
Now, you will have to create the script, so go to your data/creaturescripts/scripts folder, copy any creaturescript around there, the name of the script will be the name of the monster you put before, erase anything inside of the script and copy this:
Explanation:
There you will put the time to put the stone again, so 1000 means 1 minute, so after you kill the monster you have 1 minute to pass the thing that you removed. You can change the time, for example, if you put 2000, it means 2 minutes.
This means the position of the object that you want to remove.
7825 means the ID of the object you want to remove, in this case, a monk statue. You can search for any ID and put it there.
There you have to put the same coordinates that you put on local stonePosition, because with this the object will appear again.
THIS SCRIPT IS USEFULL FOR QUESTS, YOU CAN ALSO PUT ON YOUR INQUISITION QUEST, IS ANOTHER WAY HOPE YOU LIKE IT, PLEASE COMMENTE AND REP++ ME IF IT WORKED
First, you have to go to your data/creaturescripts/creaturescripts.xml folder, you open it and you paste this:
Code:
<event type="death" name="monster" event="script" value="monster.lua"/>
name=monster, you have to change it to the name of the monster you want, if you kill it it opens the object to pass.
Now, you will have to create the script, so go to your data/creaturescripts/scripts folder, copy any creaturescript around there, the name of the script will be the name of the monster you put before, erase anything inside of the script and copy this:
Code:
local function moveStone(p)
if isPlayer(getThingfromPos(p.stonePosition).uid) == TRUE then
doMoveCreature(cid, 2)
end
doSendMagicEffect(p.stonePosition, 13)
doCreateItem(p.stoneid, 1, p.stonePosition)
end
function onDeath(cid, corpse, killer)
local timeLimit = 1000 * 60 * 1
local stonePosition = {x=xxx, y=xxx, z=xx, stackpos=1}
local stoneid = 7825
local stone = getThingfromPos(x=580, y=1612, z=10, stackpos=1)
if stone.itemid == stoneid then
doRemoveItem(stone.uid, 1)
doSendMagicEffect(stonePosition, 13)
addEvent(moveStone, timeLimit, {stonePosition = stonePosition, stoneid = stoneid})
end
return TRUE
end
Explanation:
Code:
local timeLimit = 1000 * 60 * 1
Code:
local stonePosition = {x=xxx, y=xxx, z=xx, stackpos=1}
Code:
local stoneid = 7825
Code:
local stone = getThingfromPos(x=xxx, y=xxx, z=xx, stackpos=1)
THIS SCRIPT IS USEFULL FOR QUESTS, YOU CAN ALSO PUT ON YOUR INQUISITION QUEST, IS ANOTHER WAY HOPE YOU LIKE IT, PLEASE COMMENTE AND REP++ ME IF IT WORKED