• 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!

CreatureEvent Frag reward

Komic

MChem
Joined
Jun 8, 2007
Messages
359
Reaction score
51
This gives a PKer an item to show who've they killed and at what level. Much like on Diablo II

fragreward.lua
Code:
function onPrepareDeath(cid, killer)
loot = 5943
item = doPlayerAddItem(killer,loot,1)
doSetItemSpecialDescription(item,"This is the "..getItemName(loot).." of "..getPlayerName(cid).." at Level "..getPlayerLevel(cid)..".")
end

and in creaturescripts.xml
Code:
<event type="preparedeath" name="FragReward" script="fragreward.lua" />
 
Damn... Does it work? I can't check if it works now because I am not at home. I have always wanted to see a script like this. And does it says who killed who? Or does it just type the one that died's name?

Btw did you make this script?
 
I did make this script, although i did post it on knightfires thread on OTfans. It doesnt add the killers name to it, as I though that would make it to long a description.
 
Last edited:
Did you test it? Because usually, you need to have spaces the qoutes (") and the dots (..) and the function.

Like this:
Code:
doSetItemSpecialDescription(item,"This is the " .. getItemName(loot) .. " of " .. getPlayerName(cid) .. " at Level " .. getPlayerLevel(cid) .. ".")
 
@Brassen: For example: If I am lvl 50 and you kill me, you will loot an item (the frag reward) there it says that I died at lvl 50 if you look at it. It doesn't do anything, it just shows that I died on lvl 50 and that you got that thing to like "prove" that I died... Hope you understand what I mean :p
 
Loli'v seen the item u mean it looks like a heart or somting

lolx.jpg
 
I did make this script, although i did post it on knighthunters thread on OTfans. It doesnt add the killers name to it, as I though that would make it to long a description.

You mean knightfire, I posted this on Otfans, but looks like you just made it look different and added getItemName.

Ill fix this on Otfans with your credits.
 
HAHAHA, niiice script!
now i can prove, "I KILLED THE TOP AT LVL 50"
dasuhadshsda :D
 
If you want to REALLY prove you killed that certain player, I think you can change:

doSetItemSpecialDescription(item,"This is the "..getItemName(loot).." of "..getPlayerName(cid).." at Level "..getPlayerLevel(cid)..".")

to:

doSetItemSpecialDescription(item,"This is the "..getItemName(loot).." of "..getPlayerName(cid).." at Level "..getPlayerLevel(cid)..", he/she was killed by "..getPlayerName(killer)..".")
 
If you want to REALLY prove you killed that certain player, I think you can change:



to:

That's way bether with the name of who killed him, But somwtimes Character dies because of 2 people wouldent this bug it?
 
I also added
Code:
if getPlayerLevel(killer) >= getPlayerLevel(cid) / 2 then
so if a level 100 kills a level 8 they don't get an item. :)
 
Hmmm... pretty cool script!
Though i have no idea how it works 0.o

//Saphira
 
Back
Top