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

Vocations, help with items, where to start

Taurus

Texass
Joined
Jan 11, 2009
Messages
616
Solutions
2
Reaction score
30
Location
United States
I wanna make the 2nd promo available, however once i do they cannot use their rods, the items still give them mag lvl and stuff, when they equip, but they cant use wands, rods.

would i need to add the second promo vocation to the whole items list, or just weapons.xml?
 
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)		npcHandler:onCreatureSay(cid, type, msg)		end
function onThink()				npcHandler:onThink()					end

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
	node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
	
local node2 = keywordHandler:addKeyword({'uhm'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can make you one of Erus Valar for 8 million gold coins. Do you want me to promote you?'})
	node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 8000000, level = 275, promotion = 2, text = 'Congratulations! You are now one of the Valar.'})
	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})


npcHandler:addModule(FocusModule:new())
 
There doesnt seem to be a problem ;/
Just try my way out with the new character and so on... if it's still not working i could send u an action script with a scroll for second promotion..
 
Yeah, i thought it looked pretty solid.

AW MAN i just had the most awesome idea, anyone know how to make it where theres stages for regeneration?

like for the exp stages?

anyway, pm me if u know

Thanks Reyn, I don't think the problem is in spells, since the vocations name is not showing up, and they cant wear the serpent coat.

If anyone knows of anything else related to vocations please let me know thanks.
 
Hmm try out this on a new char make it master sorc and use it :/
if its working it was ur npc, because ur vocations & spells seem to be alright

Make a script in ur actions folder and call it promotion.lua
Code:
local mageffect = 55 -- choose an effect to use (you can change this look in lib for magic effects)
local level = 1 -- level needed to use the script.

function onUse(cid, item, fromPosition, itemEX, toPosition)
    local voc = getPlayerVocation(cid)
    local vocname = getPlayerVocationName(cid)
    if(getPlayerVocation(cid) >= 5 and getPlayerVocation(cid) <= 8 and getPlayerLevel(cid) >= level) then
        setPlayerPromotionLevel(cid, 2)
        local vocnamenew = getPlayerVocationName(cid)
        doSendMagicEffect(getCreaturePosition(cid), mageffect)
        doPlayerSendTextMessage(cid,19, "You have been promoted from "..vocname.." to "..vocnamenew.."!")
        doRemoveItem(item.uid, 1)
    else
        doPlayerSendCancel(cid, "Your vocation may not use this scroll.")
    end
    return TRUE
end

Code:
	<action itemid="5952" script="promotion.lua"/>
 
It worked, the action worked.

I thank you so much, i ask you to send me an email, so we may keep contact, maybe even come play if you have time, its not much, but im learning, send me an email, ill pm u my address.
 
Back
Top