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

Action Exp Scroll For Reall Tibia 15694800

Blue Wizard

Lua Scripter
Joined
Jul 1, 2010
Messages
50
Reaction score
4
Location
In Your Mind
From Level 8 To Level 100 Recommended On Donation List
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
		
if getPlayerStorageValue(cid,1302) == 2 then
			doCreatureSay(cid, "You can only use this scroll only one time!", TALKTYPE_ORANGE_1)

	else if getPlayerLevel(cid) >= 8 then
		doCreatureSay(cid, "You Gained 15 694 800 Experience Points!", TALKTYPE_ORANGE_1)
			doPlayerAddExp(cid, 15694800)
			doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
			doRemoveItem(item.uid)
			setPlayerStorageValue(cid,1302,2)
			return TRUE
		else
					doCreatureSay(cid, "You must be over level 8 to use this scroll", TALKTYPE_ORANGE_1)
		end
end
end
Put This In Action.xml

Code:
<action itemid="7722" script="quests/exp scroll.lua"/>

Please Repp++ Enjoy :thumbup:
 
returnss?
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        
    if getCreatureStorage(cid,1302) == 2 then
        doCreatureSay(cid, 'You can only use this scroll only one time!', TALKTYPE_ORANGE_1)
    return false
    end

    if getPlayerLevel(cid) < 8 then
        doCreatureSay(cid, 'You must be over level 8 to use this scroll', TALKTYPE_ORANGE_1)
    return false
    end
    
    doRemoveItem(item.uid)
    doPlayerAddExp(cid, 15694800)
    doCreatureSetStorage(cid,1302,2)    
    doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
    doCreatureSay(cid, 'You Gained 15,694,800 Experience Points!', TALKTYPE_ORANGE_1)
return true
end
 
returnss?
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        
    if getCreatureStorage(cid,1302) == 2 then
        doCreatureSay(cid, 'You can only use this scroll only one time!', TALKTYPE_ORANGE_1)
    return false
    end

    if getPlayerLevel(cid) < 8 then
        doCreatureSay(cid, 'You must be over level 8 to use this scroll', TALKTYPE_ORANGE_1)
    return false
    end
    
    doRemoveItem(item.uid)
    doPlayerAddExp(cid, 15694800)
    doCreatureSetStorage(cid,1302,2)    
    doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
    doCreatureSay(cid, 'You Gained 15,694,800 Experience Points!', TALKTYPE_ORANGE_1)
return true
end

Returns means if the player can't efford it etc it says "You don't have enough money" ?
I wanna learn lua ;<
 
there's a tutorial about returns. i think evil hero made it
they vary with the function
in talkactions return true at the end avoids the commands appearing in default channel
 
Back
Top