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

My very own task mission quest.

Kramer infernal

I work alone =/
Joined
Jun 18, 2008
Messages
225
Reaction score
0
Hi, I'm tired of dealing with this invincible and invisible error, so i'll post it here.

Here is the deal, my server has some kind of quest that is very similar to killing in the name of, but a lot, and A LOT more content inside of him.

Before 0.3.6pl1 I had all my script available and working at 100%, but now, it seems some function has deprecated or something the point is that the task mission don't count me the frags of kills and consequently i cannot advance the quest. Here's my script

in creaturescripts:

Code:
function onKill(cid, target, lastHit)
local onkilling = getPlayerStorageValue(cid,50000)
local onkilling2 = getPlayerStorageValue(cid,50001)
local onkilling3 = getPlayerStorageValue(cid,50002)
local onkilling4 = getPlayerStorageValue(cid,50003)
local onkilling5 = getPlayerStorageValue(cid,50004)

if getPlayerStorageValue(cid,5000) == 2 then

if(getCreatureName(target) == "Rotworm") then
doPlayerSendTextMessage(cid,19,'It is your monster number ' ..onkilling.. '.')
setPlayerStorageValue(cid,50000, ((onkilling == -1 and 1) or onkilling+1))


if (onkilling >= 20) then
setPlayerStorageValue(cid,5000,3)
setPlayerStorageValue(cid,50000, 1)
doPlayerSendTextMessage(cid,22,'you success!.')
end
end
end
return true
end

And in the action part

Code:
[B]...[/B]
elseif level >= 8 and storage == 1 then

doPlayerSendTextMessage(cid,22,'Alright, for your first mission kill 20 rotworms.')
setPlayerStorageValue(cid,5000,2)

elseif storage == 2 then
doPlayerSendTextMessage(cid,22,'You have killed ' ..based.. '/20 Rotworms!') ...

The script won't run changing anything. Thanks for the help ;)
 
Last edited:
yep, look, the server doesn't drop any end missing message, i have ends perfectly counted... but as i copy paste a tiny piece of code some errors are evident, if you want i can paste the whole thing but its quite huge
 
Code:
function onKill(cid, target, lastHit)
local onkilling = getPlayerStorageValue(cid,50000)
local onkilling2 = getPlayerStorageValue(cid,50001)
local onkilling3 = getPlayerStorageValue(cid,50002)
local onkilling4 = getPlayerStorageValue(cid,50003)
local onkilling5 = getPlayerStorageValue(cid,50004)

-------ASHALAY

--ROTWORM QUEST
if getPlayerStorageValue(cid,5000) == 2 then

if(getCreatureName(target) == "Rotworm") then
doPlayerSendTextMessage(cid,19,'It is your monster number ' ..onkilling.. '.')
setPlayerStorageValue(cid,50000, ((onkilling == -1 and 1) or onkilling+1))


if (onkilling >= 20) then
setPlayerStorageValue(cid,5000,3)
setPlayerStorageValue(cid,50000, 1)
setPlayerStorageValue(cid,50001, 1)
setPlayerStorageValue(cid,50002, 1)
setPlayerStorageValue(cid,50003, 1)
setPlayerStorageValue(cid,50004, 1)
doPlayerSendTextMessage(cid,22,'haz terminado.')
end
end


--ROTWORM AND CARRION WORM QUEST

elseif getPlayerStorageValue(cid,5000) == 5 then

if(getCreatureName(target) == "Rotworm") then
doPlayerSendTextMessage(cid,19,'It is your monster number ' ..onkilling.. '.')
setPlayerStorageValue(cid,50000, ((onkilling == -1 and 1) or onkilling+1))

elseif(getCreatureName(target) == "Carrion Worm") then
doPlayerSendTextMessage(cid,19,'It is your monster number ' ..onkilling2.. '.')
setPlayerStorageValue(cid,50001, ((onkilling2 == -1 and 1) or onkilling2+1))

if (onkilling >= 30) and (onkilling2 >= 10) then
setPlayerStorageValue(cid,5000,6)
setPlayerStorageValue(cid,50000,1)
setPlayerStorageValue(cid,50001,1)
doPlayerSendTextMessage(cid,22,'haz terminado.')
end
end          

--CYCLOPS QUEST
elseif getPlayerStorageValue(cid,5000) == 11 then

if(getCreatureName(target) == "Cyclops") then
doPlayerSendTextMessage(cid,19,'It is your monster number ' ..onkilling.. '.')
setPlayerStorageValue(cid,50000, ((onkilling == -1 and 1) or onkilling+1))

if (onkilling >= 10) then
setPlayerStorageValue(cid,5000,12)
setPlayerStorageValue(cid,50000,1)
doPlayerSendTextMessage(cid,22,'haz terminado.')
end
end          

--DUHVILLE

elseif getPlayerStorageValue(cid,5000) == 14 then

if(getCreatureName(target) == "Skeleton") then
doPlayerSendTextMessage(cid,19,'It is your monster number ' ..onkilling.. '.')
setPlayerStorageValue(cid,50000, ((onkilling == -1 and 1) or onkilling+1))

elseif(getCreatureName(target) == "Ghoul") then
doPlayerSendTextMessage(cid,19,'It is your monster number ' ..onkilling2.. '.')
setPlayerStorageValue(cid,50001, ((onkilling2 == -1 and 1) or onkilling2+1))

