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

Check player rune for 7.6

nkx

~ never forgive!
Joined
Jul 10, 2012
Messages
64
Reaction score
2
I am not able to use the script, every time I try to use the rune it appears "You can not use this rune", I have the correct access.

Can someone help me?

Lua:
-- Scripts made 100% by Colandus!

accessToUse = 0  -- Enter the access you have to be to use the rune.

function onUse(cid, item, frompos, item2, topos)

if getThingfromPos({x=topos.x, y=topos.y, z=topos.z, stackpos=253}).itemid > 0 then
if getPlayerAccess(cid) > accessToUse then
if getPlayerAccess(item2.uid) < getPlayerAccess(cid) then
player2Mana = getPlayerMana(item2.uid)
doPlayerAddMana(item2.uid, 9)
player2FullMana = getPlayerMana(item2.uid)
doPlayerAddMana(item2.uid, -player2FullMana)
doPlayerAddMana(item2.uid, player2Mana)

doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerHealth(item2.uid) .. " health right now and " .. player2FullHealth .. " health max.")
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerMana(item2.uid) .. " mana right now and " .. player2FullMana .. " mana max.")
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has eated " .. getPlayerFood(item2.uid) .. " of 1200 max.")
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has access " .. getPlayerAccess(item2.uid) .. ".")
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has been jailed " .. getPlayerStorageValue(item2.uid, 9354) -1  .. " times.")


if getPlayerVocation(item2.uid) == 0 then
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has no vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")

elseif getPlayerVocation(item2.uid) == 1 then
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an sorcerer with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")

elseif getPlayerVocation(item2.uid) == 2 then
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an druid with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")

elseif getPlayerVocation(item2.uid) == 3 then
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a paladin with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")

elseif getPlayerVocation(item2.uid) == 4 then
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an knight with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
else
doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a unknown vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
end

if getPlayerStorageValue(item2.uid, 8798) == -1 then
doPlayerSendTextMessage(cid, 21, "" .. getPlayerName(item2.uid) .. " has never been checked before.")
setPlayerStorageValue(item2.uid,8798,1)
else
doPlayerSendTextMessage(cid,21,"" .. getPlayerName(item2.uid) .. " has been checked " .. getPlayerStorageValue(item2.uid, 8798) + 1 .. " times.")
setPlayerStorageValue(item2.uid, 8798, getPlayerStorageValue(item2.uid, 8798) + 1)
end

doPlayerSendTextMessage(cid, 15, "" .. getPlayerName(item2.uid) .. " - Skills:")
doPlayerSendTextMessage(cid, 17, "Fist fighting: " .. getPlayerSkill(item2.uid,0) .. "")
doPlayerSendTextMessage(cid, 17, "Club fighting: " .. getPlayerSkill(item2.uid,1) .. "")
doPlayerSendTextMessage(cid, 17, "Sword fighting: " .. getPlayerSkill(item2.uid,2) .. "")
doPlayerSendTextMessage(cid, 17, "Axe fighting: " .. getPlayerSkill(item2.uid,3) .. "")
doPlayerSendTextMessage(cid, 17, "Distance fighting: " .. getPlayerSkill(item2.uid,4) .. "")
doPlayerSendTextMessage(cid, 17, "Shielding: " .. getPlayerSkill(item2.uid,5) .. "")
doPlayerSendTextMessage(cid, 17, "Fishing: " .. getPlayerSkill(item2.uid,6) .. "")

else
doSendMagicEffect(getPlayerPosition(cid), 2)
doPlayerSendCancel(cid, "You cannot check this player.")
end
else
doSendMagicEffect(getPlayerPosition(cid), 2)
doPlayerSendCancel(cid, "You cannot use this rune.")
end
else
doSendMagicEffect(getPlayerPosition(cid), 2)
doPlayerSendCancel(cid,"You can only use this rune on players.")
end
return 1
end


At actions/action.xml
Code:
<action itemid="2269" script="check_player.lua" />
 
Solution
In-game gif:
f3df3b0364.gif



Console print:

sOj8Tn1.png
Check your pms, when you get a chance.
I'm wary of that "access to use". What server distro are you using?
YourOts

Other runes are ok with "access to use"
like this:

