• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

VIP Storage --> Dont loose item if Player Die/RS

Cazar

Ph0t0sh0p abus3r
Joined
Mar 9, 2009
Messages
407
Reaction score
1
Location
Cologne
Can someone make a script that if a Player die,
dont loose the Donated Items?
If the Player got RS and they got the Items they dont let the If the player has a RedSKull, however, he should not lose the Items. He should keep it.

//Cazar

p.s. Rep++ :)
 
Code:
local storage = idk the storage
function onDie(cid)
	if getPlayerStorageValue(cid, storage) =< 1 then
		for i = 3, 5 do
		doPlayerSetLossPercent(cid, i, 0)
		end
	end
return TRUE
end

(:
 
Please speak properly English and state your point even more properly.
 
Code:
[18/05/2009  20:58:53] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/vip.lua
[18/05/2009  20:58:53] data/creaturescripts/scripts/vip.lua:3: 'then' expected near '='

i get this error :s

Edit:

Code:
local storage = 11551
function onDeath(cid)
	if getPlayerStorageValue(cid, storage) =< 1 then
		for i = 3, 5 do
		doPlayerSetLossPercent(cid, i, 0)
		end
	end
return TRUE
end
remember that the VIP players doesnt lost specially Items like
2400 - Magic Sword
etc.

Its 10 Items that just be saved onDeath.

//Cazar
 
Last edited:
Take this, if the VIP player has this storage then he wont lose items/containers
LUA:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) 
local storage = 12345 -- set the vip storage here
	if getPlayerStorageValue(cid, storage) == TRUE then
		for i = PLAYERLOSS_CONTAINERS, PLAYERLOSS_ITEMS do
		doPlayerSetLossPercent(cid, i, 0)
		end
	end
	return TRUE
end
But he will lose levels skillls :p
 
Take this, if the VIP player has this storage then he wont lose items/containers
LUA:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) 
local storage = 12345 -- set the vip storage here
	if getPlayerStorageValue(cid, storage) == TRUE then
		for i = PLAYERLOSS_CONTAINERS, PLAYERLOSS_ITEMS do
		doPlayerSetLossPercent(cid, i, 0)
		end
	end
	return TRUE
end
But he will lose levels skillls :p

Thanks man! Rep++ !
It works :)
 
LUA:
  function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
local storage = 12345 -- set the vip storage here
        if getPlayerStorageValue(cid, storage) == TRUE then
                doSetCreatureDropLoot(cid, 0)
                end
        end
        return TRUE
end

try this.

Now i get this error.
Code:
[21/05/2009  23:27:50] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/vip.lua
[21/05/2009  23:27:50] data/creaturescripts/scripts/vip.lua:8: '<eof>' expected near 'end'
 
Now i get this error.
Code:
[21/05/2009  23:27:50] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/vip.lua
[21/05/2009  23:27:50] data/creaturescripts/scripts/vip.lua:8: '<eof>' expected near 'end'

Remove the spaces at the beginning before function and it should work.
 
Remove the spaces at the beginning before function and it should work.


Code:
[22/05/2009  00:15:19] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/vip.lua
[22/05/2009  00:15:19] data/creaturescripts/scripts/vip.lua:9: '<eof>' expected near 'end'

Just got the error again.
 
Back
Top