• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

I NEED HELP WITH THIS ACTION [Deleted]

Status
Not open for further replies.

lorinholukete69

New Member
Joined
Apr 22, 2021
Messages
22
Reaction score
2
GitHub
lorinholukete69
lorinholukete69 submitted a new resource:

I NEED HELP WITH THIS ACTION - I NEED HELP WITH THIS ACTION

I HAVE THIS SCRIPT:

this script give 1 magic level each "magic stone" player use.

i need same script but with a usage limit of 50x.

i need same script that adds sword , axe , club , distance, with a usage limit of 50x. help me ??

-----------------------------------------------------------------
local count = 1 -- GIVE 1 ML

function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddMagLevel(cid, count)
doRemoveItem(item.uid)
return true
end

function doPlayerAddMagLevel(cid...

Read more about this resource...
 
thanks my friend , i need fast help :S
LUA:
local count = 1
local maxUses = 50

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local uses = getPlayerStorageValue(cid, 30001)
    
    if uses >= maxUses then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have reached the maximum usage limit for magic stones.")
        return false
    end
    
    if uses < 0 then uses = 0 end
    
    doPlayerAddMagLevel(cid, count)
    setPlayerStorageValue(cid, 30001, uses + 1)
    doRemoveItem(item.uid)
    return true
end

LUA:
local count = 1 -- GIVE 1 Sword Skill
local maxUses = 50

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local uses = getPlayerStorageValue(cid, 30002) -- Different storage value for sword
    
    if uses >= maxUses then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have reached the maximum usage limit for sword stones.")
        return false
    end
    
    if uses < 0 then uses = 0 end
    
    doPlayerAddSkillTry(cid, SKILL_SWORD, getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) + 1))
    setPlayerStorageValue(cid, 30002, uses + 1)
    doRemoveItem(item.uid)
    return true
end
 
LUA:
local count = 1
local maxUses = 50

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local uses = getPlayerStorageValue(cid, 30001)
   
    if uses >= maxUses then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have reached the maximum usage limit for magic stones.")
        return false
    end
   
    if uses < 0 then uses = 0 end
   
    doPlayerAddMagLevel(cid, count)
    setPlayerStorageValue(cid, 30001, uses + 1)
    doRemoveItem(item.uid)
    return true
end

LUA:
local count = 1 -- GIVE 1 Sword Skill
local maxUses = 50

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local uses = getPlayerStorageValue(cid, 30002) -- Different storage value for sword
   
    if uses >= maxUses then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have reached the maximum usage limit for sword stones.")
        return false
    end
   
    if uses < 0 then uses = 0 end
   
    doPlayerAddSkillTry(cid, SKILL_SWORD, getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) + 1))
    setPlayerStorageValue(cid, 30002, uses + 1)
    doRemoveItem(item.uid)
    return true
end
thanks man ! i go teste now!!!!!!!!!!!!!!
 
Status
Not open for further replies.
Back
Top