Lua:
accessToUse = 0 -- Enter the access you have to be to use the rune.

function onUse(cid, item, frompos, item2, topos)

    if getPlayerAccess(cid) >= accessToUse then

    ipos1 = {x=topos.x-2, y=topos.y-2, z=topos.z, stackpos=255}
    geti1 = getThingfromPos(ipos1)

    ipos2 = {x=topos.x-1, y=topos.y-2, z=topos.z, stackpos=255}
    geti2 = getThingfromPos(ipos2)

    ipos3 = {x=topos.x, y=topos.y-2, z=topos.z, stackpos=255}
    geti3 = getThingfromPos(ipos3)

    ipos4 = {x=topos.x+1, y=topos.y-2, z=topos.z, stackpos=255}
    geti4 = getThingfromPos(ipos4)

    ipos5 = {x=topos.x+2, y=topos.y-2, z=topos.z, stackpos=255}
    geti5 = getThingfromPos(ipos5)

    ipos6 = {x=topos.x-2, y=topos.y-1, z=topos.z, stackpos=255}
    geti6 = getThingfromPos(ipos6)

    ipos7 = {x=topos.x-1, y=topos.y-1, z=topos.z, stackpos=255}
    geti7 = getThingfromPos(ipos7)

    ipos8 = {x=topos.x, y=topos.y-1, z=topos.z, stackpos=255}
    geti8 = getThingfromPos(ipos8)

    ipos9 = {x=topos.x+1, y=topos.y-1, z=topos.z, stackpos=255}
    geti9 = getThingfromPos(ipos9)

    ipos10 = {x=topos.x+2, y=topos.y-1, z=topos.z, stackpos=255}
    geti10 = getThingfromPos(ipos10)

    ipos11 = {x=topos.x-2, y=topos.y, z=topos.z, stackpos=255}
    geti11 = getThingfromPos(ipos11)

    ipos12 = {x=topos.x-1, y=topos.y, z=topos.z, stackpos=255}
    geti12 = getThingfromPos(ipos12)

    ipos13 = {x=topos.x, y=topos.y, z=topos.z, stackpos=255}
    geti13 = getThingfromPos(ipos13)

    ipos14 = {x=topos.x+1, y=topos.y, z=topos.z, stackpos=255}
    geti14 = getThingfromPos(ipos14)

    ipos15 = {x=topos.x+2, y=topos.y, z=topos.z, stackpos=255}
    geti15 = getThingfromPos(ipos15)

    ipos16 = {x=topos.x-2, y=topos.y+1, z=topos.z, stackpos=255}
    geti16 = getThingfromPos(ipos16)

    ipos17 = {x=topos.x-1, y=topos.y+1, z=topos.z, stackpos=255}
    geti17 = getThingfromPos(ipos17)

    ipos18 = {x=topos.x, y=topos.y+1, z=topos.z, stackpos=255}
    geti18 = getThingfromPos(ipos18)

    ipos19 = {x=topos.x+1, y=topos.y+1, z=topos.z, stackpos=255}
    geti19 = getThingfromPos(ipos19)

    ipos20 = {x=topos.x+2, y=topos.y+1, z=topos.z, stackpos=255}
    geti20 = getThingfromPos(ipos20)

    ipos21 = {x=topos.x-2, y=topos.y+2, z=topos.z, stackpos=255}
    geti21 = getThingfromPos(ipos21)

    ipos22 = {x=topos.x-1, y=topos.y+2, z=topos.z, stackpos=255}
    geti22 = getThingfromPos(ipos22)

    ipos23 = {x=topos.x, y=topos.y+2, z=topos.z, stackpos=255}
    geti23 = getThingfromPos(ipos23)

    ipos24 = {x=topos.x+1, y=topos.y+2, z=topos.z, stackpos=255}
    geti24 = getThingfromPos(ipos24)

    ipos25 = {x=topos.x+2, y=topos.y+2, z=topos.z, stackpos=255}
    geti25 = getThingfromPos(ipos25)

    if geti1.itemid > 0 then
        doSendMagicEffect(ipos1,2)
        doRemoveItem(geti1.uid,100)
    end
    if geti2.itemid > 0 then
        doSendMagicEffect(ipos2,2)
        doRemoveItem(geti2.uid,100)
    end
    if geti3.itemid > 0 then
        doSendMagicEffect(ipos3,2)
        doRemoveItem(geti3.uid,100)
    end
    if geti4.itemid > 0 then
        doSendMagicEffect(ipos4,2)
        doRemoveItem(geti4.uid,100)
    end
    if geti5.itemid > 0 then
        doSendMagicEffect(ipos5,2)
        doRemoveItem(geti5.uid,100)
    end
    if geti6.itemid > 0 then
        doSendMagicEffect(ipos6,2)
        doRemoveItem(geti6.uid,100)
    end
    if geti7.itemid > 0 then
        doSendMagicEffect(ipos7,2)
        doRemoveItem(geti7.uid,100)
    end
    if geti8.itemid > 0 then
        doSendMagicEffect(ipos8,2)
        doRemoveItem(geti8.uid,100)
    end
    if geti9.itemid > 0 then
        doSendMagicEffect(ipos9,2)
        doRemoveItem(geti9.uid,100)
    end
    if geti10.itemid > 0 then
        doSendMagicEffect(ipos10,2)
        doRemoveItem(geti10.uid,100)
    end
    if geti11.itemid > 0 then
        doSendMagicEffect(ipos11,2)
        doRemoveItem(geti11.uid,100)
    end
    if geti12.itemid > 0 then
        doSendMagicEffect(ipos12,2)
        doRemoveItem(geti12.uid,100)
    end
    if geti13.itemid > 0 then
        doSendMagicEffect(ipos13,2)
        doRemoveItem(geti13.uid,100)
    end
    if geti14.itemid > 0 then
        doSendMagicEffect(ipos14,2)
        doRemoveItem(geti14.uid,100)
    end
    if geti15.itemid > 0 then
        doSendMagicEffect(ipos15,2)
        doRemoveItem(geti15.uid,100)
    end
    if geti16.itemid > 0 then
        doSendMagicEffect(ipos16,2)
        doRemoveItem(geti16.uid,100)
    end
    if geti17.itemid > 0 then
        doSendMagicEffect(ipos17,2)
        doRemoveItem(geti17.uid,100)
    end
    if geti18.itemid > 0 then
        doSendMagicEffect(ipos18,2)
        doRemoveItem(geti18.uid,100)
    end
    if geti19.itemid > 0 then
        doSendMagicEffect(ipos19,2)
        doRemoveItem(geti19.uid,100)
    end
    if geti20.itemid > 0 then
        doSendMagicEffect(ipos20,2)
        doRemoveItem(geti20.uid,100)
    end
    if geti21.itemid > 0 then
        doSendMagicEffect(ipos21,2)
        doRemoveItem(geti21.uid,100)
    end
    if geti22.itemid > 0 then
        doSendMagicEffect(ipos22,2)
        doRemoveItem(geti22.uid,100)
    end
    if geti23.itemid > 0 then
        doSendMagicEffect(ipos23,2)
        doRemoveItem(geti23.uid,100)
    end
    if geti24.itemid > 0 then
        doSendMagicEffect(ipos24,2)
        doRemoveItem(geti24.uid,100)
    end
    if geti25.itemid > 0 then
        doSendMagicEffect(ipos25,2)
        doRemoveItem(geti25.uid,100)
    end
    else
        doSendMagicEffect(getPlayerPosition(cid), 2)
        doPlayerSendCancel(cid, "You cannot use this rune.")
    end
    return 1
