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

Script convertion requested (old meta to new meta)

EvoSoft

Is Da Mapper
Joined
Mar 10, 2010
Messages
693
Reaction score
5
Location
Northen part of Sweden
Code:
function onKill(cid, target, damage, flags)
     if isPlayer(cid) then
   if(isMonster(target)) then
     if(string.lower(getCreatureName(target)) == "jaul") then
         setPlayerStorageValue(cid, 524877, 1)
         doCreatureSay(cid, "You can get your reward now.", TALKTYPE_ORANGE_1)
         doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
         end
       end
   if(isMonster(target)) then
     if(string.lower(getCreatureName(target)) == "tanjis") then
         setPlayerStorageValue(cid, 524878, 1)
         doCreatureSay(cid, "You can get your reward now.", TALKTYPE_ORANGE_1)
         doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
         end
       end
   if(isMonster(target)) then
     if(string.lower(getCreatureName(target)) == "obujos") then
         setPlayerStorageValue(cid, 524879, 1)
         doCreatureSay(cid, "You can get your reward now.", TALKTYPE_ORANGE_1)
         doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
         end
       end
     end
   return true
end

THANKS!
 
Code:
function onKill(cid, target, damage, flags)
    local player = Player(cid)
    if(player ~= nil) then
        local targetBoolean = Monster(target)
        if(targetBoolean ~= nil) then
            local targets = {
                ["jaul"] = 524877,
                ["tanjis"] = 524878,
                ["obujos"] = 524879
            }
            
            local v = targets[string.lower(targetBoolean:getName())]
            if(v) then
                player:setStorageValue(v, 1)
                player:say("You can get your reward now.", TALKTYPE_ORANGE_1)
                player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            end
        end
    end
return true
end
 
Code:
function onKill(cid, target, damage, flags)
    local player = Player(cid)
    if(player ~= nil) then
        local targetBoolean = Monster(target)
        if(targetBoolean ~= nil) then
            local targets = {
                ["jaul"] = 524877,
                ["tanjis"] = 524878,
                ["obujos"] = 524879
            }
           
            local v = targets[string.lower(targetBoolean:getName())]
            if(v) then
                player:setStorageValue(v, 1)
                player:say("You can get your reward now.", TALKTYPE_ORANGE_1)
                player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            end
        end
    end
return true
end

tenks i luv yu <3
 
Back
Top