if (onkilling >= 50) and (onkilling2 >= 25) then
setPlayerStorageValue(cid,5000,15)
setPlayerStorageValue(cid,50000,1)
setPlayerStorageValue(cid,50001,1)
doPlayerSendTextMessage(cid,22,'haz terminado.')
end
end
end
return true
end

Again, this is the 1st city part, i have 3 cities and the quest continues up to the quest number 180, so that's because i can't post it complete.

I think this part will work out.

Haz terminado means you're done, that's not a code nor something.

Thank you in advance for helping me out.

Despite the action part, i think that won't affect because the bother is on the counting monster frags part.

Note: the storage value IS on position, i have made sure of that.
 
Lua:
function onKill(cid, target, lastHit)

    local onkilling = getPlayerStorageValue(cid, 50000)
    local onkilling2 = getPlayerStorageValue(cid, 50001)
    local onkilling3 = getPlayerStorageValue(cid, 50002)
    local onkilling4 = getPlayerStorageValue(cid, 50003)
    local onkilling5 = getPlayerStorageValue(cid, 50004)

    if (getPlayerStorageValue(cid, 5000) == 2) then

        if (getCreatureName(target):lower() == "rotworm") then
            doPlayerSendTextMessage(cid, 19, 'It is your monster number ' .. onkilling .. '.')
            setPlayerStorageValue(cid, 50000, ((onkilling <= 0) and 1 or onkilling + 1))

            if (onkilling >= 20) then
                setPlayerStorageValue(cid, 5000, 3)
                setPlayerStorageValue(cid, 50000, 1)
                setPlayerStorageValue(cid, 50001, 1)
                setPlayerStorageValue(cid, 50002, 1)
                setPlayerStorageValue(cid, 50003, 1)
                setPlayerStorageValue(cid, 50004, 1)
                doPlayerSendTextMessage(cid, 22, 'haz terminado.')
            end
        end
    
    elseif (getPlayerStorageValue(cid, 5000) == 5) then

        if (getCreatureName(target):lower() == "rotworm") then
            doPlayerSendTextMessage(cid, 19, 'It is your monster number ' .. onkilling .. '.')
            setPlayerStorageValue(cid, 50000, ((onkilling <= 0) and 1 or onkilling + 1))

        elseif (getCreatureName(target):lower() == "carrion worm") then
            doPlayerSendTextMessage(cid, 19, 'It is your monster number ' .. onkilling2 .. '.')
            setPlayerStorageValue(cid, 50001, ((onkilling2 <= 0) and 1 or onkilling2 + 1))

            if (onkilling >= 30) and (onkilling2 >= 10) then
                setPlayerStorageValue(cid, 5000, 6)
                setPlayerStorageValue(cid, 50000, 1)
                setPlayerStorageValue(cid, 50001, 1)
                doPlayerSendTextMessage(cid, 22, 'haz terminado.')
            end
        end          


    elseif (getPlayerStorageValue(cid, 5000) == 11) then

        if (getCreatureName(target):lower() == "cyclops") then
            doPlayerSendTextMessage(cid, 19, 'It is your monster number ' .. onkilling .. '.')
            setPlayerStorageValue(cid, 50000, ((onkilling <= 0) and 1 or onkilling + 1))

            if (onkilling >= 10) then
                setPlayerStorageValue(cid, 5000, 12)
                setPlayerStorageValue(cid, 50000, 1)
                doPlayerSendTextMessage(cid, 22, 'haz terminado.')
            end
        end
    
    elseif (getPlayerStorageValue(cid, 5000) == 14) then

        if (getCreatureName(target):lower() == "skeleton") then
            doPlayerSendTextMessage(cid, 19, 'It is your monster number ' .. onkilling .. '.')
            setPlayerStorageValue(cid, 50000, ((onkilling <= 0) and 1 or onkilling + 1))

        elseif(getCreatureName(target):lower() == "ghoul") then
            doPlayerSendTextMessage(cid, 19, 'It is your monster number ' .. onkilling2 .. '.')
            setPlayerStorageValue(cid, 50001, ((onkilling2 <= 0) and 1 or onkilling2 + 1))

            if (onkilling >= 50) and (onkilling2 >= 25) then
                setPlayerStorageValue(cid, 5000, 15)
                setPlayerStorageValue(cid, 50000, 1)
                setPlayerStorageValue(cid, 50001, 1)
                doPlayerSendTextMessage(cid, 22, 'haz terminado.')
            end
        end
    end
    return true
end

no big fixes there :/ you have registered the event on login?
and you have those lines in lib/compat

doPlayerSetStorageValue = doCreatureSetStorage
setPlayerStorageValue = doPlayerSetStorageValue
getPlayerStorageValue = getCreatureStorage
 
I have registered the event, the only thing i can think about its something like over events... as i have a lot of dynamic monster-player action in my server so i have a lot of these scripts, but 2 are damaged, but, unfortunately the 2 damaged not working are the 2 most used on my server lol.
 
I have registered the event, the only thing i can think about its something like over events... as i have a lot of dynamic monster-player action in my server so i have a lot of these scripts, but 2 are damaged, but, unfortunately the 2 damaged not working are the 2 most used on my server lol.
msn ? A_A
 
Back
Top