end
 
Try this and tell us what prints to console.
Lua:
-- Scripts made 100% by Colandus!

accessToUse = 0  -- Enter the access you have to be to use the rune.

function onUse(cid, item, frompos, item2, topos)
   
    if getThingfromPos({x=topos.x, y=topos.y, z=topos.z, stackpos=253}).itemid > 0 then
        print("Your access value is: " .. getPlayerAccess(cid))
        if getPlayerAccess(cid) > accessToUse then
            print("Your access is higher then " .. accessToUse .. ". Script Continues..")
            if getPlayerAccess(item2.uid) < getPlayerAccess(cid) then
                player2Mana = getPlayerMana(item2.uid)
                doPlayerAddMana(item2.uid, 9)
                player2FullMana = getPlayerMana(item2.uid)
                doPlayerAddMana(item2.uid, -player2FullMana)
                doPlayerAddMana(item2.uid, player2Mana)
               
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerHealth(item2.uid) .. " health right now and " .. player2FullHealth .. " health max.")
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerMana(item2.uid) .. " mana right now and " .. player2FullMana .. " mana max.")
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has eated " .. getPlayerFood(item2.uid) .. " of 1200 max.")
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has access " .. getPlayerAccess(item2.uid) .. ".")
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has been jailed " .. getPlayerStorageValue(item2.uid, 9354) -1  .. " times.")
               
               
                if getPlayerVocation(item2.uid) == 0 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has no vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
               
                elseif getPlayerVocation(item2.uid) == 1 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an sorcerer with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
               
                elseif getPlayerVocation(item2.uid) == 2 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an druid with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
               
                elseif getPlayerVocation(item2.uid) == 3 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a paladin with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
               
                elseif getPlayerVocation(item2.uid) == 4 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an knight with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                else
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a unknown vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                end
               
                if getPlayerStorageValue(item2.uid, 8798) == -1 then
                    doPlayerSendTextMessage(cid, 21, "" .. getPlayerName(item2.uid) .. " has never been checked before.")
                    setPlayerStorageValue(item2.uid,8798,1)
                else
                    doPlayerSendTextMessage(cid,21,"" .. getPlayerName(item2.uid) .. " has been checked " .. getPlayerStorageValue(item2.uid, 8798) + 1 .. " times.")
                    setPlayerStorageValue(item2.uid, 8798, getPlayerStorageValue(item2.uid, 8798) + 1)
                end
               
                doPlayerSendTextMessage(cid, 15, "" .. getPlayerName(item2.uid) .. " - Skills:")
                doPlayerSendTextMessage(cid, 17, "Fist fighting: " .. getPlayerSkill(item2.uid,0) .. "")
                doPlayerSendTextMessage(cid, 17, "Club fighting: " .. getPlayerSkill(item2.uid,1) .. "")
                doPlayerSendTextMessage(cid, 17, "Sword fighting: " .. getPlayerSkill(item2.uid,2) .. "")
                doPlayerSendTextMessage(cid, 17, "Axe fighting: " .. getPlayerSkill(item2.uid,3) .. "")
                doPlayerSendTextMessage(cid, 17, "Distance fighting: " .. getPlayerSkill(item2.uid,4) .. "")
                doPlayerSendTextMessage(cid, 17, "Shielding: " .. getPlayerSkill(item2.uid,5) .. "")
                doPlayerSendTextMessage(cid, 17, "Fishing: " .. getPlayerSkill(item2.uid,6) .. "")
           
            else
                doSendMagicEffect(getPlayerPosition(cid), 2)
                doPlayerSendCancel(cid, "You cannot check this player.")
            end
        else
            print("Your access is equal to or lower then " .. accessToUse .. ". Script Ends.")
            doSendMagicEffect(getPlayerPosition(cid), 2)
            doPlayerSendCancel(cid, "You cannot use this rune.")
        end
    else
        doSendMagicEffect(getPlayerPosition(cid), 2)
        doPlayerSendCancel(cid,"You can only use this rune on players.")
    end
    return 1
