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

MOD File Help needed

ffriozi

New User of Linux OS
Joined
Apr 4, 2008
Messages
96
Reaction score
1
Hello guys, anyone can edit this mod and set it to everytime the player lose or drop something he will get the Firstitems again. i know about the "SAVE" on SQL but its not working dont know why. so can anyone edit this?

Thank you !

HTML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Apsivaflines" contact="antica.sytes.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
]]></config>
<event type="login" name="FirstItems" event="script"><![CDATA[
domodlib('firstitems_config')
function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2160, 1) -- cristal coin
doAddContainerItem(bag, 5710, 1) -- shovel
doAddContainerItem(bag, 2420, 1) -- machete
doAddContainerItem(bag, 2789, 100) -- brown mushrooms
doAddContainerItem(bag, 2305, 1) -- fire bomb rune
doAddContainerItem(bag, 2261, 1) -- destroy field rune
doAddContainerItem(bag, 2268, 1) -- sd
doAddContainerItem(bag, 2273, 1) -- uh
doAddContainerItem(bag, 7590, 1) -- gmp
doAddContainerItem(bag, 2293, 1) -- mw
doPlayerAddItem(cid, 2323, 1) -- hat of the mad
doPlayerAddItem(cid, 8871, 1) -- focus cape
doPlayerAddItem(cid, 7730, 1) -- blue legs
doPlayerAddItem(cid, 2195, 1) -- boots of haste
doPlayerAddItem(cid, 8902, 1) -- spellbook of mind control
doPlayerAddItem(cid, 2187, 1) -- wand of inferno 
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2160, 1) -- cristal coin
doAddContainerItem(bag, 5710, 1) -- shovel
doAddContainerItem(bag, 2420, 1) -- machete
doAddContainerItem(bag, 2789, 100) -- brown mushrooms
doAddContainerItem(bag, 2305, 1) -- fire bomb rune
doAddContainerItem(bag, 2261, 1) -- destroy field rune
doAddContainerItem(bag, 2268, 1) -- sd
doAddContainerItem(bag, 2273, 1) -- uh
doAddContainerItem(bag, 7590, 1) -- gmp
doAddContainerItem(bag, 2293, 1) -- mw
doPlayerAddItem(cid, 2323, 1) -- hat of the mad
doPlayerAddItem(cid, 8871, 1) -- focus cape
doPlayerAddItem(cid, 7730, 1) -- blue legs
doPlayerAddItem(cid, 2195, 1) -- boots of haste
doPlayerAddItem(cid, 8902, 1) -- spellbook of mind control
doPlayerAddItem(cid, 2183, 1) -- hailstorm rod  
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2160, 1) -- cristal coin
doAddContainerItem(bag, 5710, 1) -- shovel
doAddContainerItem(bag, 2420, 1) -- machete
doAddContainerItem(bag, 2789, 100) -- brown mushrooms
doAddContainerItem(bag, 2305, 1) -- fire bomb rune
doAddContainerItem(bag, 2261, 1) -- destroy field rune
doPlayerAddItem(cid, 2493, 1) -- demon helmet
doPlayerAddItem(cid, 8891, 1) -- paladin armor
doPlayerAddItem(cid, 7730, 1) -- blue legs
doPlayerAddItem(cid, 2195, 1) -- boots of haste
doPlayerAddItem(cid, 2514, 1) -- mastermind shield
doPlayerAddItem(cid, 7368, 10) -- assassin stars
doAddContainerItem(bag, 2268, 1) -- sd
doAddContainerItem(bag, 2273, 1) -- uh
doAddContainerItem(bag, 8472, 1) -- gsp
doAddContainerItem(bag, 7589, 1) -- smp
doAddContainerItem(bag, 7588, 1) -- shp
doAddContainerItem(bag, 2293, 1) -- mw
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2160, 1) -- cristal coin
doAddContainerItem(bag, 5710, 1) -- shovel
doAddContainerItem(bag, 2420, 1) -- machete
doAddContainerItem(bag, 2789, 100) -- brown mushrooms
doAddContainerItem(bag, 2305, 1) -- fire bomb rune
doAddContainerItem(bag, 2261, 1) -- destroy field rune
doPlayerAddItem(cid, 2493, 1) -- demon helmet
doPlayerAddItem(cid, 2472, 1) -- magic plate armor
doPlayerAddItem(cid, 2470, 1) -- golden legs
doPlayerAddItem(cid, 2195, 1) -- boots of haste
doPlayerAddItem(cid, 2514, 1) -- mastermind shield
doAddContainerItem(bag, 2400, 1) -- magic sword
doAddContainerItem(bag, 2431, 1) -- Stonecutter Axe
doAddContainerItem(bag, 7620, 1) -- mp
doAddContainerItem(bag, 7591, 1) -- ghp
doAddContainerItem(bag, 8473, 1) -- uhp
doAddContainerItem(bag, 2313, 1) -- explosion
doAddContainerItem(bag, 2293, 1) -- mw
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
end
end
return TRUE
end
]]></event>
</mod>
 
Delete all of the:
setPlayerStorageValue(cid,50000)
And delete:
and getPlayerStorageValue(cid, 50000) == -1
 
LoL pretty fun... everytime i relog come more items... if i relog 10x i will have 10 ropes 10 legs 10 weapons lol
 
just put loss_containers in 0, the players won't loss anything when die
execute this query in phpmyadmin:
SQL:
UPDATE players SET loss_containers = 100
 
Back
Top