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

Solved Creaturescript/LOGIN.lua errors

Wartio

Any game ideas?
Joined
Apr 2, 2010
Messages
457
Reaction score
29
Location
Sweden
Can someone tell me what this error is ??, i want to delete this from my serv log, so i dont get this error anymore, or fix it atleast...

http://pastebin.com/Px6DccAL (creaturescript/login.lua)



EzoS39kPy.png
 

Attachments

  • upload_2014-11-26_16-47-2.png
    upload_2014-11-26_16-47-2.png
    220.1 KB · Views: 1 · VirusTotal

Thank you alot Ninja! :D

I also just found 1 more script bug about addon doll, if i use !addon citizen i get full addon but when i use !addon citizen again second time i still get the outfit and the addon doll removes, so it gives you addon even if you have it, i wonder if you could make so if the player got the addon then he shouldnt be able to get it again?

http://pastebin.com/JcrT6CXH
 
Code:
local config = {
    ['citizen'] = 1,
    ['hunter'] = 2,
    ['mage'] = 3,
    ['knight'] = 4,
    ['nobleman'] = 5,
    ['summoner'] = 6,
    ['warrior'] = 7,
    ['barbarian'] = 8,
    ['druid'] = 9,
    ['wizard'] = 10,
    ['oriental'] = 11,
    ['pirate'] = 12,
    ['assassin'] = 13,
    ['beggar'] = 14,
    ['shaman'] = 15,
    ['norseman'] = 16,
    ['nightmare'] = 17,
    ['jester'] = 18,
    ['brotherhood'] = 19,
    ['demonhunter'] = 20,
    ['yalaharian'] = 21,
    ['warmaster'] = 22,
    ['wayfarer'] = 23
}

function onSay(cid, words, param)
    local outfitId = config[param:lower()]
    if not outfitId then
        return false
    end

    if canPlayerWearOutfitId(cid, outfitId, 3) then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have already obtained the ' .. param .. ' addons.')
        return false
    end

    if not doPlayerRemoveItem(cid, 8982, 1) then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You need an addon doll.')
        return false
    end

    doPlayerAddOutfitId(cid, outfitId, 3)
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have received the ' .. param .. ' addons!')
    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
    return true
end
 
Back
Top