• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TalkAction Sucide(with battle check!)

Clary

New Member
Joined
Mar 7, 2008
Messages
1,007
Reaction score
1
Suicide(with battle check!)

For the first, I'd like to thank Black Luster for the basic idea and nice piece of code.
Second important thing - the function was made for TFS, I don't know will it work on other cores!
As third... I've decided to release the code today, after I rebuilded it, and its almost different than Black Luster one.
and last, i would to thank Marcinek Paladinek for helping me in making this script work.


Go data/talkactions/scripts

Copy any file and put this:
PHP:
function onSay(cid, words, param)
if getCreatureCondition(cid, CONDITION_INFIGHT) > 0 then
doPlayerSendCancel(cid, "You cannot use this while in battle.")
else
   doCreatureAddHealth(cid, - getCreatureMaxHealth(cid))
   doCreatureAddMana(cid, - getCreatureMaxMana(cid))
   doCreatureSay(cid, "Goodbye cruel world!", 1)
return 0
end
return 1

end

Save and name to "Suicide"

Go data/talkactions/talkactions.xml

And paste this:
Code:
<talkaction words="Goodbye cruel world!" script="suicide.lua" />
Credits :
Major Credits :
Me(Clary) : for making the script.
Marcinek Paladinek : for helping making it work.

Minor Credits :
AGS : for giving me the idea to add a battle check.


NOTES :
1- Tested with TFS Tags Rev 220 (compiled by me)

2- I think <talkaction words="Goodbye cruel world!" script="suicide.lua" />
should be changed to something else since it is long
any suggestions?

3- this is my first script :p

4-Can any moderator change the title to Suicide(with battle check!)


Post with ur comments.
 
Last edited:
@up kk updated it ty for ur comment but try getting shorter one.
 
@up good idea but i will make a new script for it
called bad words filter
in more advanced way it will work if u say fuck u all or u are all fuckers or u say FuCk u.
when i make it gonna make new thread for it
 
@up I didn't understand what u mean with
doPlayerSay(cid, words, 1)
I am already using this.
and tested working 100%.
 
@up I didn't understand what u mean with
doPlayerSay(cid, words, 1)
I am already using this.
and tested working 100%.

the variable "words" is the word you wrote in talkactions.xml, if you change this, to doPlayerSay(cid, words, 1) then they don't need to edit there :p
 
Clary I havn't tested it but I think my teach Nahruto (which is also you teacher :))
told me sometime that instead of "doPlayerSay", u need to use "doCreatureSay"
not sure though :), hopefully I'm wrong and you are right :)
Great first script keep doing what ya love :)
peace!
 
Back
Top