Ir para conteúdo
  • 0

SISTEMA VIP COM PROMOTION


AandersonC

Pergunta

Eae galera eu uso o sistema vip by account 1.0 ->http://www.xtibia.com/forum/topic/136543-vip-system-by-account-v10/

No meu ot os chars começam com vocação sorcerer,knight,paladin... etc. Ai compram promotion com Johnny e viram Master Sorcerer,Elite Knight..etc.

E preciso de um script que seja um NPC ou uma TALKACTION que ao comprar a 2ª promotion eu vire Alternative Sorcerer,Alternative Knight...

E por ultimo quer um script que quando a vip acabar o player volte para master sorcerer..

 

Meu Vocations.xml

 

 

<?xml version="1.0" encoding="UTF-8"?>
<vocations>
    <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
        </vocation>
    <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="50" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="1">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="50" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="2">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="50" gainmanaticks="4" gainmanaamount="50" manamultiplier="1.4" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="3">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="50" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="4">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="35" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="1">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="6" name="Elder Druid" description="a elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="35" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="2">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="0" gaincap="20" gainhp="15" gainmana="20" gainhpticks="3" gainhpamount="70" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.6" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="8" name="Elite Knight" description="a elite knight" needpremium="0" gaincap="25" gainhp="20" gainmana="10" gainhpticks="2" gainhpamount="90" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="4">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="9" name="Alternative Sorcerer" description="a alternative sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="35" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="5">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="10" name="Alternative Druid" description="a alternative druid" needpremium="0" gaincap="10" gainhp="5" gainmana="35" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="6">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="11" name="Alternative Paladin" description="a alternative paladin" needpremium="0" gaincap="20" gainhp="15" gainmana="20" gainhpticks="3" gainhpamount="70" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="7">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.6" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="12" name="Alternative Knight" description="a alternative knight" needpremium="0" gaincap="25" gainhp="20" gainmana="10" gainhpticks="2" gainhpamount="90" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="8">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
</vocations>

 

 

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Amigo, nao posso te ajudar muito no momento.

Segue um Script de um NPC que achei na net.
Os creditos nao sao meus.

 

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
local price = 50000
local vocations = {5,6,7,8}
if(msgcontains(msg, 'second promote') or msgcontains(msg, 'second promotion')) then
selfSay('Você quer ser promovido por '..price..' gps? {yes} ', cid)
talkState[talkUser] = 1
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then
if isInArray(vocations, getPlayerVocation(cid)) then
if doPlayerRemoveMoney(cid,price) == TRUE then
setPlayerPromotionLevel(cid, 2)
selfSay('Parabens,você foi promovido para a Vocação VIP!', cid)
talkState[talkUser] = 0
else
selfSay('Você não tem ' .. price .. ' gps para ser promovido', cid)
talkState[talkUser] = 0
end
else
selfSay('Desculpe, mais você não possui a primeira promotion.', cid)
talkState[talkUser] = 0
end
elseif msg == "no" and talkState[talkUser] >= 1 then
selfSay("Then not", cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Link para o comentário
Compartilhar em outros sites

  • 0

primeiro use esse vocations.xml.

<?xml version="1.0" encoding="UTF-8"?>

<vocations>
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="50" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="50" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="50" gainmanaticks="4" gainmanaamount="50" manamultiplier="1.4" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="50" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="35" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Elder Druid" description="a elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="35" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="0" gaincap="20" gainhp="15" gainmana="20" gainhpticks="3" gainhpamount="70" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.6" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="8" name="Elite Knight" description="a elite knight" needpremium="0" gaincap="25" gainhp="20" gainmana="10" gainhpticks="2" gainhpamount="90" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="62" name="Alternative Sorcerer" description="a alternative sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="35" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="5">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="61" name="Alternative Druid" description="a alternative druid" needpremium="0" gaincap="10" gainhp="5" gainmana="35" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="6">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="60" name="Alternative Paladin" description="a alternative paladin" needpremium="0" gaincap="20" gainhp="15" gainmana="20" gainhpticks="3" gainhpamount="70" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="7">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.6" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="63" name="Alternative Knight" description="a alternative knight" needpremium="0" gaincap="25" gainhp="20" gainmana="10" gainhpticks="2" gainhpamount="90" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="8">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
</vocations>

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
 
function promotion(cid, message, keywords, parameters, node)
        if(not npcHandler:isFocused(cid)) then
                return false
        end
        
        if isPremium(cid) then
                if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
                        npcHandler:say('Você ja foi Promovido.', 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(not doPlayerRemoveMoney(cid, parameters.cost)) then
                        npcHandler:say('You do not have enough money!', cid)
                else
                        setPlayerPromotionLevel(cid, parameters.promotion)
                        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
 
local node1 = keywordHandler:addKeyword({'promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Se Você Deseja Evoluir sua Vocation pra Alternative ' .. getPlayerVocation(cid) .. ' Fale {Yes} se nao fale {No}.'})
        node1:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler, cost = 0, level = 50, promotion = 2, text = 'Parabéns agora você é um Alternative ' ... getPlayerVocation(cid)...'})
        node1:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler, onlyFocus = true, text = 'Bye Bye...', reset = true})
 
npcHandler:addModule(FocusModule:new())

depois copie qualquer arquivo no seu npc e renomeie para alternative vocation e adcione isso /\

Editado por Maenilse
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...