Hello. I wanna remove premium check from NPC, this is the original script:
I change:
And it works, (you are an elder druid), but the problem is when i buy again, he don't says me "you already promoted!", he sell me the promote again (removing money), and the worst is the "elder druid" change to "you have no vocation" :S Then, why the npc not check the promote if i only put false in check premmy?
Somebody can explain me, what is a nil value and "parameters.premium"?
Thanks & Regards
Code:
[B]if(isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium == false) then[/B]
local promotedVoc = getPromotedVocation(getPlayerVocation(cid))
if(getPlayerStorageValue(cid, 30018) == TRUE) then
npcHandler:say("You are already promoted!", cid)
elseif(getPlayerLevel(cid) < parameters.level) then
npcHandler:say("I am sorry, but I can only promote you once you have reached level " .. parameters.level .. ".", cid)
elseif(doPlayerRemoveMoney(cid, parameters.cost) ~= TRUE) then
npcHandler:say("You do not have enough money!", cid)
else
doPlayerSetVocation(cid, promotedVoc)
npcHandler:say(parameters.text, cid)
end
else
npcHandler:say("You need a premium account in order to get promoted.", cid)
end
npcHandler:resetNpc()
return true
end
I change:
Code:
if(isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == [COLOR="#B22222"]false[/COLOR]
And it works, (you are an elder druid), but the problem is when i buy again, he don't says me "you already promoted!", he sell me the promote again (removing money), and the worst is the "elder druid" change to "you have no vocation" :S Then, why the npc not check the promote if i only put false in check premmy?
Somebody can explain me, what is a nil value and "parameters.premium"?
Thanks & Regards
Last edited: