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

Promotion Paper

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
I need a promotion paper - vocation 5 go 9, 6 go 10, 7 go 11, and 8 go 12.
+ i need that that paper, promote + takes 10 items of id 9969, + add 150k health and mana to the player .... + need lv 30000 to use it :P
thanks on advance,
rep+++.
Luciano ~~
 
Ofc i puted on actions.xml ¬.¬¬¬¬¬¬
yes it is dedicated.... + i send file via FILEZILA and did /reload actions like i do everytime -.^
 
No errors - simple dont get promotion - i have all items... but sill no remove ;o - i will re-start server with putty so i can see errror
 
1zqxc01.png

LUA:
local setup = {
    promotion = 2, --promotion level
    items = 9971, --required item
    count = 10, --require # of items
    health = 150000, --new health that will be added(relative)
    mana = 150000, --new mana that will be added(relative)
    level = 30000,--required level
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) < level then
        doPlayerSendCancel(cid, 'You can not use this item at your current level.')
        return true
    end
 
    if getPlayerPromotionLevel(cid) >= setup.promotion then
        doPlayerSendCancel(cid, 'You are already promoted.')
        return true
    end
 
    if doPlayerRemoveItem(cid, setup.items, setup.count) then
        doRemoveItem(item.uid, 1)
        doPlayerSetPromotionLevel(cid, setup.promotion)
        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+setup.health)
        setCreatureMaxMana(cid, getCreatureMaxMana(cid)+setup.mana)
        doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_YELLOW)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have been promoted to '..getPlayerVocationName(cid)..'!!')
        doPlayerSave(cid)
    else
        doPlayerSendCancel(cid, 'You don\'t have all the required items.')
        return true
    end
    return true
end
script im using (edited config part)
 
LUA:
local setup = {
    promotion = 2, --promotion level
    items = 9971, --required item
    count = 10, --require # of items
    health = 150000, --new health that will be added(relative)
    mana = 150000, --new mana that will be added(relative)
    level = 30000,--required level
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) < setup.level then
        doPlayerSendCancel(cid, 'You can not use this item at your current level.')
        return true
    end
 
    if getPlayerPromotionLevel(cid) >= setup.promotion then
        doPlayerSendCancel(cid, 'You are already promoted.')
        return true
    end
 
    if doPlayerRemoveItem(cid, setup.items, setup.count) then
        doRemoveItem(item.uid, 1)
        doPlayerSetPromotionLevel(cid, setup.promotion)
        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+setup.health)
        setCreatureMaxMana(cid, getCreatureMaxMana(cid)+setup.mana)
        doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_YELLOW)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have been promoted to '..getPlayerVocationName(cid)..'!!')
        doPlayerSave(cid)
    else
        doPlayerSendCancel(cid, 'You don\'t have all the required items.')
        return true
    end
    return true
end
 
00:27 You have been promoted to Mighty Cleric!!
WORKS!
thanks :D
:D
:D
anyway is there how to make only that promotes from knight to elite knigh etc? (basic promotion)
lv 6500
 
told ya
LUA:
local setup = {
    promotion = 1, --promotion level
    items = 9971, --required item
    count = 10, --require # of items
    health = 150000, --new health that will be added(relative)
    mana = 150000, --new mana that will be added(relative)
    level = 6500,--required level
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) < setup.level then
        doPlayerSendCancel(cid, 'You can not use this item at your current level.')
        return true
    end
 
    if getPlayerPromotionLevel(cid) >= setup.promotion then
        doPlayerSendCancel(cid, 'You are already promoted.')
        return true
    end
 
    if doPlayerRemoveItem(cid, setup.items, setup.count) then
        doRemoveItem(item.uid, 1)
        doPlayerSetPromotionLevel(cid, setup.promotion)
        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+setup.health)
        setCreatureMaxMana(cid, getCreatureMaxMana(cid)+setup.mana)
        doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_YELLOW)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have been promoted to '..getPlayerVocationName(cid)..'!!')
        doPlayerSave(cid)
    else
        doPlayerSendCancel(cid, 'You don\'t have all the required items.')
        return true
    end
    return true
end
 
You really can't do that yourself?

Code:
local setup = {
    promotion = 1, --promotion level
    items = 9971, --required item
    count = 10, --require # of items
    level = 6500,--required level
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) < setup.level then
        doPlayerSendCancel(cid, 'You can not use this item at your current level.')
        return true
    end
 
    if getPlayerPromotionLevel(cid) >= setup.promotion then
        doPlayerSendCancel(cid, 'You are already promoted.')
        return true
    end
 
    if doPlayerRemoveItem(cid, setup.items, setup.count) then
        doPlayerSetPromotionLevel(cid, setup.promotion)
        doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_YELLOW)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have been promoted to '..getPlayerVocationName(cid)..'!!')
        doPlayerSave(cid)
    else
        doPlayerSendCancel(cid, 'You don\'t have all the required items.')
        return true
    end
    return true
end
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return (getPlayerItemCount(cid, 9999) >= 10 and getPlayerLevel(cid) >= 30000 and getPlayerPromotionLevel(cid) < 1) and (doPlayerRemoveItem(cid, 9999, 10), setPlayerPromotionLevel(cid, 1), doRemoveItem(item.uid), setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 150000), setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 150000)) or true
end
 
Last edited:
Back
Top