fatelord
New Member
- Joined
- Aug 7, 2007
- Messages
- 56
- Reaction score
- 1
Hello to everyone!
Im here to post my new useless script!
Anyone heard about Deathnote? Well, its a book where you write the name of the person and the person dies. In original Death Note anime, it takes 40 seconds to kill, but im too lazy to add timers, so I made it instant.
Lets Start!
First, check your items.xml. These 2 items MUST be like this:
If they aren't like this, you cant write on the books
Btw, if your server is running, you edit this and try reload it wont work (at least it didnt work for me), so you'll need to restart server.
Ok. Now on creaturescripts.xml:
Create a file in creaturescripts/scripts named "deathnote.lua"
And now on login.lua:
How it works? Simple. Open the book with item id 1972. Write the name of a player. If the actionid of the book is 9202, the player you wrote the name dies. Simple like that. If you write the name of a monster instead, the first monster that spawned with that name (if you got 2 rats on the map, the first one on the spawn list is the unlucky one) dies. The script removes 100000 hp from the creature, so except for that super uber master monsters, anything should die. Immune to mana shield, since it directly removes the hp.
Tested on TFS 0.3.4
Reply if you liked it!
PS: Know bugs
1. If you write the name of an inexistent player or monster, the book gets written and nothing else happens. (You lost it noob! )
2. Just the first line works. If you write more than one line, nothing happens beside the written book.
3. It will only work for one creature. Dont even bother trying to use commas (,) to multi use it
Soon someone will post an "advanced deathnote", so maybe it will get bug fixed.
Im here to post my new useless script!
Anyone heard about Deathnote? Well, its a book where you write the name of the person and the person dies. In original Death Note anime, it takes 40 seconds to kill, but im too lazy to add timers, so I made it instant.
Lets Start!
First, check your items.xml. These 2 items MUST be like this:
PHP:
<item id="1955" article="a" name="book">
<attribute key="weight" value="1000"/>
</item>
<item id="1972" article="a" name="book">
<attribute key="weight" value="1000"/>
<attribute key="writeable" value="1"/>
<attribute key="maxTextLen" value="512"/>
<attribute key="writeOnceItemId" value="1955"/>
</item>
Btw, if your server is running, you edit this and try reload it wont work (at least it didnt work for me), so you'll need to restart server.
Ok. Now on creaturescripts.xml:
PHP:
<event type="textedit" name="DeathNote" event="script" value="deathnote.lua"/>
Create a file in creaturescripts/scripts named "deathnote.lua"
PHP:
function onTextEdit(cid, item, newText)
if item.actionid == 9202 then
doCreatureAddHealth(getCreatureByName(newText), -100000)
end
return TRUE
end
And now on login.lua:
PHP:
registerCreatureEvent(cid, "DeathNote")
How it works? Simple. Open the book with item id 1972. Write the name of a player. If the actionid of the book is 9202, the player you wrote the name dies. Simple like that. If you write the name of a monster instead, the first monster that spawned with that name (if you got 2 rats on the map, the first one on the spawn list is the unlucky one) dies. The script removes 100000 hp from the creature, so except for that super uber master monsters, anything should die. Immune to mana shield, since it directly removes the hp.
Tested on TFS 0.3.4
Reply if you liked it!
PS: Know bugs
1. If you write the name of an inexistent player or monster, the book gets written and nothing else happens. (You lost it noob! )
2. Just the first line works. If you write more than one line, nothing happens beside the written book.
3. It will only work for one creature. Dont even bother trying to use commas (,) to multi use it
Soon someone will post an "advanced deathnote", so maybe it will get bug fixed.