end
 
Try this and tell us what prints to console.
Lua:
-- Scripts made 100% by Colandus!

accessToUse = 0  -- Enter the access you have to be to use the rune.

function onUse(cid, item, frompos, item2, topos)
 
    if getThingfromPos({x=topos.x, y=topos.y, z=topos.z, stackpos=253}).itemid > 0 then
        print("Your access value is: " .. getPlayerAccess(cid))
        if getPlayerAccess(cid) > accessToUse then
            print("Your access is higher then " .. accessToUse .. ". Script Continues..")
            if getPlayerAccess(item2.uid) < getPlayerAccess(cid) then
                player2Mana = getPlayerMana(item2.uid)
                doPlayerAddMana(item2.uid, 9)
                player2FullMana = getPlayerMana(item2.uid)
                doPlayerAddMana(item2.uid, -player2FullMana)
                doPlayerAddMana(item2.uid, player2Mana)
            
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerHealth(item2.uid) .. " health right now and " .. player2FullHealth .. " health max.")
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerMana(item2.uid) .. " mana right now and " .. player2FullMana .. " mana max.")
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has eated " .. getPlayerFood(item2.uid) .. " of 1200 max.")
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has access " .. getPlayerAccess(item2.uid) .. ".")
                doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has been jailed " .. getPlayerStorageValue(item2.uid, 9354) -1  .. " times.")
            
            
                if getPlayerVocation(item2.uid) == 0 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has no vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
            
                elseif getPlayerVocation(item2.uid) == 1 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an sorcerer with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
            
                elseif getPlayerVocation(item2.uid) == 2 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an druid with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
            
                elseif getPlayerVocation(item2.uid) == 3 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a paladin with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
            
                elseif getPlayerVocation(item2.uid) == 4 then
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an knight with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                else
                    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a unknown vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                end
            
                if getPlayerStorageValue(item2.uid, 8798) == -1 then
                    doPlayerSendTextMessage(cid, 21, "" .. getPlayerName(item2.uid) .. " has never been checked before.")
                    setPlayerStorageValue(item2.uid,8798,1)
                else
                    doPlayerSendTextMessage(cid,21,"" .. getPlayerName(item2.uid) .. " has been checked " .. getPlayerStorageValue(item2.uid, 8798) + 1 .. " times.")
                    setPlayerStorageValue(item2.uid, 8798, getPlayerStorageValue(item2.uid, 8798) + 1)
                end
            
                doPlayerSendTextMessage(cid, 15, "" .. getPlayerName(item2.uid) .. " - Skills:")
                doPlayerSendTextMessage(cid, 17, "Fist fighting: " .. getPlayerSkill(item2.uid,0) .. "")
                doPlayerSendTextMessage(cid, 17, "Club fighting: " .. getPlayerSkill(item2.uid,1) .. "")
                doPlayerSendTextMessage(cid, 17, "Sword fighting: " .. getPlayerSkill(item2.uid,2) .. "")
                doPlayerSendTextMessage(cid, 17, "Axe fighting: " .. getPlayerSkill(item2.uid,3) .. "")
                doPlayerSendTextMessage(cid, 17, "Distance fighting: " .. getPlayerSkill(item2.uid,4) .. "")
                doPlayerSendTextMessage(cid, 17, "Shielding: " .. getPlayerSkill(item2.uid,5) .. "")
                doPlayerSendTextMessage(cid, 17, "Fishing: " .. getPlayerSkill(item2.uid,6) .. "")
        
            else
                doSendMagicEffect(getPlayerPosition(cid), 2)
                doPlayerSendCancel(cid, "You cannot check this player.")
            end
        else
            print("Your access is equal to or lower then " .. accessToUse .. ". Script Ends.")
            doSendMagicEffect(getPlayerPosition(cid), 2)
            doPlayerSendCancel(cid, "You cannot use this rune.")
        end
    else
        doSendMagicEffect(getPlayerPosition(cid), 2)
        doPlayerSendCancel(cid,"You can only use this rune on players.")
    end
    return 1
