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

Lua Get storage on kill

Lightonia

Lightonia.servegame.com
Joined
Jun 4, 2007
Messages
492
Reaction score
9
I really cant get this to work, please help out, i think my main problem is at :
LUA:
  if creature == "adel the skinny ass" then
       elseif demonkilled == -1 then
LUA:
function onKill(cid, target)

local demonstorage = 40001
local demonkilled = getPlayerStorageValue(cid,demonstorage)
local creature = getCreatureName(target)
 
  if creature == "adel the skinny ass" then
       elseif demonkilled == -1 then
           doCreatureSetStorage(cid, demonstorage, 1)
           end
           if demonstorage == 1 then
           doCreatureSay(cid, "You have been Enforced with skeletal powers", TALKTYPE_ORANGE_1)
           end
end
 
LUA:
 function onUse(cid, item, frompos, item2, topos)
 
local demonstorage = 39871
local demonteleport = {x=345, y=387, z=7} --Location to teleport to on the map if you pull the lever
        --Demon Kill
           queststatus = getPlayerStorageValue(cid,demonstorage)
           if queststatus == 1 then
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You found a fine new dishtasha under the rock.")
                        doPlayerAddItem(cid,2656)
                        doSendMagicEffect(demonteleport,10)
                        doCreatureSetStorage(cid, demonstorage, 2)
           elseif queststatus == 2 then
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have rubbled the stone, but can't find anything under it.")                          
           else
               doCreatureSay(cid, 'This stone rubbles a little bit, but you might need skeletal powers to enforce it over.', TALKTYPE_ORANGE_1)
           end
 
end

Adn as long as the server saves the character, then they shouldn't be able to loot the stone... unless your script to start the quest or whatever this is is allowing players to do so
 
Back
Top