Solved Red Skull Problem

Dawg

Member
Joined
Mar 23, 2014
Messages
158
Reaction score
17
I made it so when players die they don't drop any items... So when they die with a red skull, they're still not dropping items, which is a problem :p

All I've done is added this to my login.lua:
Code:
doSetCreatureDropLoot(cid, false)
I still want people to not drop anything when they die normally, but I want them to lose all of their items when they die with a red skull, just like normal.

Anyone got any ideas?
Thanks :)
 

Mkalo

ボーカロイド
Joined
Jun 1, 2011
Messages
1,118
Reaction score
893
Location
Japan
I made it so when players die they don't drop any items... So when they die with a red skull, they're still not dropping items, which is a problem :p

All I've done is added this to my login.lua:
Code:
doSetCreatureDropLoot(cid, false)
I still want people to not drop anything when they die normally, but I want them to lose all of their items when they die with a red skull, just like normal.

Anyone got any ideas?
Thanks :)
Code:
if getPlayerSkullType(cid) < SKULL_RED then
    doSetCreatureDropLoot(cid, false)
else
    doSetCreatureDropLoot(cid, true)
end
This kinda fix it, but you have to do an onKill creaturescript to set de creature drop loot back to true when a player gets red skull, otherwise he won't drop loot it until he logout and login.
 
OP
Dawg

Dawg

Member
Joined
Mar 23, 2014
Messages
158
Reaction score
17
Code:
if getPlayerSkullType(cid) < SKULL_RED then
    doSetCreatureDropLoot(cid, false)
else
    doSetCreatureDropLoot(cid, true)
end
This kinda fix it, but you have to do an onKill creaturescript to set de creature drop loot back to true when a player gets red skull, otherwise he won't drop loot it until he logout and login.
Where do I put this script?
 
OP
Dawg

Dawg

Member
Joined
Mar 23, 2014
Messages
158
Reaction score
17
change
doSetCreatureDropLoot(cid, false)

to


in login.lua
It works... But the red skull player only loses items after he relogs, not as soon as he gets the skull :/
 

Sir Islam

Never Give Up
Joined
Jun 6, 2008
Messages
504
Reaction score
118
Location
Suez , Egypt
onPrepareDeath creaturescript
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if getPlayerSkullType(cid) < SKULL_RED then
  doSetCreatureDropLoot(cid, false)
else
  doSetCreatureDropLoot(cid, true)
end
return true
end
 
OP
Dawg

Dawg

Member
Joined
Mar 23, 2014
Messages
158
Reaction score
17
onPrepareDeath creaturescript
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if getPlayerSkullType(cid) < SKULL_RED then
  doSetCreatureDropLoot(cid, false)
else
  doSetCreatureDropLoot(cid, true)
end
return true
end
works perfectly :)
 
Top