end


I tried, doesnt work

Console print:

UHSwihp.png


In-game print:
8T2QlGu.png
 
I tried, doesnt work

Console print:

UHSwihp.png
Right, so you shouldn't ever be receiving "You can not use this rune"..

Can you show an in-game screenshot of the white/green text you are receiving?
 
Ah so "Cannot use this item."

It's strange that you are not getting any errors while running the script though..
Normally you get that message when the item is erroring.

I've green texted the majority of the script..

If you get the phrase "This is the bulk of the script" and no longer get the white text at the bottom of your screen, that means one of those lines is erroring, but without giving us an error code.
In that case, we basically will need to go line by line and find out what part is erroring.

But in either case, post your findings.

Lua:
-- Scripts made 100% by Colandus!

accessToUse = 0  -- Enter the access you have to be to use the rune.

function onUse(cid, item, frompos, item2, topos)
   
    if getThingfromPos({x=topos.x, y=topos.y, z=topos.z, stackpos=253}).itemid > 0 then
        print("Your access value is: " .. getPlayerAccess(cid))
        if getPlayerAccess(cid) > accessToUse then
            print("Your access is higher then " .. accessToUse .. ". Script Continues..")
            if getPlayerAccess(item2.uid) < getPlayerAccess(cid) then
                print("This is the bulk of the script.")
                --player2Mana = getPlayerMana(item2.uid)
                --doPlayerAddMana(item2.uid, 9)
                --player2FullMana = getPlayerMana(item2.uid)
                --doPlayerAddMana(item2.uid, -player2FullMana)
                --doPlayerAddMana(item2.uid, player2Mana)
                --
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerHealth(item2.uid) .. " health right now and " .. player2FullHealth .. " health max.")
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerMana(item2.uid) .. " mana right now and " .. player2FullMana .. " mana max.")
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has eated " .. getPlayerFood(item2.uid) .. " of 1200 max.")
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has access " .. getPlayerAccess(item2.uid) .. ".")
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has been jailed " .. getPlayerStorageValue(item2.uid, 9354) -1  .. " times.")
                --
                --
                --if getPlayerVocation(item2.uid) == 0 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has no vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --
                --elseif getPlayerVocation(item2.uid) == 1 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an sorcerer with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --
                --elseif getPlayerVocation(item2.uid) == 2 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an druid with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --
                --elseif getPlayerVocation(item2.uid) == 3 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a paladin with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --
                --elseif getPlayerVocation(item2.uid) == 4 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an knight with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --else
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a unknown vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --end
                --
                --if getPlayerStorageValue(item2.uid, 8798) == -1 then
                --    doPlayerSendTextMessage(cid, 21, "" .. getPlayerName(item2.uid) .. " has never been checked before.")
                --    setPlayerStorageValue(item2.uid,8798,1)
                --else
                --    doPlayerSendTextMessage(cid,21,"" .. getPlayerName(item2.uid) .. " has been checked " .. getPlayerStorageValue(item2.uid, 8798) + 1 .. " times.")
                --    setPlayerStorageValue(item2.uid, 8798, getPlayerStorageValue(item2.uid, 8798) + 1)
                --end
                --
                --doPlayerSendTextMessage(cid, 15, "" .. getPlayerName(item2.uid) .. " - Skills:")
                --doPlayerSendTextMessage(cid, 17, "Fist fighting: " .. getPlayerSkill(item2.uid,0) .. "")
                --doPlayerSendTextMessage(cid, 17, "Club fighting: " .. getPlayerSkill(item2.uid,1) .. "")
                --doPlayerSendTextMessage(cid, 17, "Sword fighting: " .. getPlayerSkill(item2.uid,2) .. "")
                --doPlayerSendTextMessage(cid, 17, "Axe fighting: " .. getPlayerSkill(item2.uid,3) .. "")
                --doPlayerSendTextMessage(cid, 17, "Distance fighting: " .. getPlayerSkill(item2.uid,4) .. "")
                --doPlayerSendTextMessage(cid, 17, "Shielding: " .. getPlayerSkill(item2.uid,5) .. "")
                --doPlayerSendTextMessage(cid, 17, "Fishing: " .. getPlayerSkill(item2.uid,6) .. "")
                --
            else
                print("We don't want to go here.")
                doSendMagicEffect(getPlayerPosition(cid), 2)
                doPlayerSendCancel(cid, "You cannot check this player.")
            end
        else
            print("Your access is equal to or lower then " .. accessToUse .. ". Script Ends.")
            doSendMagicEffect(getPlayerPosition(cid), 2)
            doPlayerSendCancel(cid, "You cannot use this rune.")
        end
    else
        doSendMagicEffect(getPlayerPosition(cid), 2)
        doPlayerSendCancel(cid,"You can only use this rune on players.")
    end
    return 1
