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

TalkAction raising a vocations attack speed temporarily

Cool spell (or talkaction in this case) lol....

It works fine, Im only having one problem....
I any player dies while having the UPGRADE, they will stay like that for ever!!!

Tryed using the:

function onLogin(cid)
if getPlayerVocation(cid) == 10 then
doSetPlayerVocation(cid, 7)
end
end

but its not working...
Anyone have a fix??

Also what I do notice is I get a weird thing in mysql DB
When that player dies having the UPGRADE, I get a -1 value
on the ONLINE field, in players folder. And even if I set it to 0manualy as soon as I logout with the char again I get -1. And every other working player has:

Values
0 = offline
1 = online

This is only hapening to the char I tested the spell with, and as soon as I tested the death thing... got stuck with the upgrade and with the -1 value.

SO WHAT TO DO??

I`ve been testing several things but not working... but anyways im a noob starting in this, so any help would be apreciated.

I'VE FIX THE ISSUE - THANKS ANYWAY.

One more thing, anyone could do this for SPELLS?? Not talkactions??
 
Last edited:
--Configure ON-- local fvoc = 7 --this is vocation before upgrade local svoc = 10 --this is voc after upgrade local spellmana = 1000 -- this is how much mana you need to have to cast the spell local spelltime = 10000 -- this will activate the function at the top of the script ( function m(cid) ) but it wont start for 22 seconds (40000 would be 40 seconds) --Configure OFF-- function m(cid) -- addEvent makes this function begin within the set ammount of time. if getPlayerVocation(cid) == svoc then -- this will make the spell wear off. doPlayerSetVocation(cid,fvoc) doSendMagicEffect(getPlayerPosition(cid),11) end end function onSay(cid, words, param, frompos) if (getPlayerVocation(cid) == fvoc) then playermana = getPlayerMana(cid) -- checks the players mana -- this makes sure u arent exhausted if (playermana >= spellmana) then -- if they have more then -spellmana- mana doPlayerAddMana(cid,-spellmana) doPlayerSetVocation(cid,svoc) -- this is the vocation of a royal paladin aswell, but this one has a faster attack speed in vocations.xml doSendMagicEffect(getPlayerPosition(cid),12) addEvent(m,spelltime,cid) else doPlayerSendCancel(cid,"You do not have enough mana.") -- it gives this msg if the player doesnt have more then the manaReq doSendMagicEffect(getPlayerPosition(cid), 2) end elseif (getPlayerVocation(cid) == svoc) then -- if the player has alrdy casted this spell, his vocation will be 10. doPlayerSendCancel(cid,"Wait for this spell to wear off before casting it again.") -- if the vocation is 10, it will send this message doSendMagicEffect(getPlayerPosition(cid), 2) else doSendMagicEffect(getPlayerPosition(cid),2) doPlayerSendCancel(cid,"Only paladins may use this spell.") -- incase sorcerers and druids and knights use this spell, they will get this message. end return words end
 
Back
Top