end
 
Ah so "Cannot use this item."

It's strange that you are not getting any errors while running the script though..
Normally you get that message when the item is erroring.

I've green texted the majority of the script..

If you get the phrase "This is the bulk of the script" and no longer get the white text at the bottom of your screen, that means one of those lines is erroring, but without giving us an error code.
In that case, we basically will need to go line by line and find out what part is erroring.

But in either case, post your findings.

Lua:
-- Scripts made 100% by Colandus!

accessToUse = 0  -- Enter the access you have to be to use the rune.

function onUse(cid, item, frompos, item2, topos)
  
    if getThingfromPos({x=topos.x, y=topos.y, z=topos.z, stackpos=253}).itemid > 0 then
        print("Your access value is: " .. getPlayerAccess(cid))
        if getPlayerAccess(cid) > accessToUse then
            print("Your access is higher then " .. accessToUse .. ". Script Continues..")
            if getPlayerAccess(item2.uid) < getPlayerAccess(cid) then
                print("This is the bulk of the script.")
                --player2Mana = getPlayerMana(item2.uid)
                --doPlayerAddMana(item2.uid, 9)
                --player2FullMana = getPlayerMana(item2.uid)
                --doPlayerAddMana(item2.uid, -player2FullMana)
                --doPlayerAddMana(item2.uid, player2Mana)
                --
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerHealth(item2.uid) .. " health right now and " .. player2FullHealth .. " health max.")
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has " .. getPlayerMana(item2.uid) .. " mana right now and " .. player2FullMana .. " mana max.")
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has eated " .. getPlayerFood(item2.uid) .. " of 1200 max.")
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has access " .. getPlayerAccess(item2.uid) .. ".")
                --doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has been jailed " .. getPlayerStorageValue(item2.uid, 9354) -1  .. " times.")
                --
                --
                --if getPlayerVocation(item2.uid) == 0 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " has no vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --
                --elseif getPlayerVocation(item2.uid) == 1 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an sorcerer with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --
                --elseif getPlayerVocation(item2.uid) == 2 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an druid with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --
                --elseif getPlayerVocation(item2.uid) == 3 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a paladin with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --
                --elseif getPlayerVocation(item2.uid) == 4 then
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is an knight with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --else
                --    doPlayerSendTextMessage(cid, 20, "" .. getPlayerName(item2.uid) .. " is a unknown vocation with level " .. getPlayerLevel(item2.uid) .. " and magic level " .. getPlayerMagLevel(item2.uid) .. ".")
                --end
                --
                --if getPlayerStorageValue(item2.uid, 8798) == -1 then
                --    doPlayerSendTextMessage(cid, 21, "" .. getPlayerName(item2.uid) .. " has never been checked before.")
                --    setPlayerStorageValue(item2.uid,8798,1)
                --else
                --    doPlayerSendTextMessage(cid,21,"" .. getPlayerName(item2.uid) .. " has been checked " .. getPlayerStorageValue(item2.uid, 8798) + 1 .. " times.")
                --    setPlayerStorageValue(item2.uid, 8798, getPlayerStorageValue(item2.uid, 8798) + 1)
                --end
                --
                --doPlayerSendTextMessage(cid, 15, "" .. getPlayerName(item2.uid) .. " - Skills:")
                --doPlayerSendTextMessage(cid, 17, "Fist fighting: " .. getPlayerSkill(item2.uid,0) .. "")
                --doPlayerSendTextMessage(cid, 17, "Club fighting: " .. getPlayerSkill(item2.uid,1) .. "")
                --doPlayerSendTextMessage(cid, 17, "Sword fighting: " .. getPlayerSkill(item2.uid,2) .. "")
                --doPlayerSendTextMessage(cid, 17, "Axe fighting: " .. getPlayerSkill(item2.uid,3) .. "")
                --doPlayerSendTextMessage(cid, 17, "Distance fighting: " .. getPlayerSkill(item2.uid,4) .. "")
                --doPlayerSendTextMessage(cid, 17, "Shielding: " .. getPlayerSkill(item2.uid,5) .. "")
                --doPlayerSendTextMessage(cid, 17, "Fishing: " .. getPlayerSkill(item2.uid,6) .. "")
                --
            else
                print("We don't want to go here.")
                doSendMagicEffect(getPlayerPosition(cid), 2)
                doPlayerSendCancel(cid, "You cannot check this player.")
            end
        else
            print("Your access is equal to or lower then " .. accessToUse .. ". Script Ends.")
            doSendMagicEffect(getPlayerPosition(cid), 2)
            doPlayerSendCancel(cid, "You cannot use this rune.")
        end
    else
        doSendMagicEffect(getPlayerPosition(cid), 2)
        doPlayerSendCancel(cid,"You can only use this rune on players.")
    end
    return 1
end



In-game gif:
f3df3b0364.gif



Console print:

sOj8Tn1.png
 

Similar threads

Back
Top